2021-02-05 15:54:37 -06:00
|
|
|
find_package(SWIG REQUIRED)
|
2021-01-26 16:42:28 -06:00
|
|
|
include(UseSWIG)
|
|
|
|
set_property(SOURCE couch.i PROPERTY CPLUSPLUS ON)
|
|
|
|
set_property(SOURCE couch.i PROPERTY USE_TARGET_INCLUDE_DIRECTORIES ON)
|
|
|
|
|
2021-01-27 16:05:46 -06:00
|
|
|
if (LUA_ENABLED)
|
2021-04-07 13:13:04 -05:00
|
|
|
## Find Lua
|
2021-03-16 13:33:49 -05:00
|
|
|
swig_add_library(couchlua
|
|
|
|
TYPE STATIC
|
|
|
|
LANGUAGE lua
|
|
|
|
SOURCES couch.i lua/helpers.i)
|
2021-01-26 16:42:28 -06:00
|
|
|
|
2021-04-07 14:04:47 -05:00
|
|
|
target_include_directories(couchlua PRIVATE "${PROJECT_SOURCE_DIR}/core")
|
2021-03-16 13:33:49 -05:00
|
|
|
|
|
|
|
swig_link_libraries(couchlua
|
|
|
|
PRIVATE
|
|
|
|
couchlib
|
|
|
|
${LUA_LIBRARIES})
|
2021-01-27 16:05:46 -06:00
|
|
|
endif ()
|