Commit ed075a2a authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf Committed by Hugo Beauzée-Luyssen

Win32 compilation

Signed-off-by: default avatarHugo Beauzée-Luyssen <beauze.h@gmail.com>
parent 6ffceed3
...@@ -87,12 +87,27 @@ INCLUDE_DIRECTORIES(${FREI0R_INCLUDE_DIR}) ...@@ -87,12 +87,27 @@ INCLUDE_DIRECTORIES(${FREI0R_INCLUDE_DIR})
# search for Qt4 # search for Qt4
IF (WITH_GUI) IF (WITH_GUI)
FIND_PACKAGE (Qt4 4.5.1 COMPONENTS QtCore QtGui QtNetwork QtXml REQUIRED) IF(WIN32)
#FindQt4.cmake is so brain-dead when Xcompiling
SET(QT_LIBRARY_DIR "/usr/win32/lib")
SET(QT_INCLUDE_DIR "/usr/win32/include/qt4")
ADD_DEFINITIONS( -I/usr/win32/include/qt4/QtCore)
ADD_DEFINITIONS( -I/usr/win32/include/qt4/QtGui)
ADD_DEFINITIONS( -I/usr/win32/include/qt4/QtXml)
ADD_DEFINITIONS( -I/usr/win32/include/qt4/QtNetwork)
ADD_DEFINITIONS( -I/usr/win32/include/qt4/)
ADD_DEFINITIONS( -DQT_NO_OPENSSL)
FIND_PACKAGE(Qt4 4.5.1 COMPONENTS QtCore QtXml QtGui QtNetwork REQUIRED )
ELSE(WIN32)
FIND_PACKAGE(Qt4 4.5.1 COMPONENTS QtCore QtXml QtGui QtNetwork REQUIRED )
ENDIF(WIN32)
ELSE(WITH_GUI) ELSE(WITH_GUI)
FIND_PACKAGE (Qt4 4.5.1 COMPONENTS QtCore QtNetwork QtXml REQUIRED) FIND_PACKAGE (Qt4 4.5.1 COMPONENTS QtCore QtNetwork QtXml REQUIRED)
ENDIF(WITH_GUI) ENDIF(WITH_GUI)
SET (VLMC_LIBS ${QT_QTCORE_LIBRARY} IF (NOT WIN32)
#FindQt4.cmake is so brain-dead when Xcompiling
SET (VLMC_LIBS ${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY} ${QT_QTGUI_LIBRARY}
${QT_QTNETWORK_LIBRARY} ${QT_QTNETWORK_LIBRARY}
${QT_QTSVG_LIBRARY} ${QT_QTSVG_LIBRARY}
...@@ -100,8 +115,9 @@ SET (VLMC_LIBS ${QT_QTCORE_LIBRARY} ...@@ -100,8 +115,9 @@ SET (VLMC_LIBS ${QT_QTCORE_LIBRARY}
${LIBVLC_LIBRARY} ${LIBVLC_LIBRARY}
${LIBVLCCORE_LIBRARY}) ${LIBVLCCORE_LIBRARY})
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
ENDIF(NOT WIN32)
# layout of VLMC installation # layout of VLMC installation
# (default values are platform-specific) # (default values are platform-specific)
......
...@@ -20,15 +20,17 @@ ...@@ -20,15 +20,17 @@
FIND_PATH(LIBVLC_INCLUDE_DIR vlc/vlc.h FIND_PATH(LIBVLC_INCLUDE_DIR vlc/vlc.h
HINTS "$ENV{LIBVLC_INCLUDE_PATH}" HINTS "$ENV{LIBVLC_INCLUDE_PATH}"
PATHS PATHS
#Mac OS and Contribs
"${CMAKE_CURRENT_SOURCE_DIR}/contribs/include"
"${CMAKE_CURRENT_SOURCE_DIR}/contribs/include/vlc"
# Env
"$ENV{LIB_DIR}/include" "$ENV{LIB_DIR}/include"
"$ENV{LIB_DIR}/include/vlc" "$ENV{LIB_DIR}/include/vlc"
#
"/usr/include" "/usr/include"
"/usr/include/vlc" "/usr/include/vlc"
"/usr/local/include" "/usr/local/include"
"/usr/local/include/vlc" "/usr/local/include/vlc"
#Mac OS
"${CMAKE_CURRENT_SOURCE_DIR}/contribs/include"
"${CMAKE_CURRENT_SOURCE_DIR}/contribs/include/vlc"
#mingw #mingw
c:/msys/local/include c:/msys/local/include
) )
......
...@@ -9,9 +9,9 @@ SET(CMAKE_SYSTEM_NAME Windows) ...@@ -9,9 +9,9 @@ SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_SYSTEM_VERSION 1) SET(CMAKE_SYSTEM_VERSION 1)
# specify the cross compiler # specify the cross compiler
SET(CMAKE_C_COMPILER i486-mingw32-gcc) SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
SET(CMAKE_CXX_COMPILER i486-mingw32-g++) SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
SET(CMAKE_WINDRES i486-mingw32-windres) SET(CMAKE_WINDRES i586-mingw32msvc-windres)
# where is the target environment # where is the target environment
...@@ -20,5 +20,6 @@ SET(CMAKE_FIND_ROOT_PATH ${CMAKE_SOURCE_DIR}/contribs) ...@@ -20,5 +20,6 @@ SET(CMAKE_FIND_ROOT_PATH ${CMAKE_SOURCE_DIR}/contribs)
# search for programs in the build host directories # search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories # for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ALWAYS)
SET(CMAKE_INCLUDE_PATH ${CMAKE_SOURCE_DIR}/contribs/include)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment