summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-27 17:35:44 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-27 17:35:44 +0200
commitb3ef95ccf81876cb86ccc90f2dc005f55bfbf3c0 (patch)
treedf699f0335c88a4722ea1859ab4b0fa675562254 /CMakeLists.txt
parentb265ce5efe78d582c5af65f87d9a569e5d3c976b (diff)
Workaround CMake bug when generating MSVC2010 non-console executable
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 10 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8fa7045a..65f0adf0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -471,22 +471,23 @@ endif()
PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/facetracknoir/posix-version-script.txt")
endif()
endif()
-
- add_executable(ftnoir ${ftnoir-bin-c} ${ftnoir-bin-moc} ${ftnoir-bin-uih} ${ftnoir-bin-rcc})
+
+ if(WIN32 AND NOT SDK_CONSOLE_DEBUG)
+ set(ftnoir-win32-executable WIN32)
+ else()
+ set(ftnoir-win32-executable "")
+ endif()
+ add_executable(ftnoir ${ftnoir-win32-executable} ${ftnoir-bin-c} ${ftnoir-bin-moc} ${ftnoir-bin-uih} ${ftnoir-bin-rcc})
if(WIN32)
target_link_libraries(ftnoir ftnoir-pose-widget ftnoir-spline-widget ${MY_QT_LIBS} "${CMAKE_SOURCE_DIR}/dinput/dinput8.lib" "${CMAKE_SOURCE_DIR}/dinput/dxguid.lib" "${CMAKE_SOURCE_DIR}/dinput/strmiids.lib")
endif()
+ if(MSVC)
+ SET_TARGET_PROPERTIES(ftnoir PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup")
+ endif()
target_link_libraries(ftnoir ftnoir-pose-widget ftnoir-spline-widget ${MY_QT_LIBS} ${QXT_QXTCORE_LIB_RELEASE} ${QXT_QXTGUI_LIB_RELEASE})
if(NOT WIN32)
target_link_libraries(ftnoir dl)
endif()
- if(WIN32)
- if(NOT SDK_CONSOLE_DEBUG)
- SET_TARGET_PROPERTIES(ftnoir PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")
- else()
- SET_TARGET_PROPERTIES(ftnoir PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE /ENTRY:mainCRTStartup")
- endif()
- endif()
endif()
# make install