From f98dd43a0ebe981179c0441d9e519b57d55ac4ec Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Tue, 14 Nov 2017 23:26:27 +0100 Subject: [PATCH] Change export header from fcl_export.h to fcl/export.h --- CMakeLists.txt | 10 +--------- include/fcl/CMakeLists.txt | 10 ++++++++++ include/fcl/broadphase/detail/interval_tree_node.h | 2 +- include/fcl/broadphase/detail/simple_interval.h | 2 +- include/fcl/common/detail/profiler.h | 2 +- include/fcl/common/exception.h | 2 +- include/fcl/common/time.h | 2 +- include/fcl/common/types.h | 2 +- include/fcl/geometry/bvh/detail/BVH_front.h | 2 +- include/fcl/math/detail/polysolver.h | 2 +- include/fcl/math/detail/seed.h | 2 +- include/fcl/math/triangle.h | 2 +- include/fcl/narrowphase/continuous_collision_request.h | 2 +- 13 files changed, 22 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb80d7b98..4f20b4e31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -233,18 +233,12 @@ else() message(STATUS "FCL does not use OctoMap (as requested)") endif() -# Need to include directory to find export file -include_directories(${PROJECT_BINARY_DIR}) - -install(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}_export.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - # FCL's own include dir should be at the front of the include path include_directories(BEFORE "include") include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}/include") -add_subdirectory(include/fcl) add_subdirectory(src) +add_subdirectory(include/fcl) set(pkg_conf_file_in "${CMAKE_CURRENT_SOURCE_DIR}/fcl.pc.in") set(pkg_conf_file_out "${CMAKE_CURRENT_BINARY_DIR}/fcl.pc") @@ -275,8 +269,6 @@ if(FCL_BUILD_TESTS AND NOT FCL_HIDE_ALL_SYMBOLS) add_subdirectory(test) endif() -generate_export_header(${PROJECT_NAME}) - #=============================================================================== # API documentation using Doxygen # References: diff --git a/include/fcl/CMakeLists.txt b/include/fcl/CMakeLists.txt index 4fabdd95b..2eb36b7fa 100644 --- a/include/fcl/CMakeLists.txt +++ b/include/fcl/CMakeLists.txt @@ -2,6 +2,16 @@ file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h) file(GLOB_RECURSE CONFIGURED_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/*.h) set(FCL_HEADERS ${HEADERS} ${CONFIGURED_HEADERS} PARENT_SCOPE) +# Generate export header. There is no way of generating a file name +# called just export.h. Workaround using configure and remove +generate_export_header(${PROJECT_NAME}) +configure_file(${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h + ${CMAKE_CURRENT_BINARY_DIR}/export.h + COPYONLY) +file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/export.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fcl) diff --git a/include/fcl/broadphase/detail/interval_tree_node.h b/include/fcl/broadphase/detail/interval_tree_node.h index f15cf3dbc..537adab03 100644 --- a/include/fcl/broadphase/detail/interval_tree_node.h +++ b/include/fcl/broadphase/detail/interval_tree_node.h @@ -39,7 +39,7 @@ #define FCL_BROADPHASE_DETAIL_INTERVALTREENODE_H #include "fcl/broadphase/detail/simple_interval.h" -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl { diff --git a/include/fcl/broadphase/detail/simple_interval.h b/include/fcl/broadphase/detail/simple_interval.h index 41f688587..ee8cbcadb 100644 --- a/include/fcl/broadphase/detail/simple_interval.h +++ b/include/fcl/broadphase/detail/simple_interval.h @@ -38,7 +38,7 @@ #ifndef FCL_BROADPHASE_DETAIL_SIMPLEINTERVAL_H #define FCL_BROADPHASE_DETAIL_SIMPLEINTERVAL_H -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl { diff --git a/include/fcl/common/detail/profiler.h b/include/fcl/common/detail/profiler.h index d3852e161..2fd994cac 100644 --- a/include/fcl/common/detail/profiler.h +++ b/include/fcl/common/detail/profiler.h @@ -49,7 +49,7 @@ #include #include #include "fcl/common/time.h" -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl { namespace detail { diff --git a/include/fcl/common/exception.h b/include/fcl/common/exception.h index 4c0f8c06a..00da2ccfa 100644 --- a/include/fcl/common/exception.h +++ b/include/fcl/common/exception.h @@ -41,7 +41,7 @@ #include #include -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl { diff --git a/include/fcl/common/time.h b/include/fcl/common/time.h index 5aba3433d..7b040c518 100644 --- a/include/fcl/common/time.h +++ b/include/fcl/common/time.h @@ -39,7 +39,7 @@ #define FCL_COMMON_TIME_H #include -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl { diff --git a/include/fcl/common/types.h b/include/fcl/common/types.h index 51eda039e..780d71471 100644 --- a/include/fcl/common/types.h +++ b/include/fcl/common/types.h @@ -45,7 +45,7 @@ #include #include #include -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl { diff --git a/include/fcl/geometry/bvh/detail/BVH_front.h b/include/fcl/geometry/bvh/detail/BVH_front.h index f9698a04c..2415f91a9 100644 --- a/include/fcl/geometry/bvh/detail/BVH_front.h +++ b/include/fcl/geometry/bvh/detail/BVH_front.h @@ -39,7 +39,7 @@ #define FCL_BVH_FRONT_H #include -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl { diff --git a/include/fcl/math/detail/polysolver.h b/include/fcl/math/detail/polysolver.h index 8a3967489..3ec94f0a7 100644 --- a/include/fcl/math/detail/polysolver.h +++ b/include/fcl/math/detail/polysolver.h @@ -38,7 +38,7 @@ #ifndef FCL_NARROWPHASE_DETAIL_POLYSOLVER_H #define FCL_NARROWPHASE_DETAIL_POLYSOLVER_H -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl { diff --git a/include/fcl/math/detail/seed.h b/include/fcl/math/detail/seed.h index 86cd6072c..3ec4eeb68 100644 --- a/include/fcl/math/detail/seed.h +++ b/include/fcl/math/detail/seed.h @@ -39,7 +39,7 @@ #define FCL_MATH_DETAIL_SEED_H #include -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl { diff --git a/include/fcl/math/triangle.h b/include/fcl/math/triangle.h index 9bd9cd0f8..f7ce26a5f 100644 --- a/include/fcl/math/triangle.h +++ b/include/fcl/math/triangle.h @@ -39,7 +39,7 @@ #define FCL_MATH_TRIANGLE_H #include -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl { diff --git a/include/fcl/narrowphase/continuous_collision_request.h b/include/fcl/narrowphase/continuous_collision_request.h index 7f60bba8b..356be14cd 100644 --- a/include/fcl/narrowphase/continuous_collision_request.h +++ b/include/fcl/narrowphase/continuous_collision_request.h @@ -40,7 +40,7 @@ #include #include "fcl/narrowphase/gjk_solver_type.h" -#include "fcl_export.h" +#include "fcl/export.h" namespace fcl {