Permalink
Browse files

Add a 'd' POSTFIX to debug libraries with Visual Studio

Output them in the lib directory instead of in Debug/Release subdirs.
  • Loading branch information...
steveire committed Mar 29, 2016
1 parent c68d777 commit ce094b200ec9a13b08c8c14c8e8389e2dc16cc0e
Showing with 25 additions and 0 deletions.
  1. +13 −0 templates/lib/CMakeLists.txt
  2. +12 −0 textdocument/lib/CMakeLists.txt
@@ -68,6 +68,19 @@ target_compile_features(Grantlee_Templates
cxx_override
)
if (CMAKE_GENERATOR MATCHES "Visual Studio")
set_property(TARGET Grantlee_Templates PROPERTY DEBUG_POSTFIX "d")
foreach(cfg ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${cfg} CFG)
set_target_properties(Grantlee_Templates
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY_${CFG} "${CMAKE_CURRENT_BINARY_DIR}"
RUNTIME_OUTPUT_DIRECTORY_${CFG} "${CMAKE_CURRENT_BINARY_DIR}"
)
endforeach()
endif()
target_compile_definitions(Grantlee_Templates
PRIVATE
PLUGINS_PREFER_DEBUG_POSTFIX=$<CONFIG:Debug>
@@ -30,6 +30,18 @@ target_compile_features(Grantlee_TextDocument
PUBLIC
cxx_override
)
if (CMAKE_GENERATOR MATCHES "Visual Studio")
set_property(TARGET Grantlee_TextDocument PROPERTY DEBUG_POSTFIX "d")
foreach(cfg ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${cfg} CFG)
set_target_properties(Grantlee_TextDocument
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY_${CFG} "${CMAKE_CURRENT_BINARY_DIR}"
RUNTIME_OUTPUT_DIRECTORY_${CFG} "${CMAKE_CURRENT_BINARY_DIR}"
)
endforeach()
endif()
target_link_libraries(Grantlee_TextDocument
LINK_PUBLIC Qt5::Gui

0 comments on commit ce094b2

Please sign in to comment.