Skip to content

Commit

Permalink
Cross compiling for Windows works !
Browse files Browse the repository at this point in the history
  • Loading branch information
etix committed Jan 15, 2010
1 parent fe945fc commit 0cf02d0
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Makefile*


*.pro.user *.pro.user
moc_*.cpp moc_*.cpp
moc_*.cxx*
ui_*.h ui_*.h
.*.swp .*.swp
*~ *~
Expand All @@ -16,5 +17,5 @@ ui_*.h
qrc_ressources.cpp qrc_ressources.cpp
CMakeCache.txt CMakeCache.txt
CMakeFiles CMakeFiles
*.cmake cmake_install.cmake

CPack*.cmake
15 changes: 3 additions & 12 deletions CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -33,18 +33,9 @@ FIND_PACKAGE(LIBVLC)
INCLUDE_DIRECTORIES(${LIBVLC_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBVLC_INCLUDE_DIR})


# search for Qt4 # search for Qt4
FIND_PACKAGE(Qt4 REQUIRED) FIND_PACKAGE(Qt4 4.5.1 COMPONENTS QtCore QtGui QtSvg QtXml REQUIRED )


SET( QT_USE_QTXML TRUE ) INCLUDE(${QT_USE_FILE})
SET( QT_USE_QTNETWORK TRUE )
SET( QT_USE_QTSVG TRUE )
SET( QT_USE_QTXML TRUE )
IF (ENABLE_TESTS)
SET( QT_USE_QTTEST TRUE )
ENABLE_TESTING()
ENDIF (ENABLE_TESTS)

INCLUDE( ${QT_USE_FILE} )
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})


# layout of VLMC installation # layout of VLMC installation
Expand Down
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Building VLMC


A typical way to build VLMC is: A typical way to build VLMC is:


qmake cmake .
make make


Running VLMC Running VLMC
Expand Down
11 changes: 11 additions & 0 deletions INSTALL.win32
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,11 @@

Cross-compilation (from Unix)
=============================

Download contribs from:
http://vlmc.org/~etix/contribs/

To be continued...

----------------------------------------------------------
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-win32.cmake .
17 changes: 17 additions & 0 deletions cmake/toolchain-win32.cmake
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,17 @@
# this one is important
SET(CMAKE_SYSTEM_NAME Windows)
#this one not so much
SET(CMAKE_SYSTEM_VERSION 1)

# specify the cross compiler
SET(CMAKE_C_COMPILER /usr/bin/i486-mingw32-gcc)
SET(CMAKE_CXX_COMPILER /usr/bin/i486-mingw32-g++)

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH contribs)

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

0 comments on commit 0cf02d0

Please sign in to comment.