По умолчанию исполняемый файл устанавливается в ${CMAKE_INSTALL_BINDIR}
This commit is contained in:
parent
acd8d2b255
commit
357c19771f
@ -51,16 +51,16 @@ function(myx_cmake_common_target_properties target)
|
||||
target_compile_features(${target} ${__visibility} cxx_alias_templates
|
||||
cxx_nullptr cxx_override)
|
||||
if(_target_type STREQUAL EXECUTABLE)
|
||||
set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set_target_properties(
|
||||
${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
||||
set_target_properties(${target} PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
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()
|
||||
if(CMAKE_CXX_COMPILER_IS_GCC AND MYX_CMAKE_CODE_COVERAGE)
|
||||
myx_cmake_code_coverage(${target})
|
||||
endif()
|
||||
install(TARGETS ${target} COMPONENT main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
|
Loading…
Reference in New Issue
Block a user