File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 55cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
66include (GenerateExportHeader)
77include (GNUInstallDirs)
8+ include (CMakePackageConfigHelpers)
89
910project (Zycore VERSION 1.0.0.0 LANGUAGES C CXX)
1011
@@ -190,7 +191,15 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT ZYAN_NO_LIBC)
190191 target_link_libraries ("Zycore" Threads::Threads)
191192endif ()
192193
193- # TODO: Install CMake config.
194+ configure_package_config_file(cmake/zycore-config.cmake.in
195+ "${CMAKE_CURRENT_BINARY_DIR} /zycore-config.cmake"
196+ INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX} /cmake"
197+ )
198+ install (FILES
199+ "${CMAKE_CURRENT_BINARY_DIR} /zycore-config.cmake"
200+ DESTINATION "${CMAKE_INSTALL_PREFIX} /cmake"
201+ )
202+
194203install (TARGETS "Zycore"
195204 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
196205 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Original file line number Diff line number Diff line change 1+ set (zycore_VERSION @PROJECT_VERSION@)
2+
3+ @PACKAGE_INIT@
4+
5+ set_and_check(zycore_INCLUDE_DIR "${PACKAGE_PREFIX_DIR} /@CMAKE_INSTALL_INCLUDEDIR@" )
6+ set_and_check(zycore_LIB_DIR "${PACKAGE_PREFIX_DIR} /@CMAKE_INSTALL_LIBDIR@" )
7+
8+ check_required_components(zycore)
You can’t perform that action at this time.
0 commit comments