forked from leggedrobotics/raisimGym
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
27 lines (22 loc) · 1.29 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
cmake_minimum_required(VERSION 3.10)
project(_raisim_gym)
set(CMAKE_CXX_STANDARD 14)
find_package(pybind11 2.3 REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(raisimOgre 0.6.0 CONFIG REQUIRED)
find_package(OpenMP REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
message("[RAISIM_GYM] including directory ${RSG_ENVIRONMENT_INCLUDE_PATH}")
pybind11_add_module(_raisim_gym raisim_gym/env/raisim_gym.cpp)
target_link_libraries(_raisim_gym PRIVATE raisim::raisim raisim::raisimOgre yaml-cpp)
target_include_directories(_raisim_gym PUBLIC raisim_gym/env ${RSG_ENVIRONMENT_INCLUDE_PATH} ${EIGEN3_INCLUDE_DIRS})
target_compile_options(_raisim_gym PRIVATE -mtune=native -fPIC -O3)
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "Debug")
message("[RAISIM_GYM]BUILDING THE DEBUG APP")
add_executable(debug_app raisim_gym/env/debug_app.cpp)
target_link_libraries(debug_app PRIVATE raisim::raisim raisim::raisimOgre yaml-cpp)
target_include_directories(debug_app PUBLIC raisim_gym/env ${RSG_ENVIRONMENT_INCLUDE_PATH} ${EIGEN3_INCLUDE_DIRS})
target_compile_options(debug_app PRIVATE -mtune=native -fPIC -g -O0)
endif()