diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-29 00:52:57 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-29 00:52:57 +0100 |
commit | f879a8eeed54cb09929235a9a60fe335ee256eff (patch) | |
tree | c3c21314d8cc79c68e26762e2cb0299a9704b85f | |
parent | fea2abeb7040bacdc90964e216e5170faeb8052d (diff) |
fix qt5 cmake build scripts brain damage
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a3e3ecc..0a4daad1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,10 @@ if(WIN32 AND MSVC) set(SDK_GOOGLE_BREAKPAD "" CACHE PATH "google-breakpad for crash reporting") endif() +if(MINGW) + set(SDK_MINGW_PREFIX "" CACHE PATH "mingw prefix") +endif() + if(SDK_GOOGLE_BREAKPAD AND WIN32) add_definitions(-DOPENTRACK_BREAKPAD) include_directories("${SDK_GOOGLE_BREAKPAD}/src/client/windows/handler") @@ -78,6 +82,14 @@ SET(SDK_RIFT "" CACHE PATH "libOVR path") include_directories(${CMAKE_SOURCE_DIR}) +if(MINGW) + # qt scripts are broken + set(Qt5Gui_user32_LIBRARY ${SDK_MINGW_PREFIX}/mingw/lib/libuser32.a) + set(Qt5Gui_opengl32_LIBRARY ${SDK_MINGW_PREFIX}/mingw/lib/libopengl32.a) + set(Qt5Gui_glu32_LIBRARY ${SDK_MINGW_PREFIX}/mingw/lib/libglu32.a) + set(Qt5Gui_gdi32_LIBRARY ${SDK_MINGW_PREFIX}/mingw/lib/libgdi32.a) +endif() + find_package(OpenCV REQUIRED) find_package(Qt5 REQUIRED COMPONENTS Core Xml Network Widgets Gui QUIET) cmake_policy(SET CMP0020 NEW) @@ -760,8 +772,8 @@ if(WIN32) endif() if(MSVC) -file(GLOB pdbs1 "${CMAKE_BINARY_DIR}/Release/*.pdb") -file(GLOB pdbs2 "${CMAKE_BINARY_DIR}/*.pdb") -install(FILES ${pdbs1} ${pdbs2} DESTINATION .) + file(GLOB pdbs1 "${CMAKE_BINARY_DIR}/Release/*.pdb") + file(GLOB pdbs2 "${CMAKE_BINARY_DIR}/*.pdb") + install(FILES ${pdbs1} ${pdbs2} DESTINATION .) endif() |