Yay
This commit is contained in:
@@ -4,14 +4,20 @@ project(dropshell_template_registry)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Find required packages
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
|
||||
# Find all source files in src directory
|
||||
file(GLOB_RECURSE SOURCES
|
||||
"src/*.cpp"
|
||||
"hash.cpp"
|
||||
)
|
||||
|
||||
# Find all header files in src directory
|
||||
file(GLOB_RECURSE HEADERS
|
||||
"src/*.hpp"
|
||||
"hash.hpp"
|
||||
)
|
||||
|
||||
# Add include directories
|
||||
@@ -25,16 +31,19 @@ add_executable(dropshell_template_registry ${SOURCES})
|
||||
|
||||
# Link libraries
|
||||
target_link_libraries(dropshell_template_registry
|
||||
pthread
|
||||
ssl
|
||||
crypto
|
||||
Threads::Threads # Use modern Threads target
|
||||
SQLite::SQLite3 # Use SQLite3 target
|
||||
# ssl and crypto might still be needed by httplib if used
|
||||
# ssl
|
||||
# crypto
|
||||
)
|
||||
|
||||
# Set compile options for static linking
|
||||
set_target_properties(dropshell_template_registry PROPERTIES
|
||||
LINK_SEARCH_START_STATIC ON
|
||||
LINK_SEARCH_END_STATIC ON
|
||||
)
|
||||
# Note: Static linking SQLite might require additional setup depending on the system
|
||||
# set_target_properties(dropshell_template_registry PROPERTIES
|
||||
# LINK_SEARCH_START_STATIC ON
|
||||
# LINK_SEARCH_END_STATIC ON
|
||||
# )
|
||||
|
||||
# Install target
|
||||
install(TARGETS dropshell_template_registry
|
||||
|
Reference in New Issue
Block a user