Files
auth_service_c/CMakeLists.txt
T
wt d14db43e9b
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Make (push) Successful in 14s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-CMake (push) Failing after 9s
Prepare Build and Testing executable binary / Prepare-Build-Testing-With-Meson (push) Successful in 12s
updated file database added get_all_users get_user_by_id
get_user_by_username get_user_field_by_id
2025-10-22 16:46:36 +07:00

36 lines
836 B
CMake

cmake_minimum_required (VERSION 3.6)
project(auth_service LANGUAGES C)
set(CMAKE_C_STANDARD 23)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections")
include_directories(./src/lib/ ${SQLite3_INCLUDE_DIRS})
FILE(GLOB_RECURSE SOURCES src/*.c)
option(USE_SQLITE3 "Enable SQLite3 support" OFF)
option(USE_WERROR "Enable SQLite3 support" OFF)
if(USE_SQLITE3)
find_package(SQLite3 REQUIRED)
pkg_check_modules(SQLITE3 REQUIRED sqlite3)
add_definitions(-DUSE_SQLITE3)
endif()
if(USE_WERROR)
add_definitions(-Werror)
endif()
add_executable(
auth_service
${SOURCES}
)
if(USE_SQLITE3)
target_link_libraries(auth_service ssl crypto sqlite3 pthread)
else()
target_link_libraries(auth_service ssl crypto pthread)
endif()