2019-04-11 01:03:30 +00:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
project(lg_common LANGUAGES C)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${PROJECT_SOURCE_DIR}/include
|
|
|
|
)
|
|
|
|
|
2020-08-10 06:22:02 +00:00
|
|
|
add_definitions(-D_GNU_SOURCE)
|
|
|
|
|
2019-06-18 23:13:03 +00:00
|
|
|
if(ENABLE_BACKTRACE)
|
|
|
|
add_definitions(-DENABLE_BACKTRACE)
|
|
|
|
endif()
|
|
|
|
|
2020-01-02 11:21:42 +00:00
|
|
|
add_subdirectory(src/platform)
|
|
|
|
|
2019-05-23 06:54:50 +00:00
|
|
|
set(COMMON_SOURCES
|
2019-05-21 01:30:57 +00:00
|
|
|
src/stringutils.c
|
2019-05-12 06:13:50 +00:00
|
|
|
src/stringlist.c
|
2019-05-09 12:06:58 +00:00
|
|
|
src/option.c
|
2019-10-01 13:17:20 +00:00
|
|
|
src/framebuffer.c
|
2019-05-09 12:06:58 +00:00
|
|
|
)
|
|
|
|
|
2020-01-02 11:21:42 +00:00
|
|
|
add_library(lg_common STATIC ${COMMON_SOURCES})
|
|
|
|
target_link_libraries(lg_common lg_common_platform)
|
2019-04-11 01:03:30 +00:00
|
|
|
|
|
|
|
target_include_directories(lg_common
|
|
|
|
INTERFACE
|
|
|
|
include
|
|
|
|
PRIVATE
|
|
|
|
src
|
|
|
|
)
|