This commit is contained in:
Your Name
2025-05-03 11:53:12 +12:00
parent dc6586388c
commit b031d25a64
8 changed files with 276173 additions and 25 deletions

View File

@@ -4,28 +4,16 @@ project(simple_object_storage)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# --- Static Linking & Musl Flags ---
# Prioritize static libraries (.a)
set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
# General flags often used for static musl builds
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static") # Also for shared libs if any were built
# Optional: Force PIC for static libs if needed, though often handled by toolchain
# set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# --- End Static Linking & Musl Flags ---
# Find required packages (will now prefer .a files)
find_package(SQLite3 REQUIRED)
# Find all source files in src directory
file(GLOB_RECURSE SOURCES
"src/*.cpp"
"src/sqlite3/*.c"
)
# Find all header files in src directory
file(GLOB_RECURSE HEADERS
"src/*.hpp"
"src/sqlite3/*.h"
)
# Add include directories
@@ -39,7 +27,6 @@ add_executable(simple_object_storage ${SOURCES})
# Link libraries (CMake should find static versions now)
target_link_libraries(simple_object_storage
SQLite::SQLite3
)
# Install target