couch/scripting/CMakeLists.txt

25 lines
584 B
CMake
Raw Normal View History

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)
if (NOT WIN32)
swig_add_library(couchlua
TYPE SHARED
LANGUAGE lua
SOURCES couch.i lua/helpers.i)
else()
swig_add_library(couchlua
TYPE STATIC
LANGUAGE lua
SOURCES couch.i lua/helpers.i)
endif()
2021-01-26 16:42:28 -06:00
target_include_directories(couchlua PRIVATE "${PROJECT_SOURCE_DIR}/core")
swig_link_libraries(couchlua
PRIVATE
couchlib
${LUA_LIBRARIES})
2021-01-27 16:05:46 -06:00
endif ()