sphere-source-x/lib/sqlite/CMakeLists.txt
cbnolok 6cdf242da1 CMake: external libs are now compiled as obj files, without an intermediate link-in-a-library stage.
This speeds up overall compilation, since only one link pass is done,
instead of one per target.
2025-05-09 20:08:22 +02:00

19 lines
735 B
CMake

cmake_minimum_required(VERSION 3.19)
project(sqlite C)
set(lib_SOURCES sqlite/sqlite3.c sqlite/sqlite3.h)
# add to the proper directories in the solution explorer (eg. Visual Studio)
source_group(lib\\sqlite FILES ${lib_SOURCES})
# create the target. equivalent to add_executable, but for libraries
add_library(sqlite OBJECT ${lib_SOURCES})
# make the headers available in the include path (accessible with < >).
target_include_directories(sqlite PUBLIC .)
# set compiler flags
include("../lib_build_flags_common_c.cmake")
target_compile_options(sqlite PRIVATE ${c_compiler_options_common})
target_compile_definitions(sqlite PRIVATE ${c_compiler_definitions_common})
target_link_options(sqlite PRIVATE ${c_linker_options_common})