2019-04-11 11:03:30 +10:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
project(lg_common LANGUAGES C)
|
|
|
|
|
2021-02-28 19:51:54 -05:00
|
|
|
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/")
|
|
|
|
|
2019-04-11 11:03:30 +10:00
|
|
|
include_directories(
|
2022-05-28 14:45:13 -04:00
|
|
|
${PROJECT_SOURCE_DIR}/include
|
2019-04-11 11:03:30 +10:00
|
|
|
)
|
|
|
|
|
2020-08-10 16:22:02 +10:00
|
|
|
add_definitions(-D_GNU_SOURCE)
|
|
|
|
|
2019-06-19 09:13:03 +10:00
|
|
|
if(ENABLE_BACKTRACE)
|
|
|
|
add_definitions(-DENABLE_BACKTRACE)
|
|
|
|
endif()
|
|
|
|
|
2021-02-22 01:54:46 +11:00
|
|
|
if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|
|
|
add_compile_options(
|
|
|
|
"-Wno-unknown-warning-option"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-01-02 22:21:42 +11:00
|
|
|
add_subdirectory(src/platform)
|
|
|
|
|
2019-05-23 16:54:50 +10:00
|
|
|
set(COMMON_SOURCES
|
2021-08-04 10:27:47 +10:00
|
|
|
src/appstrings.c
|
2019-05-21 11:30:57 +10:00
|
|
|
src/stringutils.c
|
2019-05-12 16:13:50 +10:00
|
|
|
src/stringlist.c
|
2019-05-09 22:06:58 +10:00
|
|
|
src/option.c
|
2019-10-01 23:17:20 +10:00
|
|
|
src/framebuffer.c
|
2020-10-12 19:43:29 +11:00
|
|
|
src/KVMFR.c
|
2021-02-11 04:01:52 -05:00
|
|
|
src/countedbuffer.c
|
2021-08-06 23:51:07 -04:00
|
|
|
src/rects.c
|
2021-06-06 09:35:50 +10:00
|
|
|
src/runningavg.c
|
2021-07-09 01:53:06 +10:00
|
|
|
src/ringbuffer.c
|
2021-08-22 03:38:13 -04:00
|
|
|
src/vector.c
|
2021-08-30 20:10:45 -04:00
|
|
|
src/cpuinfo.c
|
2021-12-29 16:01:42 +11:00
|
|
|
src/debug.c
|
2022-01-12 12:22:18 +11:00
|
|
|
src/ll.c
|
2019-05-09 22:06:58 +10:00
|
|
|
)
|
|
|
|
|
2020-01-02 22:21:42 +11:00
|
|
|
add_library(lg_common STATIC ${COMMON_SOURCES})
|
|
|
|
target_link_libraries(lg_common lg_common_platform)
|
2019-04-11 11:03:30 +10:00
|
|
|
|
|
|
|
target_include_directories(lg_common
|
2022-05-28 14:45:13 -04:00
|
|
|
INTERFACE
|
|
|
|
include
|
|
|
|
PRIVATE
|
|
|
|
src
|
2019-04-11 11:03:30 +10:00
|
|
|
)
|