install DESTINATION use CMAKE_INSTALL_<dir>

This commit is contained in:
kurtliu 2024-01-24 13:19:23 +08:00 committed by Azat Khuzhin
parent b698e6c4b0
commit 7870e85ecb
2 changed files with 10 additions and 10 deletions

View File

@ -1683,12 +1683,12 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfigVersion.cmake.in
# Install compat headers
install(FILES ${HDR_COMPAT}
DESTINATION "include"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
COMPONENT dev)
# Install public headers
install(FILES ${HDR_PUBLIC}
DESTINATION "include/event2"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/event2"
COMPONENT dev)
# Install the configs.
@ -1716,7 +1716,7 @@ endif()
# Install the scripts.
install(PROGRAMS
${CMAKE_CURRENT_SOURCE_DIR}/event_rpcgen.py
DESTINATION "bin"
DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT runtime)
# Create documents with doxygen.

View File

@ -36,9 +36,9 @@ endmacro()
macro(export_install_target TYPE LIB_NAME)
if("${LIB_NAME}" STREQUAL "event")
install(TARGETS "${LIB_NAME}_${TYPE}"
LIBRARY DESTINATION "lib" COMPONENT lib
ARCHIVE DESTINATION "lib" COMPONENT lib
RUNTIME DESTINATION "lib" COMPONENT lib
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
COMPONENT dev
)
else()
@ -62,9 +62,9 @@ macro(export_install_target TYPE LIB_NAME)
)
install(TARGETS "${LIB_NAME}_${TYPE}"
EXPORT LibeventTargets-${TYPE}
LIBRARY DESTINATION "lib" COMPONENT lib
ARCHIVE DESTINATION "lib" COMPONENT lib
RUNTIME DESTINATION "lib" COMPONENT lib
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
COMPONENT dev
)
endif()
@ -169,7 +169,7 @@ macro(add_event_library LIB_NAME)
if (NOT WIN32)
install(FILES
"$<TARGET_FILE_DIR:${LIB_NAME}_shared>/${LIB_LINK_NAME}"
DESTINATION "lib"
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
COMPONENT lib)
endif()
endif()