diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-26 23:43:53 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-26 23:43:53 +0200 |
commit | 9ff9796c1249f3c09af223af51d411c659691051 (patch) | |
tree | 4f5ec1d5c74a779eda218820e9fb928b87d7a35b /CMakeLists.txt | |
parent | c22192d4445d1c7cb8247e8dd0b3cb6a2cee56b6 (diff) |
Allow for a console debug build.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 752e3964..8ea116ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,12 @@ SET(CMAKE_SKIP_INSTALL_RPATH FALSE) SET(CMAKE_SKIP_RPATH FALSE) SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}") -SET(SDK_FACEAPI_ONLY FALSE CACHE BOOL "FaceAPI only (MSVC 2005)") +if(WIN32) + SET(SDK_FACEAPI_ONLY FALSE CACHE BOOL "FaceAPI only (MSVC 2005)") +endif() +if(WIN32) + SET(SDK_CONSOLE_DEBUG FALSE CACHE BOOL "Console build") +endif() IF(WIN32) SET(SDK_SM_FACEAPI_PATH "" CACHE PATH "SeeingMachines FaceAPI SDK path") @@ -456,10 +461,11 @@ endif() if(NOT WIN32) target_link_libraries(ftnoir dl) endif() - if(WIN32) - if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC) - SET_TARGET_PROPERTIES(ftnoir PROPERTIES LINK_FLAGS "-Wl,--subsystem,windows") + 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() |