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
9da2be85
Verified
Commit
9da2be85
authored
May 26, 2020
by
Justin Carpentier
Browse files
cmake: fix variables names and general export
parent
0f94a795
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
9da2be85
...
...
@@ -86,7 +86,7 @@ endif ()
search_for_boost
()
# Optional dependencies
ADD_PROJECT_DEPENDENCY
(
octomap PKG_CONFIG_REQUIRES
"octomap >= 1.6"
)
if
(
OCTOMAP
_FOUND
)
if
(
octomap
_FOUND
)
SET
(
HPP_FCL_HAVE_OCTOMAP TRUE
)
string
(
REPLACE
"."
";"
VERSION_LIST
${
OCTOMAP_VERSION
}
)
list
(
GET VERSION_LIST 0 OCTOMAP_MAJOR_VERSION
)
...
...
src/CMakeLists.txt
View file @
9da2be85
...
...
@@ -161,7 +161,8 @@ TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
${
Boost_THREAD_LIBRARY
}
${
Boost_DATE_TIME_LIBRARY
}
${
Boost_SYSTEM_LIBRARY
}
${
assimp_LIBRARY
}
${
ASSIMP_LIBRARY_DIRS
}
/
${
ASSIMP_LIBRARIES
}
# assimp::assimp # Not working
# Boost::thread
# Boost::date_time
# Boost::system
...
...
@@ -177,8 +178,8 @@ endif()
target_include_directories
(
${
LIBRARY_NAME
}
SYSTEM PUBLIC
${
EIGEN3_INCLUDE_DIR
}
${
assimp_INCLUDE_DIR
}
${
Boost_INCLUDE_DIRS
}
${
ASSIMP_INCLUDE_DIRS
}
)
target_include_directories
(
${
LIBRARY_NAME
}
...
...
@@ -186,21 +187,21 @@ target_include_directories(${LIBRARY_NAME}
$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>
)
if
(
NOT
${
assimp
_VERSION
}
VERSION_LESS
"2.0.1150"
)
if
(
NOT
${
ASSIMP
_VERSION
}
VERSION_LESS
"2.0.1150"
)
target_compile_definitions
(
${
LIBRARY_NAME
}
PRIVATE -DHPP_FCL_USE_ASSIMP_UNIFIED_HEADER_NAMES
)
message
(
STATUS
"Assimp version has unified headers"
)
else
()
message
(
STATUS
"Assimp version does not have unified headers"
)
endif
()
IF
(
OCTOMAP
_FOUND
)
target_include_directories
(
${
LIBRARY_NAME
}
SYSTEM PUBLIC
${
OCTOMAP_INCLUDE_DIR
}
)
target_link_libraries
(
${
LIBRARY_NAME
}
PUBLIC
${
OCTOMAP_LIBRAR
Y
}
)
target_compile_definitions
(
${
LIBRARY_NAME
}
P
RIVATE
IF
(
octomap
_FOUND
)
target_include_directories
(
${
LIBRARY_NAME
}
SYSTEM PUBLIC
${
OCTOMAP_INCLUDE_DIR
S
}
)
target_link_libraries
(
${
LIBRARY_NAME
}
PUBLIC
${
OCTOMAP_LIBRAR
IES
}
)
target_compile_definitions
(
${
LIBRARY_NAME
}
P
UBLIC
-DHPP_FCL_HAVE_OCTOMAP
-DOCTOMAP_MAJOR_VERSION=
${
OCTOMAP_MAJOR_VERSION
}
-DOCTOMAP_MINOR_VERSION=
${
OCTOMAP_MINOR_VERSION
}
-DOCTOMAP_PATCH_VERSION=
${
OCTOMAP_PATCH_VERSION
}
)
ENDIF
(
OCTOMAP
_FOUND
)
ENDIF
(
octomap
_FOUND
)
install
(
TARGETS
${
LIBRARY_NAME
}
EXPORT
${
TARGETS_EXPORT_NAME
}
...
...
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