diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b4eba507..f67e4a728 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,8 @@ if(MSVC) set(CMAKE_DEBUG_POSTFIX "d") add_definitions(-D_CRT_SECURE_NO_DEPRECATE) add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") #multi-processor compilation + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP") #multi-processor compilation endif() if(CMAKE_COMPILER_IS_GNUCXX) @@ -225,3 +227,15 @@ set(LIBRARY_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE) include_directories(${ES_INCLUDE_DIRS}) add_executable(emulationstation ${ES_SOURCES} ${ES_HEADERS}) target_link_libraries(emulationstation ${ES_LIBRARIES}) + +#special properties for windows builds +if(MSVC) + #show console in debug builds, but not in proper release builds + #Note that up to CMake 2.8.10 this feature is broken: http://public.kitware.com/Bug/view.php?id=12566 + set_target_properties(emulationstation PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") + set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE") + set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE") + set_target_properties(emulationstation PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE") + set_target_properties(emulationstation PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS") + set_target_properties(emulationstation PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS") +endif() \ No newline at end of file