Правило для сборки библиотеки
This commit is contained in:
parent
bae0bd6f66
commit
8137c598f7
@ -11,7 +11,7 @@ set(current_target_headers
|
|||||||
cmex.hpp
|
cmex.hpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_common_library(${current_target} ${current_target_sources})
|
add_common_library(TARGET ${current_target} SOURCES ${current_target_sources})
|
||||||
common_target_properties(${current_target})
|
common_target_properties(${current_target})
|
||||||
|
|
||||||
# Цель, используемая только для установки заголовочных файлов без компиляции проекта
|
# Цель, используемая только для установки заголовочных файлов без компиляции проекта
|
||||||
@ -22,7 +22,9 @@ add_custom_target(${current_target}-install-headers
|
|||||||
|
|
||||||
# Правила для установки
|
# Правила для установки
|
||||||
install(TARGETS ${current_target}_static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
install(TARGETS ${current_target}_static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
install(TARGETS ${current_target}_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
if(BUILD_SHARED_LIBS)
|
||||||
|
install(TARGETS ${current_target}_shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
endif()
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/include/config.hpp ${current_target_headers}
|
install(FILES ${CMAKE_BINARY_DIR}/include/config.hpp ${current_target_headers}
|
||||||
COMPONENT headers DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${current_target})
|
COMPONENT headers DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${current_target})
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/${current_target}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
install(FILES ${CMAKE_BINARY_DIR}/${current_target}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
|
Loading…
Reference in New Issue
Block a user