source: nscp/modules/LUAScript/CMakeLists.txt @ 53be5c8

0.4.10.4.2
Last change on this file since 53be5c8 was 53be5c8, checked in by Michael Medin <michael@…>, 11 months ago
  • LUAScript: Improved lua scripting module a lot
  • LUAScript: Added protocol buffer support to lua scripts
  • tests: Rewrote (halfway there) test_nrpe python script as a lua script.
  • CheckEventLog: Fixed command name when submitting real-time "no action checks"
  • Property mode set to 100644
File size: 897 bytes
Line 
1cmake_minimum_required(VERSION 2.6)
2
3SET(TARGET LUAScript)
4       
5PROJECT(${TARGET})
6
7SET(SRCS
8        stdafx.cpp
9        "${TARGET}.cpp"
10        lua_wrappers.cpp
11
12        ${NSCP_DEF_PLUGIN_CPP}
13)
14
15ADD_DEFINITIONS(${NSCP_GLOBAL_DEFINES})
16INCLUDE_DIRECTORIES(${LUA_INCLUE_DIR})
17
18IF(WIN32)
19        SET(SRCS ${SRCS}
20                stdafx.h
21                "${TARGET}.h"
22                "${TARGET}.def"
23                lua_wrappers.hpp
24                script_wrapper.hpp
25
26                ${NSCP_DEF_PLUGIN_HPP}
27        )
28ENDIF(WIN32)
29
30add_library(${TARGET} MODULE ${SRCS})
31
32SET(LUA_PB)
33IF (PROTOC_GEN_LUA_FOUND)
34        MESSAGE(STATUS "Lua has PB support")
35        SET(LUA_PB lua_pb_static)
36        ADD_DEFINITIONS(-DHAVE_LUA_PB)
37        INCLUDE_DIRECTORIES(${NSCP_PROJECT_BINARY_DIR}/libs/lua_pb)
38        INCLUDE_DIRECTORIES(${NSCP_PROJECT_BINARY_DIR}/libs/protobuf)
39ENDIF()
40
41
42target_link_libraries(${TARGET}
43        ${Boost_FILESYSTEM_LIBRARY}
44        ${Boost_PROGRAM_OPTIONS_LIBRARY}
45        ${NSCP_DEF_PLUGIN_LIB}
46        lua_static
47        ${LUA_PB}
48)
49INCLUDE(${BUILD_CMAKE_FOLDER}/module.cmake)
Note: See TracBrowser for help on using the repository browser.