forked from sony/nmos-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNmosCppExports.cmake
33 lines (26 loc) · 1.17 KB
/
NmosCppExports.cmake
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
# see https://cmake.org/cmake/help/latest/guide/importing-exporting/index.html
install(TARGETS ${NMOS_CPP_TARGETS}
EXPORT nmos-cpp-targets
LIBRARY DESTINATION ${NMOS_CPP_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${NMOS_CPP_INSTALL_LIBDIR}
RUNTIME DESTINATION ${NMOS_CPP_INSTALL_BINDIR}
)
install(EXPORT nmos-cpp-targets
FILE nmos-cpp-targets.cmake
NAMESPACE nmos-cpp::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nmos-cpp
)
include(CMakePackageConfigHelpers)
configure_package_config_file(cmake/nmos-cpp-config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/cmake/nmos-cpp-config.cmake"
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nmos-cpp
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/nmos-cpp-config.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nmos-cpp)
# export custom find-modules
# see https://discourse.cmake.org/t/exporting-packages-with-a-custom-find-module/3820
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/third_party/cmake/FindAvahi.cmake
${CMAKE_CURRENT_SOURCE_DIR}/third_party/cmake/FindDBus.cmake
${CMAKE_CURRENT_SOURCE_DIR}/third_party/cmake/FindDNSSD.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nmos-cpp
)