simworld/common/CMakeLists.txt

18 lines
533 B
CMake
Raw Normal View History

# 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)
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)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LUA REQUIRED lua)
target_link_libraries(${PROJECT_NAME} ${LUA_LIBRARIES})
2024-10-03 00:42:30 +00:00
target_include_directories(${PROJECT_NAME} PRIVATE ${LUA_INCLUDE_DIRS})