File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ @PACKAGE_INIT@
2
+
3
+ include ("${CMAKE_CURRENT_LIST_DIR} /@PROJECT_NAME@-targets.cmake" )
4
+
5
+ check_required_components(@PROJECT_NAME @)
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ if(SECP256K1_BUILD_CTIME_TESTS)
102
102
endif ()
103
103
104
104
install (TARGETS ${${PROJECT_NAME} _installables}
105
+ EXPORT ${PROJECT_NAME} -targets
105
106
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
106
107
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
107
108
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
@@ -125,3 +126,26 @@ endif()
125
126
install (FILES ${${PROJECT_NAME} _headers}
126
127
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
127
128
)
129
+
130
+ install (EXPORT ${PROJECT_NAME} -targets
131
+ FILE ${PROJECT_NAME} -targets.cmake
132
+ NAMESPACE ${PROJECT_NAME} ::
133
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${PROJECT_NAME}
134
+ )
135
+
136
+ include (CMakePackageConfigHelpers)
137
+ configure_package_config_file(
138
+ ${PROJECT_SOURCE_DIR} /cmake/config.cmake.in
139
+ ${PROJECT_NAME} -config.cmake
140
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${PROJECT_NAME}
141
+ NO_SET_AND_CHECK_MACRO
142
+ )
143
+ write_basic_package_version_file(${PROJECT_NAME} -config-version .cmake
144
+ COMPATIBILITY SameMajorVersion
145
+ )
146
+ install (
147
+ FILES
148
+ ${CMAKE_CURRENT_BINARY_DIR} /${PROJECT_NAME} -config.cmake
149
+ ${CMAKE_CURRENT_BINARY_DIR} /${PROJECT_NAME} -config-version .cmake
150
+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${PROJECT_NAME}
151
+ )
You can’t perform that action at this time.
0 commit comments