Skip to content

Commit

Permalink
Merge pull request #173 from resibots/cmake_multiple_inclusion
Browse files Browse the repository at this point in the history
cmake.in multiple inclusion
  • Loading branch information
costashatz authored Mar 15, 2022
2 parents efa8c7d + f6bedf4 commit 588db92
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cmake/RobotDARTConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# add_executable(robot_dart_example example.cpp)
# target_link_libraries(robot_dart_example RobotDART::Simu)

include_guard(DIRECTORY)

include(CMakeFindDependencyMacro)
include(FindPackageHandleStandardArgs)

Expand Down Expand Up @@ -83,4 +85,4 @@ find_package_handle_standard_args(
RobotDART_INCLUDE_DIRS
RobotDART_LIBRARY_DIRS)

mark_as_advanced(RobotDART_INCLUDE_DIRS RobotDART_LIBRARY_DIRS RobotDART_LIBRARY RobotDART_FOUND)
mark_as_advanced(RobotDART_INCLUDE_DIRS RobotDART_LIBRARY_DIRS RobotDART_LIBRARY RobotDART_FOUND)
2 changes: 2 additions & 0 deletions cmake/UthequeConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# add_executable(your_example example.cpp)
# target_link_libraries(your_example Utheque)

include_guard(DIRECTORY)

include(CMakeFindDependencyMacro)
include(FindPackageHandleStandardArgs)

Expand Down
5 changes: 4 additions & 1 deletion wscript
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def build_examples(bld):
print("Bulding examples...")
libs = 'BOOST EIGEN DART PTHREAD'
path = bld.path.abspath() + '/res'
bld.env.LIB_PTHREAD = ['pthread']
bld.env.LIB_PTHREAD = ['pthread', 'tbb']

# these examples should not be compiled without magnum
magnum_only = ['magnum_contexts.cpp', 'cameras.cpp', 'transparent.cpp']
Expand All @@ -417,6 +417,9 @@ def build_examples(bld):
ffile = os.path.join(root, filename)
basename = filename.replace('.cpp', '')
# plain version
cxxflags = ''
if basename == 'mpc':
cxxflags = '-ltbb'
if (filename not in exclude) and (filename not in magnum_only):
bld.program(features = 'cxx',
install_path = None,
Expand Down

0 comments on commit 588db92

Please sign in to comment.