Исправлен целевой каталог для формирования исполняемых файлов

This commit is contained in:
Andrei Astafev 2020-04-22 19:14:03 +03:00
parent a52a9e7b8a
commit 8ca93d3115

View File

@ -18,8 +18,12 @@ function(common_target_properties target)
target_compile_features(${target} ${__visibility} ${COMMON_CXX_FEATURES})
get_target_property(_targetType ${target} TYPE)
if(_targetType STREQUAL "EXECUTABLE" AND CMAKE_CXX_COMPILE_OPTIONS_PIE)
target_compile_options(${target} PUBLIC "${CMAKE_CXX_COMPILE_OPTIONS_PIE}")
if(_targetType STREQUAL "EXECUTABLE")
set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
if(CMAKE_CXX_COMPILE_OPTIONS_PIE)
target_compile_options(${target} PUBLIC "${CMAKE_CXX_COMPILE_OPTIONS_PIE}")
endif()
endif()
target_include_directories(
${target}
@ -69,7 +73,8 @@ function(common_target_properties target)
endif()
endif()
set_target_properties(${target} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER ${CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER})
set_target_properties(${target} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER
${CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER})
set_target_properties(${target} PROPERTIES COTIRE_ADD_UNITY_BUILD ${CMLIB_COTIRE_ADD_UNITY_BUILD})
if(CMAKE_BUILD_TYPE STREQUAL Profile)