You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Let bundled JsonCpp satisfy requirement
This commit is contained in:
@@ -271,14 +271,22 @@ if (USE_SYSTEM_JSONCPP)
|
||||
endif ()
|
||||
|
||||
if (NOT JSONCPP_FOUND AND NOT DISABLE_BUNDLED_JSONCPP)
|
||||
message(STATUS "Using embedded JsonCpp (not found or USE_SYSTEM_JSONCPP disabled)")
|
||||
message(STATUS "Using embedded JsonCpp (not found or USE_SYSTEM_JSONCPP disabled)")
|
||||
if (NOT TARGET jsoncpp_lib)
|
||||
add_library(jsoncpp_lib INTERFACE)
|
||||
target_include_directories(jsoncpp_lib INTERFACE
|
||||
"${PROJECT_SOURCE_DIR}/thirdparty/jsoncpp")
|
||||
target_sources(jsoncpp_lib INTERFACE "${PROJECT_SOURCE_DIR}/thirdparty/jsoncpp/jsoncpp.cpp")
|
||||
target_sources(jsoncpp_lib INTERFACE "${PROJECT_SOURCE_DIR}/thirdparty/jsoncpp/jsoncpp.cpp")
|
||||
# Because this satisfies the requirement, an installed JsonCpp is optional
|
||||
set_package_properties(JsonCpp PROPERTIES TYPE OPTIONAL)
|
||||
endif ()
|
||||
add_feature_info("JsonCpp (embedded)" TRUE "JsonCpp will be compiled from the bundled sources")
|
||||
add_feature_info("JsonCpp (embedded)" TRUE "JsonCpp will be compiled from the bundled sources")
|
||||
endif ()
|
||||
|
||||
if (JSONCPP_FOUND)
|
||||
# JsonCpp is actually required, even though we probe for it optionally
|
||||
# (This tells feature_summary() to bail if it's not found, later)
|
||||
set_package_properties(JsonCpp PROPERTIES TYPE REQUIRED)
|
||||
endif ()
|
||||
|
||||
# If we found any usable JsonCpp, use it. Otherwise, bail.
|
||||
@@ -286,10 +294,6 @@ if (TARGET jsoncpp_lib)
|
||||
target_link_libraries(openshot PUBLIC jsoncpp_lib)
|
||||
endif ()
|
||||
|
||||
# JsonCpp is actually required, even though we probe for it optionally
|
||||
# (This tells feature_summary() to bail if it's not found, later)
|
||||
set_package_properties(JsonCpp PROPERTIES TYPE REQUIRED)
|
||||
|
||||
############### LINK LIBRARY #################
|
||||
SET ( REQUIRED_LIBRARIES
|
||||
${LIBOPENSHOT_AUDIO_LIBRARIES}
|
||||
|
||||
Reference in New Issue
Block a user