Skip to content

Commit

Permalink
CMake: clean
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Dec 1, 2023
1 parent fd6123e commit c196b8b
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ apply_default_apple_configuration()

check_minimal_cxx_standard(14 ENFORCE)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/find-external/CppAD/"
${CMAKE_MODULE_PATH})
if(APPLE) # Use the handmade approach
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/find-external/OpenMP
${CMAKE_MODULE_PATH})
Expand All @@ -85,14 +83,12 @@ elseif(UNIX)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/find-external/OpenMP
${CMAKE_MODULE_PATH})
endif()
endif(APPLE)
endif()

# Add the different required and optional dependencies
if(BUILD_PYTHON_INTERFACE)
add_project_dependency(eigenpy 2.8.0 REQUIRED PKG_CONFIG_REQUIRES
"eigenpy >= 2.8.0")
# workaround temporary issue in submodule
include("${JRL_CMAKE_MODULES}/python.cmake")
endif(BUILD_PYTHON_INTERFACE)
add_project_dependency(pinocchio 2.6.3 REQUIRED PKG_CONFIG_REQUIRES
"pinocchio >= 2.6.3")
Expand Down Expand Up @@ -144,7 +140,9 @@ if(BUILD_WITH_MULTITHREADS)
endif()

if(BUILD_WITH_CODEGEN_SUPPORT)
add_project_dependency(cppad 20200000.0 REQUIRED)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/find-external/CppAD/"
${CMAKE_MODULE_PATH})
add_project_dependency(cppad 20200000.0 REQUIRED FIND_EXTERNAL cppad)
add_project_dependency(cppadcg 2.4.1 REQUIRED)
add_definitions(-DCROCODDYL_WITH_CODEGEN)
# Pinocchio codegen related preproccessor defs.
Expand All @@ -159,7 +157,7 @@ if(BUILD_WITH_CODEGEN_SUPPORT)
set(PACKAGE_EXTRA_MACROS
"${PACKAGE_EXTRA_MACROS}\nADD_DEFINITIONS(-DPINOCCHIO_CPPAD_REQUIRES_MATRIX_BASE_PLUGIN)"
)
endif(NOT ${EIGEN3_VERSION} VERSION_GREATER "3.3.0")
endif()
endif()

# Add OpenMP
Expand Down Expand Up @@ -236,24 +234,24 @@ if(UNIX)
TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION lib)
endif(UNIX)
endif()

# Build the Python interface
if(BUILD_PYTHON_INTERFACE)
# Include and add the bindings directory
include_directories(bindings)
add_subdirectory(bindings)
endif(BUILD_PYTHON_INTERFACE)
endif()

# Build the unit tests
if(BUILD_TESTING)
add_subdirectory(unittest)
endif(BUILD_TESTING)
endif()

# Build the benchmark
if(BUILD_BENCHMARK)
add_subdirectory(benchmark)
endif(BUILD_BENCHMARK)
endif()

# Build the examples
if(BUILD_EXAMPLES)
Expand All @@ -263,7 +261,7 @@ if(BUILD_EXAMPLES)
message(
WARNING "Python interface is not built, hence cannot build examples.")
endif(BUILD_PYTHON_INTERFACE)
endif(BUILD_EXAMPLES)
endif()

# PkgConfig packaging of the project
pkg_config_append_libs(${PROJECT_NAME})
Expand Down

0 comments on commit c196b8b

Please sign in to comment.