This commit is contained in:
@ -9,17 +9,23 @@ set(CMAKE_EXE_LINKER_FLAGS "-static -static-libgcc -static-libstdc++")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
|
||||
# Find packages
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(fmt REQUIRED)
|
||||
find_package(spdlog REQUIRED)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# Find SQLite3 using pkg-config as fallback
|
||||
pkg_check_modules(SQLite3 REQUIRED sqlite3)
|
||||
|
||||
add_executable(test_libs test_libs.cpp)
|
||||
|
||||
target_link_libraries(test_libs
|
||||
fmt::fmt
|
||||
spdlog::spdlog
|
||||
SQLite3::SQLite3
|
||||
${SQLite3_STATIC_LIBRARIES}
|
||||
Threads::Threads
|
||||
rt
|
||||
)
|
||||
)
|
||||
|
||||
target_include_directories(test_libs PRIVATE ${SQLite3_INCLUDE_DIRS})
|
||||
target_compile_options(test_libs PRIVATE ${SQLite3_CFLAGS_OTHER})
|
Reference in New Issue
Block a user