2024-10-02 20:43:44 +00:00
|
|
|
# common/CMakeLists.txt
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.10)
|
2024-10-03 00:42:30 +00:00
|
|
|
project(simworld VERSION 0.0.1 LANGUAGES C)
|
2024-10-02 20:43:44 +00:00
|
|
|
|
|
|
|
set(SOURCE_DIR ${CMAKE_SOURCE_DIR}/common/src)
|
|
|
|
file(GLOB_RECURSE SOURCES ${SOURCE_DIR}/*.c)
|
|
|
|
|
|
|
|
add_library(${PROJECT_NAME} SHARED ${SOURCES})
|
2024-10-03 00:42:30 +00:00
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/common/include)
|
2024-10-02 20:43:44 +00:00
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(LUA REQUIRED lua)
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} ${LUA_LIBRARIES})
|
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE ${LUA_INCLUDE_DIRS})
|