Has anyone tested if it works? Cross compiling on Linux for windows, and also native compilation on windows?<br><br>Regards,<br>Rohit Yadav<br><br><div class="gmail_quote">On Mon, Sep 6, 2010 at 9:53 PM, <span dir="ltr"><<a href="mailto:git@videolan.org">git@videolan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">vlmc | branch: master | Jean-Baptiste Kempf <<a href="mailto:jb@videolan.org">jb@videolan.org</a>> | Mon Sep 6 16:58:14 2010 +0200| [ed075a2ac195b287c3a891173bbbc00633684ac3] | committer: Hugo Beauzée-Luyssen<br>
<br>
Win32 compilation<br>
<br>
Signed-off-by: Hugo Beauzée-Luyssen <<a href="mailto:beauze.h@gmail.com">beauze.h@gmail.com</a>><br>
<br>
> <a href="http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=ed075a2ac195b287c3a891173bbbc00633684ac3" target="_blank">http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=ed075a2ac195b287c3a891173bbbc00633684ac3</a><br>
---<br>
<br>
CMakeLists.txt | 24 ++++++++++++++++++++----<br>
cmake/FindLIBVLC.cmake | 8 +++++---<br>
cmake/toolchain-win32.cmake | 11 ++++++-----<br>
3 files changed, 31 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/CMakeLists.txt b/CMakeLists.txt<br>
index 569cf6f..554e1c8 100644<br>
--- a/CMakeLists.txt<br>
+++ b/CMakeLists.txt<br>
@@ -87,12 +87,27 @@ INCLUDE_DIRECTORIES(${FREI0R_INCLUDE_DIR})<br>
<br>
# search for Qt4<br>
IF (WITH_GUI)<br>
- FIND_PACKAGE (Qt4 4.5.1 COMPONENTS QtCore QtGui QtNetwork QtXml REQUIRED)<br>
+ IF(WIN32)<br>
+ #FindQt4.cmake is so brain-dead when Xcompiling<br>
+ SET(QT_LIBRARY_DIR "/usr/win32/lib")<br>
+ SET(QT_INCLUDE_DIR "/usr/win32/include/qt4")<br>
+ ADD_DEFINITIONS( -I/usr/win32/include/qt4/QtCore)<br>
+ ADD_DEFINITIONS( -I/usr/win32/include/qt4/QtGui)<br>
+ ADD_DEFINITIONS( -I/usr/win32/include/qt4/QtXml)<br>
+ ADD_DEFINITIONS( -I/usr/win32/include/qt4/QtNetwork)<br>
+ ADD_DEFINITIONS( -I/usr/win32/include/qt4/)<br>
+ ADD_DEFINITIONS( -DQT_NO_OPENSSL)<br>
+ FIND_PACKAGE(Qt4 4.5.1 COMPONENTS QtCore QtXml QtGui QtNetwork REQUIRED )<br>
+ ELSE(WIN32)<br>
+ FIND_PACKAGE(Qt4 4.5.1 COMPONENTS QtCore QtXml QtGui QtNetwork REQUIRED )<br>
+ ENDIF(WIN32)<br>
ELSE(WITH_GUI)<br>
FIND_PACKAGE (Qt4 4.5.1 COMPONENTS QtCore QtNetwork QtXml REQUIRED)<br>
ENDIF(WITH_GUI)<br>
<br>
-SET (VLMC_LIBS ${QT_QTCORE_LIBRARY}<br>
+IF (NOT WIN32)<br>
+ #FindQt4.cmake is so brain-dead when Xcompiling<br>
+ SET (VLMC_LIBS ${QT_QTCORE_LIBRARY}<br>
${QT_QTGUI_LIBRARY}<br>
${QT_QTNETWORK_LIBRARY}<br>
${QT_QTSVG_LIBRARY}<br>
@@ -100,8 +115,9 @@ SET (VLMC_LIBS ${QT_QTCORE_LIBRARY}<br>
${LIBVLC_LIBRARY}<br>
${LIBVLCCORE_LIBRARY})<br>
<br>
-INCLUDE(${QT_USE_FILE})<br>
-ADD_DEFINITIONS(${QT_DEFINITIONS})<br>
+ INCLUDE(${QT_USE_FILE})<br>
+ ADD_DEFINITIONS(${QT_DEFINITIONS})<br>
+ENDIF(NOT WIN32)<br>
<br>
# layout of VLMC installation<br>
# (default values are platform-specific)<br>
diff --git a/cmake/FindLIBVLC.cmake b/cmake/FindLIBVLC.cmake<br>
index 29a9660..609fda4 100644<br>
--- a/cmake/FindLIBVLC.cmake<br>
+++ b/cmake/FindLIBVLC.cmake<br>
@@ -20,15 +20,17 @@<br>
FIND_PATH(LIBVLC_INCLUDE_DIR vlc/vlc.h<br>
HINTS "$ENV{LIBVLC_INCLUDE_PATH}"<br>
PATHS<br>
+ #Mac OS and Contribs<br>
+ "${CMAKE_CURRENT_SOURCE_DIR}/contribs/include"<br>
+ "${CMAKE_CURRENT_SOURCE_DIR}/contribs/include/vlc"<br>
+ # Env<br>
"$ENV{LIB_DIR}/include"<br>
"$ENV{LIB_DIR}/include/vlc"<br>
+ #<br>
"/usr/include"<br>
"/usr/include/vlc"<br>
"/usr/local/include"<br>
"/usr/local/include/vlc"<br>
- #Mac OS<br>
- "${CMAKE_CURRENT_SOURCE_DIR}/contribs/include"<br>
- "${CMAKE_CURRENT_SOURCE_DIR}/contribs/include/vlc"<br>
#mingw<br>
c:/msys/local/include<br>
)<br>
diff --git a/cmake/toolchain-win32.cmake b/cmake/toolchain-win32.cmake<br>
index e14e374..bc7fe61 100644<br>
--- a/cmake/toolchain-win32.cmake<br>
+++ b/cmake/toolchain-win32.cmake<br>
@@ -9,9 +9,9 @@ SET(CMAKE_SYSTEM_NAME Windows)<br>
SET(CMAKE_SYSTEM_VERSION 1)<br>
<br>
# specify the cross compiler<br>
-SET(CMAKE_C_COMPILER i486-mingw32-gcc)<br>
-SET(CMAKE_CXX_COMPILER i486-mingw32-g++)<br>
-SET(CMAKE_WINDRES i486-mingw32-windres)<br>
+SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)<br>
+SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)<br>
+SET(CMAKE_WINDRES i586-mingw32msvc-windres)<br>
<br>
<br>
# where is the target environment<br>
@@ -20,5 +20,6 @@ SET(CMAKE_FIND_ROOT_PATH ${CMAKE_SOURCE_DIR}/contribs)<br>
# search for programs in the build host directories<br>
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)<br>
# for libraries and headers in the target directories<br>
-SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)<br>
-SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)<br>
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)<br>
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ALWAYS)<br>
+SET(CMAKE_INCLUDE_PATH ${CMAKE_SOURCE_DIR}/contribs/include)<br>
<br>
_______________________________________________<br>
Vlmc-devel mailing list<br>
<a href="mailto:Vlmc-devel@videolan.org">Vlmc-devel@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/vlmc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlmc-devel</a><br>
</blockquote></div><br>