mirror of
https://github.com/json-c/json-c.git
synced 2026-03-24 15:39:07 +08:00
cmake: add list for build targets
This commit is contained in:
@@ -392,7 +392,7 @@ add_library(${PROJECT_NAME}
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
VERSION 5.0.0
|
||||
SOVERSION 5)
|
||||
|
||||
list(APPEND CMAKE_TARGETS ${PROJECT_NAME})
|
||||
# If json-c is used as subroject it set to target correct interface -I flags and allow
|
||||
# to build external target without extra include_directories(...)
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
@@ -413,6 +413,7 @@ if (BUILD_STATIC_LIBS)
|
||||
set_target_properties(${ORIGINAL_STATIC_LIB_NAME} PROPERTIES
|
||||
OUTPUT_NAME ${PROJECT_NAME}
|
||||
)
|
||||
list(APPEND CMAKE_TARGETS ${STATIC_LIB})
|
||||
endif ()
|
||||
|
||||
# Always create new install dirs with 0755 permissions, regardless of umask
|
||||
@@ -426,7 +427,7 @@ set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
|
||||
WORLD_EXECUTE
|
||||
)
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
install(TARGETS ${CMAKE_TARGETS}
|
||||
EXPORT ${PROJECT_NAME}-targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
|
||||
Reference in New Issue
Block a user