From 229222b6eb2c7794c84569bf9e3954de514d7fed Mon Sep 17 00:00:00 2001 From: jasonshweiri <109555566+jasonshweiri@users.noreply.github.com> Date: Mon, 12 Jun 2023 14:04:03 -0700 Subject: [PATCH 1/5] BXB-4250 Look for jsoncpp in media-deps (#1) --- aircore/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 aircore/CMakeLists.txt diff --git a/aircore/CMakeLists.txt b/aircore/CMakeLists.txt new file mode 100644 index 000000000..62de912dc --- /dev/null +++ b/aircore/CMakeLists.txt @@ -0,0 +1,8 @@ +# needed since we skip the main jsoncpp cmake file that defines this +set(ARCHIVE_INSTALL_DIR lib) +add_subdirectory(${at_media_deps_dir}/jsoncpp/src ${at_media_deps_dir}/jsoncpp/src) +set(jsoncpp_includes ${at_media_deps_dir}/jsoncpp/include) +target_include_directories(jsoncpp_lib PUBLIC ${jsoncpp_includes}) +add_library(at_jsoncpp INTERFACE) +target_include_directories(at_jsoncpp INTERFACE ${jsoncpp_includes}) +target_link_libraries(at_jsoncpp INTERFACE jsoncpp_lib) \ No newline at end of file From 6202da5a6eeb4f6c8a8422cc78a75dcbddcf6cb8 Mon Sep 17 00:00:00 2001 From: jasonshweiri <109555566+jasonshweiri@users.noreply.github.com> Date: Thu, 15 Jun 2023 15:10:38 -0700 Subject: [PATCH 2/5] BXB-4250 Fix binary output dir (#2) --- aircore/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aircore/CMakeLists.txt b/aircore/CMakeLists.txt index 62de912dc..6db05c7e6 100644 --- a/aircore/CMakeLists.txt +++ b/aircore/CMakeLists.txt @@ -1,6 +1,6 @@ # needed since we skip the main jsoncpp cmake file that defines this set(ARCHIVE_INSTALL_DIR lib) -add_subdirectory(${at_media_deps_dir}/jsoncpp/src ${at_media_deps_dir}/jsoncpp/src) +add_subdirectory(${at_media_deps_dir}/jsoncpp/src ${CMAKE_BINARY_DIR}/jsoncpp/src) set(jsoncpp_includes ${at_media_deps_dir}/jsoncpp/include) target_include_directories(jsoncpp_lib PUBLIC ${jsoncpp_includes}) add_library(at_jsoncpp INTERFACE) From 01eeedf650c24818f9c9fc1e8cd21075f15fd428 Mon Sep 17 00:00:00 2001 From: jasonshweiri <109555566+jasonshweiri@users.noreply.github.com> Date: Mon, 12 Jun 2023 14:04:03 -0700 Subject: [PATCH 3/5] BXB-4250 Look for jsoncpp in media-deps (#1) --- aircore/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 aircore/CMakeLists.txt diff --git a/aircore/CMakeLists.txt b/aircore/CMakeLists.txt new file mode 100644 index 000000000..62de912dc --- /dev/null +++ b/aircore/CMakeLists.txt @@ -0,0 +1,8 @@ +# needed since we skip the main jsoncpp cmake file that defines this +set(ARCHIVE_INSTALL_DIR lib) +add_subdirectory(${at_media_deps_dir}/jsoncpp/src ${at_media_deps_dir}/jsoncpp/src) +set(jsoncpp_includes ${at_media_deps_dir}/jsoncpp/include) +target_include_directories(jsoncpp_lib PUBLIC ${jsoncpp_includes}) +add_library(at_jsoncpp INTERFACE) +target_include_directories(at_jsoncpp INTERFACE ${jsoncpp_includes}) +target_link_libraries(at_jsoncpp INTERFACE jsoncpp_lib) \ No newline at end of file From e0fc7d1fd96674b6d08e1fa19dd75ef9d85d7bb9 Mon Sep 17 00:00:00 2001 From: jasonshweiri <109555566+jasonshweiri@users.noreply.github.com> Date: Thu, 15 Jun 2023 15:10:38 -0700 Subject: [PATCH 4/5] BXB-4250 Fix binary output dir (#2) --- aircore/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aircore/CMakeLists.txt b/aircore/CMakeLists.txt index 62de912dc..6db05c7e6 100644 --- a/aircore/CMakeLists.txt +++ b/aircore/CMakeLists.txt @@ -1,6 +1,6 @@ # needed since we skip the main jsoncpp cmake file that defines this set(ARCHIVE_INSTALL_DIR lib) -add_subdirectory(${at_media_deps_dir}/jsoncpp/src ${at_media_deps_dir}/jsoncpp/src) +add_subdirectory(${at_media_deps_dir}/jsoncpp/src ${CMAKE_BINARY_DIR}/jsoncpp/src) set(jsoncpp_includes ${at_media_deps_dir}/jsoncpp/include) target_include_directories(jsoncpp_lib PUBLIC ${jsoncpp_includes}) add_library(at_jsoncpp INTERFACE) From 172e401610df72459df189fdb7da35b0121dfd17 Mon Sep 17 00:00:00 2001 From: Matthew MacGregor Date: Wed, 14 Jun 2023 16:48:11 -0700 Subject: [PATCH 5/5] BXB-4263 Enable CMake for jsoncpp 1.9.5 A change in jsoncpp's CMake file led to it naming the library targets based off of the PROJECT_NAME variable. So this was incorrectly adding the jsoncpp library target as "mediacore_lib" or something similar depending on the top level directory. Manually setting this to jsoncpp makes the library target created as expected. Additionally, a change led to BUILD_SHARED_LIBS needing to be turned on manually. --- aircore/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aircore/CMakeLists.txt b/aircore/CMakeLists.txt index 6db05c7e6..895a2f9a5 100644 --- a/aircore/CMakeLists.txt +++ b/aircore/CMakeLists.txt @@ -1,8 +1,12 @@ # needed since we skip the main jsoncpp cmake file that defines this set(ARCHIVE_INSTALL_DIR lib) +set(BUILD_STATIC_LIBS ON) +set(BUILD_SHARED_LIBS OFF) +set(PROJECT_NAME "jsoncpp") +set(PROJECT_VERSION 1.9.5) add_subdirectory(${at_media_deps_dir}/jsoncpp/src ${CMAKE_BINARY_DIR}/jsoncpp/src) set(jsoncpp_includes ${at_media_deps_dir}/jsoncpp/include) -target_include_directories(jsoncpp_lib PUBLIC ${jsoncpp_includes}) +target_include_directories(jsoncpp_static PUBLIC ${jsoncpp_includes}) add_library(at_jsoncpp INTERFACE) target_include_directories(at_jsoncpp INTERFACE ${jsoncpp_includes}) -target_link_libraries(at_jsoncpp INTERFACE jsoncpp_lib) \ No newline at end of file +target_link_libraries(at_jsoncpp INTERFACE jsoncpp_static)