mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-22 22:16:37 +08:00
update installation scripts
This commit is contained in:
parent
df1a55fd61
commit
c85dae66ac
@ -1,9 +1,11 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
if(NOT TARGET oatpp::oatpp)
|
||||
if(NOT TARGET oatpp::@OATPP_MODULE_NAME@)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@OATPP_MODULE_NAME@Targets.cmake")
|
||||
endif()
|
||||
|
||||
set_and_check(@OATPP_MODULE_NAME@_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/oatpp-@OATPP_MODULE_VERSION@/@OATPP_MODULE_NAME@/")
|
||||
set_and_check(@OATPP_MODULE_NAME@_LIBRARIES_DIRS "${PACKAGE_PREFIX_DIR}/lib/@OATPP_MODULE_NAME@-@OATPP_MODULE_VERSION@/")
|
||||
set_and_check(@OATPP_MODULE_NAME@_LIBRARIES_DIRS "${PACKAGE_PREFIX_DIR}/@OATPP_MODULE_LIBDIR@/oatpp-@OATPP_MODULE_VERSION@/")
|
||||
|
||||
set(@OATPP_MODULE_NAME@_LIBRARIES @OATPP_MODULE_LIBRARIES@)
|
||||
set(OATPP_BASE_DIR "${PACKAGE_PREFIX_DIR}/include/oatpp-@OATPP_MODULE_VERSION@/")
|
||||
|
@ -37,12 +37,15 @@ message("\n#####################################################################
|
||||
## Set cache variables to configure module-config.cmake.in template
|
||||
## via call to configure_package_config_file
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(OATPP_MODULE_NAME ${OATPP_THIS_MODULE_NAME} CACHE STRING "oatpp module name")
|
||||
set(OATPP_MODULE_VERSION "${OATPP_THIS_MODULE_VERSION}" CACHE STRING "oatpp module version")
|
||||
set(OATPP_MODULE_LIBRARIES
|
||||
"${OATPP_THIS_MODULE_LIBRARIES}" ## list libraries to find when find_package is called
|
||||
CACHE INTERNAL "oatpp module libraries"
|
||||
)
|
||||
set(OATPP_MODULE_LIBDIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING "lib folder name")
|
||||
|
||||
#######################################################################################
|
||||
## calc directories to install (relative to this script)
|
||||
@ -54,8 +57,6 @@ endforeach()
|
||||
|
||||
#######################################################################################
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
install(TARGETS ${OATPP_THIS_MODULE_TARGETS}
|
||||
EXPORT "${OATPP_MODULE_NAME}Targets"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/oatpp-${OATPP_MODULE_VERSION}"
|
||||
@ -93,6 +94,7 @@ configure_package_config_file(
|
||||
OATPP_MODULE_NAME
|
||||
OATPP_MODULE_VERSION
|
||||
OATPP_MODULE_LIBRARIES
|
||||
OATPP_MODULE_LIBDIR
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user