Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-fcl
Commits
d3fe3438
Commit
d3fe3438
authored
Apr 05, 2015
by
Jeongseok Lee
Browse files
Enable out-of-source build by generating configs to binary directory
parent
e4266deb
Changes
4
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
d3fe3438
...
...
@@ -105,6 +105,7 @@ add_definitions(-DBOOST_TEST_DYN_LINK)
# FCL's own include dir should be at the front of the include path
include_directories
(
BEFORE
"include"
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/include"
)
if
(
PKG_CONFIG_FOUND
)
pkg_check_modules
(
CCD ccd
)
...
...
@@ -133,15 +134,16 @@ link_directories(${CCD_LIBRARY_DIRS})
add_subdirectory
(
include/fcl
)
add_subdirectory
(
src
)
set
(
pkg_conf_file
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/fcl.pc"
)
configure_file
(
"
${
pkg_conf_file
}
.in"
"
${
pkg_conf_file
}
"
@ONLY
)
set
(
pkg_conf_file_in
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/fcl.pc.in"
)
set
(
pkg_conf_file_out
"
${
CMAKE_CURRENT_BINARY_DIR
}
/fcl.pc"
)
configure_file
(
"
${
pkg_conf_file_in
}
"
"
${
pkg_conf_file_out
}
"
@ONLY
)
install
(
DIRECTORY include/ DESTINATION include
FILES_MATCHING PATTERN
"*.h"
PATTERN
"*.hxx"
PATTERN
".DS_Store"
EXCLUDE
)
install
(
FILES
"
${
pkg_conf_file
}
"
DESTINATION lib/pkgconfig/ COMPONENT pkgconfig
)
install
(
FILES
"
${
pkg_conf_file
_out
}
"
DESTINATION lib/pkgconfig/ COMPONENT pkgconfig
)
enable_testing
()
...
...
include/fcl/CMakeLists.txt
View file @
d3fe3438
file
(
TO_NATIVE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
VERSION_DIR
)
configure_file
(
"
${
VERSION_DIR
}
/config.h.in"
"
${
VERSION_DIR
}
/config.h"
)
file
(
TO_NATIVE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
FCL_CONFIG_IN_DIR
)
file
(
TO_NATIVE_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
FCL_CONFIG_OUT_DIR
)
configure_file
(
"
${
FCL_CONFIG_IN_DIR
}
/config.h.in"
"
${
FCL_CONFIG_OUT_DIR
}
/config.h"
)
install
(
FILES
"
${
FCL_CONFIG_OUT_DIR
}
/config.h"
DESTINATION include/fcl
)
test/CMakeLists.txt
View file @
d3fe3438
...
...
@@ -10,14 +10,17 @@ macro(add_fcl_test test_name)
endmacro
(
add_fcl_test
)
# configure location of resources
file
(
TO_NATIVE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/fcl_resources"
TEST_RESOURCES_DIR
)
file
(
TO_NATIVE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/fcl_resources"
TEST_RESOURCES_SRC_DIR
)
file
(
TO_NATIVE_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
/fcl_resources"
TEST_RESOURCES_BIN_DIR
)
if
(
WIN32
)
# Correct directory separator for Windows
string
(
REPLACE
"
\\
"
"
\\\\
"
TEST_RESOURCES_DIR
${
TEST_RESOURCES_DIR
}
)
string
(
REPLACE
"
\\
"
"
\\\\
"
TEST_RESOURCES_SRC_DIR
${
TEST_RESOURCES_SRC_DIR
}
)
string
(
REPLACE
"
\\
"
"
\\\\
"
TEST_RESOURCES_BIN_DIR
${
TEST_RESOURCES_BIN_DIR
}
)
endif
(
WIN32
)
configure_file
(
"
${
TEST_RESOURCES_DIR
}
/config.h.in"
"
${
TEST_RESOURCES_DIR
}
/config.h"
)
configure_file
(
"
${
TEST_RESOURCES_
SRC_
DIR
}
/config.h.in"
"
${
TEST_RESOURCES_
BIN_
DIR
}
/config.h"
)
include_directories
(
.
)
include_directories
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
add_fcl_test
(
test_fcl_collision test_fcl_collision.cpp test_fcl_utility.cpp
)
add_fcl_test
(
test_fcl_distance test_fcl_distance.cpp test_fcl_utility.cpp
)
...
...
test/fcl_resources/config.h.in
View file @
d3fe3438
...
...
@@ -37,5 +37,5 @@
#ifndef FCL_TEST_RESOURCES_CONFIG_
#define FCL_TEST_RESOURCES_CONFIG_
#define TEST_RESOURCES_DIR "@TEST_RESOURCES_DIR@"
#define TEST_RESOURCES_DIR "@TEST_RESOURCES_
SRC_
DIR@"
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment