Added support to export cmake targets
This commit is contained in:
parent
1688c54a6e
commit
b363160d52
@ -45,6 +45,7 @@ set_target_properties(json-schema-validator
|
|||||||
SOVERSION 1)
|
SOVERSION 1)
|
||||||
|
|
||||||
install(TARGETS json-schema-validator
|
install(TARGETS json-schema-validator
|
||||||
|
EXPORT json-schema-validator
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
RUNTIME DESTINATION bin)
|
RUNTIME DESTINATION bin)
|
||||||
@ -55,7 +56,8 @@ install(DIRECTORY src/
|
|||||||
|
|
||||||
target_include_directories(json-schema-validator
|
target_include_directories(json-schema-validator
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src)
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
||||||
|
$<INSTALL_INTERFACE:include>)
|
||||||
|
|
||||||
target_compile_features(json-schema-validator
|
target_compile_features(json-schema-validator
|
||||||
PUBLIC
|
PUBLIC
|
||||||
@ -117,3 +119,7 @@ if (BUILD_TESTS)
|
|||||||
enable_testing()
|
enable_testing()
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
install ( EXPORT json-schema-validator
|
||||||
|
NAMESPACE json-schema-validator::
|
||||||
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" )
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user