mirror of
https://github.com/marzer/tomlplusplus.git
synced 2024-11-02 02:26:28 +00:00
30 lines
961 B
Plaintext
30 lines
961 B
Plaintext
@PACKAGE_INIT@
|
|
|
|
# If tomlplusplus::tomlplusplus target is not defined it will be included
|
|
if(NOT TARGET tomlplusplus::tomlplusplus)
|
|
|
|
if (@compile_library@)
|
|
set(imported_type UNKNOWN)
|
|
else()
|
|
set(imported_type INTERFACE)
|
|
endif()
|
|
|
|
# Import tomlplusplus interface library
|
|
add_library(tomlplusplus::tomlplusplus ${imported_type} IMPORTED)
|
|
set_target_properties(tomlplusplus::tomlplusplus PROPERTIES
|
|
INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/@includedir@")
|
|
|
|
# Require C++17
|
|
target_compile_features(tomlplusplus::tomlplusplus INTERFACE cxx_std_17)
|
|
|
|
# Set the path to the installed library so that users can link to it
|
|
if (@compile_library@)
|
|
set_target_properties(tomlplusplus::tomlplusplus PROPERTIES
|
|
IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/@libdir@/@lib_name@"
|
|
)
|
|
# compile_options not quoted on purpose
|
|
target_compile_options(tomlplusplus::tomlplusplus INTERFACE @compile_options@)
|
|
endif()
|
|
|
|
endif()
|