По умолчанию исполняемый файл устанавливается в ${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
|
target_compile_features(${target} ${__visibility} cxx_alias_templates
|
||||||
cxx_nullptr cxx_override)
|
cxx_nullptr cxx_override)
|
||||||
if(_target_type STREQUAL EXECUTABLE)
|
if(_target_type STREQUAL EXECUTABLE)
|
||||||
set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
set_target_properties(${target} PROPERTIES
|
||||||
set_target_properties(
|
POSITION_INDEPENDENT_CODE ON
|
||||||
${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
||||||
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
|
||||||
if(CMAKE_CXX_COMPILE_OPTIONS_PIE)
|
if(CMAKE_CXX_COMPILE_OPTIONS_PIE)
|
||||||
target_compile_options(${target} PUBLIC ${CMAKE_CXX_COMPILE_OPTIONS_PIE})
|
target_compile_options(${target} PUBLIC ${CMAKE_CXX_COMPILE_OPTIONS_PIE})
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CXX_COMPILER_IS_GCC AND MYX_CMAKE_CODE_COVERAGE)
|
if(CMAKE_CXX_COMPILER_IS_GCC AND MYX_CMAKE_CODE_COVERAGE)
|
||||||
myx_cmake_code_coverage(${target})
|
myx_cmake_code_coverage(${target})
|
||||||
endif()
|
endif()
|
||||||
|
install(TARGETS ${target} COMPONENT main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
Loading…
Reference in New Issue
Block a user