diff --git a/CMakeLists.txt b/CMakeLists.txt index b1c71e3..d05327a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,3 +7,8 @@ add_library(${PROJECT_NAME} SHARED dllmain.cpp ${CMAKE_CURRENT_BINARY_DIR}/resou target_link_libraries(${PROJECT_NAME} version) set_property(TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") +if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" AND CMAKE_BUILD_TYPE MATCHES "Release") + target_compile_options(${PROJECT_NAME} PRIVATE /Zi) + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF") + set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_PDB_NAME ${PROJECT_NAME} COMPILE_PDB_OUTPUT_DIR ${CMAKE_BINARY_DIR}) +endif()