28 lines
648 B
CMake
28 lines
648 B
CMake
cmake_minimum_required (VERSION 3.6)
|
|
project(wterm LANGUAGES C)
|
|
|
|
set(CMAKE_C_STANDARD 23)
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
set(CMAKE_C_FLAGS "-ffunction-sections -fdata-sections")
|
|
if (APPLE)
|
|
elseif (UNIX)
|
|
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections")
|
|
endif()
|
|
|
|
include_directories(./src/lib/ ./src ${SQLite3_INCLUDE_DIRS})
|
|
|
|
FILE(GLOB SOURCES src/*.c src/lib/*.c src/file_db/*.c src/config/*.c src/api/*.c src/database/*.c src/security/*.c src/utils/*.c)
|
|
|
|
option(USE_WERROR "Enable SQLite3 support" OFF)
|
|
|
|
if(USE_WERROR)
|
|
add_definitions(-Werror)
|
|
endif()
|
|
|
|
add_executable(
|
|
wterm
|
|
${SOURCES}
|
|
)
|
|
|
|
target_link_libraries(wterm pthread)
|