Permalink
Browse files

Cross compiling for Windows works !

  • Loading branch information...
1 parent fe945fc commit 0cf02d0dfb3a65f45b284c0026e6c0985c72b40c @etix etix committed Jan 11, 2010
Showing with 35 additions and 15 deletions.
  1. +3 −2 .gitignore
  2. +3 −12 CMakeLists.txt
  3. +1 −1 INSTALL
  4. +11 −0 INSTALL.win32
  5. +17 −0 cmake/toolchain-win32.cmake
View
@@ -8,6 +8,7 @@ Makefile*
*.pro.user
moc_*.cpp
+moc_*.cxx*
ui_*.h
.*.swp
*~
@@ -16,5 +17,5 @@ ui_*.h
qrc_ressources.cpp
CMakeCache.txt
CMakeFiles
-*.cmake
-
+cmake_install.cmake
+CPack*.cmake
View
@@ -33,18 +33,9 @@ FIND_PACKAGE(LIBVLC)
INCLUDE_DIRECTORIES(${LIBVLC_INCLUDE_DIR})
# search for Qt4
-FIND_PACKAGE(Qt4 REQUIRED)
-
-SET( QT_USE_QTXML TRUE )
-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} )
+FIND_PACKAGE(Qt4 4.5.1 COMPONENTS QtCore QtGui QtSvg QtXml REQUIRED )
+
+INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
# layout of VLMC installation
View
@@ -20,7 +20,7 @@ Building VLMC
A typical way to build VLMC is:
- qmake
+ cmake .
make
Running VLMC
View
@@ -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 .
@@ -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.