Skip to content

Commit cb47228

Browse files
committed
restore cmakelists order to reduce clutter
1 parent 5fdbc12 commit cb47228

File tree

4 files changed

+31
-25
lines changed

4 files changed

+31
-25
lines changed

components/core/CMakeLists.txt

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ validate_compiler_versions()
1212
# Include options for CLP build
1313
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/Options/options.cmake")
1414

15-
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/FindLibraryDependencies.cmake")
16-
1715
validate_and_setup_all_clp_dependency_flags()
1816
convert_clp_dependency_properties_to_variables()
1917

@@ -348,6 +346,7 @@ endif()
348346
# sqlite dependencies
349347
if(CLP_NEED_SQLITE)
350348
set(sqlite_DYNAMIC_LIBS "dl;m;pthread")
349+
include(cmake/Modules/FindLibraryDependencies.cmake)
351350
FindDynamicLibraryDependencies(sqlite "${sqlite_DYNAMIC_LIBS}")
352351
endif()
353352

@@ -758,29 +757,29 @@ if(CLP_BUILD_TESTING)
758757
${CLP_SQLITE3_INCLUDE_DIRECTORY}
759758
)
760759
target_link_libraries(unitTest
761-
PRIVATE
762-
${CURL_LIBRARIES}
763-
${MONGOCXX_TARGET}
764-
${sqlite_LIBRARY_DEPENDENCIES}
765-
${STD_FS_LIBS}
760+
PRIVATE
766761
absl::flat_hash_map
767762
Boost::filesystem Boost::iostreams Boost::program_options Boost::regex Boost::url
768763
Catch2::Catch2
769-
clp::regex_utils
770-
clp::string_utils
764+
${CURL_LIBRARIES}
771765
clp_s::search::ast
772766
clp_s::search::kql
773767
clp_s::search::sql
774768
clp_s::timestamp_pattern
775769
date::date
776770
fmt::fmt
777-
LibArchive::LibArchive
778771
log_surgeon::log_surgeon
772+
LibArchive::LibArchive
779773
MariaDBClient::MariaDBClient
774+
${MONGOCXX_TARGET}
780775
nlohmann_json::nlohmann_json
781-
OpenSSL::Crypto
782776
simdjson::simdjson
783777
spdlog::spdlog
778+
OpenSSL::Crypto
779+
${sqlite_LIBRARY_DEPENDENCIES}
780+
${STD_FS_LIBS}
781+
clp::regex_utils
782+
clp::string_utils
784783
yaml-cpp
785784
ystdlib::containers
786785
ystdlib::error_handling

components/core/cmake/Modules/FindLibArchive.cmake

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
# - Variables only for use within the script are prefixed with "libarchive_"
1313
# - Variables that should be externally visible are prefixed with "LibArchive_"
1414

15+
include(cmake/Modules/FindLibraryDependencies.cmake)
16+
1517
set(libarchive_LIBNAME "archive")
1618
set(libarchive_PKGCONFIG_DIR "${LibArchive_ROOT}/lib/pkgconfig")
1719

18-
include(cmake/Modules/FindLibraryDependencies.cmake)
19-
2020
# Run pkg-config
2121
find_package(PkgConfig)
2222
set(ENV{PKG_CONFIG_PATH} "${libarchive_PKGCONFIG_DIR};$ENV{PKG_CONFIG_PATH}")
@@ -43,7 +43,7 @@ find_library(LibArchive_LIBRARY
4343
HINTS ${libarchive_PKGCONF_LIBDIR}
4444
PATH_SUFFIXES lib
4545
)
46-
if (LibArchive_LIBRARY)
46+
if(LibArchive_LIBRARY)
4747
# NOTE: This must be set for find_package_handle_standard_args to work
4848
set(LibArchive_FOUND ON)
4949
endif()
@@ -57,8 +57,16 @@ if(LibArchive_USE_STATIC_LIBS)
5757
unset(libarchive_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
5858
endif()
5959

60+
if(APPLE)
61+
set(libarchive_DYNAMIC_LIBS "${libarchive_PKGCONF_STATIC_LIBRARIES}")
62+
endif()
63+
6064
FindDynamicLibraryDependencies(libarchive "${libarchive_DYNAMIC_LIBS}")
6165

66+
message(STATUS "libarchive_PKGCONF_STATIC_LIBRARIES = ${libarchive_PKGCONF_STATIC_LIBRARIES}")
67+
message(STATUS "libarchive_DYNAMIC_LIBS = ${libarchive_DYNAMIC_LIBS}")
68+
message(STATUS "libarchive_LIBRARY_DEPENDENCIES = ${libarchive_LIBRARY_DEPENDENCIES}")
69+
6270
# Set version
6371
set(LibArchive_VERSION ${libarchive_PKGCONF_VERSION})
6472

@@ -68,8 +76,6 @@ find_package_handle_standard_args(LibArchive
6876
VERSION_VAR LibArchive_VERSION
6977
)
7078

71-
message(STATUS "libarchive_PKGCONF_STATIC_LIBRARIES = ${libarchive_PKGCONF_STATIC_LIBRARIES}")
72-
message(STATUS "libarchive_LIBRARY_DEPENDENCIES = ${libarchive_LIBRARY_DEPENDENCIES}")
7379
if(NOT TARGET LibArchive::LibArchive)
7480
# Add library to build
7581
if (LibArchive_FOUND)
@@ -107,3 +113,4 @@ if(NOT TARGET LibArchive::LibArchive)
107113
endif()
108114
endif()
109115
endif()
116+

components/core/src/clp/clp/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,17 @@ if(CLP_BUILD_EXECUTABLES)
174174
)
175175
target_link_libraries(clp
176176
PRIVATE
177-
${sqlite_LIBRARY_DEPENDENCIES}
178-
${STD_FS_LIBS}
179177
Boost::filesystem Boost::program_options
180-
clp::string_utils
181178
date::date
182179
fmt::fmt
183-
LibArchive::LibArchive
184180
log_surgeon::log_surgeon
181+
spdlog::spdlog
182+
${sqlite_LIBRARY_DEPENDENCIES}
183+
LibArchive::LibArchive
185184
MariaDBClient::MariaDBClient
186185
nlohmann_json::nlohmann_json
187-
spdlog::spdlog
186+
${STD_FS_LIBS}
187+
clp::string_utils
188188
yaml-cpp
189189
ystdlib::containers
190190
ystdlib::error_handling

components/core/src/glt/glt/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,16 @@ if(CLP_BUILD_EXECUTABLES)
180180
)
181181
target_link_libraries(glt
182182
PRIVATE
183-
${sqlite_LIBRARY_DEPENDENCIES}
184-
${STD_FS_LIBS}
185183
Boost::filesystem Boost::iostreams Boost::program_options
186-
clp::string_utils
187184
date::date
188185
fmt::fmt
186+
spdlog::spdlog
187+
${sqlite_LIBRARY_DEPENDENCIES}
189188
LibArchive::LibArchive
190189
MariaDBClient::MariaDBClient
191190
nlohmann_json::nlohmann_json
192-
spdlog::spdlog
191+
${STD_FS_LIBS}
192+
clp::string_utils
193193
yaml-cpp
194194
ystdlib::error_handling
195195
ZStd::ZStd

0 commit comments

Comments
 (0)