forked from bastibe/lunatic-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (24 loc) · 971 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
cmake_minimum_required(VERSION 2.8.8)
set(CMAKE_BUILD_TYPE_INIT "Release")
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})
project(Lunatic)
find_package(Lua51 REQUIRED)
find_package(PythonLibs REQUIRED)
include_directories(${LUA_INCLUDE_DIR})
include_directories(${PYTHON_INCLUDE_DIR})
add_subdirectory(src)
add_library(python MODULE $<TARGET_OBJECTS:src>)
set_target_properties(python PROPERTIES
PREFIX "")
add_library(lua MODULE $<TARGET_OBJECTS:src>)
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set_target_properties(lua PROPERTIES
PREFIX ""
SUFFIX ".pyd")
else ()
set_target_properties(lua PROPERTIES
PREFIX "")
endif ()
target_link_libraries(lua ${LUA_LIBRARIES} ${PYTHON_LIBRARIES})
target_link_libraries(python ${LUA_LIBRARIES} ${PYTHON_LIBRARIES})