diff options
-rw-r--r-- | CMakeLists.txt | 14 | ||||
-rw-r--r-- | facetracknoir/main.cpp | 2 |
2 files changed, 11 insertions, 5 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() diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index d2eb84cc..01b9d8ea 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -36,7 +36,7 @@ #if defined(_WIN32)
#include <windows.h>
-#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
+//#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
#endif
int main(int argc, char** argv)
{
|