-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
64 lines (44 loc) · 1.85 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required (VERSION 3.4)
project(lifelong)
set(CMAKE_CXX_STANDARD 11)
# Let cmake build for python 3.8
find_package(Python 3.8 COMPONENTS Interpreter Development REQUIRED)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "RELEASE")
#SET(CMAKE_BUILD_TYPE "RELWITHDEBINFO")
#SET(CMAKE_BUILD_TYPE "MINSIZEREL")
ENDIF()
include_directories("RHCR/inc")
# Get the source files except for the main API .cpp file
file(GLOB SOURCES "RHCR/src/*.cpp")
list(FILTER SOURCES EXCLUDE REGEX "RHCR/src/WarehouseSimulation.cpp")
# Find Boost
find_package( Boost 1.71.0 REQUIRED COMPONENTS program_options system filesystem)
include_directories( ${Boost_INCLUDE_DIRS} )
# Add pybind11 module
add_subdirectory(pybind11)
# Need to add other source files so that pybind11 can find the implementations
pybind11_add_module(warehouse_sim "RHCR/src/WarehouseSimulation.cpp" ${SOURCES})
target_link_libraries(warehouse_sim PRIVATE ${Boost_LIBRARIES})
# # Add lifelone executable
# add_executable(lifelong ${SOURCES} )
# target_link_libraries(lifelong ${Boost_LIBRARIES})
# ============================================================================ #
# project(lifelong)
# cmake_minimum_required (VERSION 2.6)
# set(CMAKE_CXX_STANDARD 11)
# IF(NOT CMAKE_BUILD_TYPE)
# #SET(CMAKE_BUILD_TYPE "DEBUG")
# SET(CMAKE_BUILD_TYPE "RELEASE")
# #SET(CMAKE_BUILD_TYPE "RELWITHDEBINFO")
# #SET(CMAKE_BUILD_TYPE "MINSIZEREL")
# ENDIF()
# include_directories("RHCR/inc")
# # Get the source files except for the main API .cpp file
# file(GLOB SOURCES "RHCR/src/*.cpp")
# list(FILTER SOURCES EXCLUDE REGEX "RHCR/src/WarehouseSimulation.cpp")
# # Find Boost
# find_package( Boost 1.49.0 REQUIRED COMPONENTS program_options system filesystem)
# include_directories( ${Boost_INCLUDE_DIRS} )
# add_executable(lifelong ${SOURCES} )
# target_link_libraries(lifelong ${Boost_LIBRARIES})