-
Notifications
You must be signed in to change notification settings - Fork 0
/
y3c-config.cmake.in
37 lines (34 loc) · 1.42 KB
/
y3c-config.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@PACKAGE_INIT@
message(STATUS "y3c-stl @y3c_version_str@: ${PACKAGE_PREFIX_DIR}")
find_library(Y3C_DEBUG_LIB @y3c_lib_debug@ PATHS "${PACKAGE_PREFIX_DIR}/@libdir@")
find_library(Y3C_RELEASE_LIB @y3c_lib_release@ PATHS "${PACKAGE_PREFIX_DIR}/@libdir@")
add_library(y3c::y3c SHARED IMPORTED)
set_target_properties(y3c::y3c PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/@includedir@"
)
if(WIN32 OR CYGWIN OR MSYS)
set_target_properties(y3c::y3c PROPERTIES
IMPORTED_IMPLIB_DEBUG "${Y3C_DEBUG_LIB}"
IMPORTED_IMPLIB_RELEASE "${Y3C_RELEASE_LIB}"
IMPORTED_CONFIGURATIONS "DEBUG;RELEASE"
# WindowsでCMAKE_BUILD_TYPEがMinSizeRel,RelWithDebInfoの場合Releaseにリンクするようにする
MAP_IMPORTED_CONFIG_MINSIZEREL Release
MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release
)
elseif(APPLE)
set_target_properties(y3c::y3c PROPERTIES
IMPORTED_LOCATION "${Y3C_RELEASE_LIB}"
# MacではMesonがinstall_nameにprefixを絶対パスで入れるらしい (meson.build内で変更するオプション無い)
IMPORTED_SONAME "@prefix@/@libdir@/lib@y3c_lib_release@.@[email protected]"
)
elseif(UNIX)
set_target_properties(y3c::y3c PROPERTIES
IMPORTED_LOCATION "${Y3C_RELEASE_LIB}"
IMPORTED_SONAME "lib@[email protected].@y3c_abi_major@"
)
else()
message(FATAL_ERROR "Unsupported system?")
endif()
set_target_properties(y3c::y3c PROPERTIES
INTERFACE_COMPILE_FEATURES "cxx_std_11"
)