cmake_minimum_required(VERSION 3.10) project(simple_object_storage) # Set the build type to Debug #set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type (e.g., Debug, Release)" FORCE) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) # Linking flags (removed -static) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") set(BUILD_SHARED_LIBS OFF) # 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 include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src ) # Create executable add_executable(simple_object_storage ${SOURCES}) # Remove specific static flags as CMAKE_EXE_LINKER_FLAGS handles it now target_link_libraries(simple_object_storage ) # Install target install(TARGETS simple_object_storage RUNTIME DESTINATION bin )