Files
TinyORM/cmake/TinyOrmBuildTreeConfig.cmake.in
silverqx 5c4f4fbe16 drivers finished CMake build
Fixed:

 - deployment
 - package config file
 - generating targets
 - installing header and PDB files
 - exporting targets
2024-04-07 18:11:56 +02:00

86 lines
2.8 KiB
CMake

# Config file for the @PROJECT_NAME@ package
# It defines the @TinyOrm_ns@::@TinyOrm_target@ target to link against
@PACKAGE_INIT@
list(APPEND CMAKE_MESSAGE_CONTEXT @TinyOrm_target@ CF)
# Information about build type used in the info message
if(@cvf_is_multi_config@)
set(tiny_build_type " Multi-Config")
else()
set(tiny_build_type " @CMAKE_BUILD_TYPE@")
endif()
# Info message about found package
message(STATUS "Found package ${CMAKE_FIND_PACKAGE_NAME} \
${${CMAKE_FIND_PACKAGE_NAME}_VERSION}${tiny_build_type} (requested \
${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_COMPLETE}) at ${CMAKE_CURRENT_LIST_FILE}")
unset(tiny_build_type)
# Info message about matching build type
if(NOT isMultiConfig)
set(matchBuildType "disabled")
if(@MATCH_EQUAL_EXPORTED_BUILDTREE@)
set(matchBuildType "enabled")
endif()
message(VERBOSE "Matching build type for the @PROJECT_NAME@ \
${${CMAKE_FIND_PACKAGE_NAME}_VERSION} package build tree was ${matchBuildType}")
unset(matchBuildType)
endif()
message(CHECK_START "Configuring @PROJECT_NAME@ package")
list(APPEND CMAKE_MESSAGE_INDENT " ")
@tiny_cmake_module_path@
include(CMakeFindDependencyMacro)
@tiny_find_dependency_calls@
# Include target files that contain IMPORTED targets
@tiny_target_includes@
# Set up meaningful values for MAP_IMPORTED_CONFIG_<CONFIG>, these are good defaults and
# it helps to avoid link a release type builds against a debug build
set(tiny_map_release Release RelWithDebInfo MinSizeRel)
set(tiny_map_relwithdebinfo RelWithDebInfo Release MinSizeRel)
set(tiny_map_minsizerel MinSizeRel RelWithDebInfo Release)
# MSVC runtime library crashes if you do not link a debug build against a debug build
if(MSVC)
set(tiny_map_debug Debug)
else()
set(tiny_map_debug Debug Debug RelWithDebInfo Release MinSizeRel)
endif()
set_target_properties(@TinyOrm_ns@::@TinyOrm_target@ PROPERTIES
MAP_IMPORTED_CONFIG_RELEASE "${tiny_map_release}"
MAP_IMPORTED_CONFIG_RELWITHDEBINFO "${tiny_map_relwithdebinfo}"
MAP_IMPORTED_CONFIG_MINSIZEREL "${tiny_map_minsizerel}"
MAP_IMPORTED_CONFIG_DEBUG "${tiny_map_debug}"
)
message(DEBUG "Setting CMAKE_MAP_IMPORTED_CONFIG_<CONFIG> for the \
@TinyOrm_ns@::@TinyOrm_target@ target to avoid link a release type builds against \
a debug build
* CMAKE_MAP_IMPORTED_CONFIG_RELEASE = ${tiny_map_release}
* CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO = ${tiny_map_relwithdebinfo}
* CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL = ${tiny_map_minsizerel}
* CMAKE_MAP_IMPORTED_CONFIG_DEBUG = ${tiny_map_debug}
")
unset(tiny_map_release)
unset(tiny_map_relwithdebinfo)
unset(tiny_map_minsizerel)
unset(tiny_map_debug)
check_required_components(@TinyOrm_ns@)
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "done")
list(POP_BACK CMAKE_MESSAGE_CONTEXT)
list(POP_BACK CMAKE_MESSAGE_CONTEXT)