-
Notifications
You must be signed in to change notification settings - Fork 83
/
CMakeLists.txt
29 lines (22 loc) · 875 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
cmake_minimum_required(VERSION 3.12.0)
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(Lua 5.1 REQUIRED)
find_package(Python REQUIRED COMPONENTS Interpreter Development)
add_subdirectory(src)
add_library(python MODULE $<TARGET_OBJECTS:src>)
set_target_properties(python PROPERTIES
PREFIX "")
add_library(lua MODULE $<TARGET_OBJECTS:src>)
if (WIN32)
set_target_properties(lua PROPERTIES
PREFIX ""
SUFFIX ".pyd")
else (WIN32)
set_target_properties(lua PROPERTIES
PREFIX "")
endif (WIN32)
target_link_libraries(lua ${LUA_LIBRARIES} ${Python_LIBRARIES})
target_link_libraries(python ${LUA_LIBRARIES} ${Python_LIBRARIES})