17 lines
514 B
CMake
17 lines
514 B
CMake
|
# common/CMakeLists.txt
|
||
|
|
||
|
cmake_minimum_required(VERSION 3.10)
|
||
|
project(libsimworld VERSION 0.0.1 LANGUAGES C)
|
||
|
|
||
|
set(SOURCE_DIR ${CMAKE_SOURCE_DIR}/common/src)
|
||
|
file(GLOB_RECURSE SOURCES ${SOURCE_DIR}/*.c)
|
||
|
|
||
|
add_library(${PROJECT_NAME} SHARED ${SOURCES})
|
||
|
target_include_directories(${PROJECT_NAME} PUBLIC ${SOURCE_DIR})
|
||
|
|
||
|
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})
|