couch/scripting/CMakeLists.txt
2021-04-07 13:14:18 -05:00

24 lines
520 B
CMake

find_package(SWIG REQUIRED)
include(UseSWIG)
set_property(SOURCE couch.i PROPERTY CPLUSPLUS ON)
set_property(SOURCE couch.i PROPERTY USE_TARGET_INCLUDE_DIRECTORIES ON)
if (LUA_ENABLED)
## Find Lua
find_package(Lua REQUIRED)
swig_add_library(couchlua
TYPE STATIC
LANGUAGE lua
SOURCES couch.i lua/helpers.i)
target_include_directories(couchlua PRIVATE
"${PROJECT_SOURCE_DIR}/core"
"${LUA_INCLUDE_DIR}")
swig_link_libraries(couchlua
PRIVATE
couchlib
${LUA_LIBRARIES})
endif ()