diff --git a/CMakeLists.txt b/CMakeLists.txt index 7628600d3..94ad4f084 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,16 +21,9 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) option(BTCPP_SHARED_LIBS "Build shared libraries" ON) option(BTCPP_ENABLE_COROUTINES "Enable boost coroutines" ON) option(BTCPP_MANUAL_SELECTOR "Build manual selector node" ON) - -if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} ) - option(BTCPP_EXAMPLES "Build tutorials and examples" ON) - option(BTCPP_UNIT_TESTS "Build the unit tests" ON) - option(BTCPP_BUILD_TOOLS "Build commandline tools" ON) -else() - option(BTCPP_EXAMPLES "Build tutorials and examples" OFF) - option(BTCPP_UNIT_TESTS "Build the unit tests" OFF) - option(BTCPP_BUILD_TOOLS "Build commandline tools" OFF) -endif() +option(BTCPP_BUILD_TOOLS "Build commandline tools" ON) +option(BTCPP_EXAMPLES "Build tutorials and examples" ON) +option(BTCPP_UNIT_TESTS "Build the unit tests" ON) option(USE_V3_COMPATIBLE_NAMES "Use some alias to compile more easily old 3.x code" OFF) @@ -206,7 +199,7 @@ if (WIN32) list(APPEND BT_SOURCE src/shared_library_WIN.cpp ) endif() -if (BUILD_SHARED_LIBS) +if (BTCPP_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) add_library(${BEHAVIOR_TREE_LIBRARY} SHARED ${BT_SOURCE}) else() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fa4a3b68c..5a30af0c7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,7 @@ ###################################################### # TESTS -include_directories(include) +include_directories(include ${PROJECT_SOURCE_DIR}/3rdparty) set(BT_TESTS src/action_test_node.cpp diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 163e70348..c73ee3780 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5) -include_directories(${CMAKE_SOURCE_DIR}/3rdparty) +include_directories(${PROJECT_SOURCE_DIR}/3rdparty) add_executable(bt3_log_cat bt_log_cat.cpp ) target_link_libraries(bt3_log_cat ${BEHAVIOR_TREE_LIBRARY} )