Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use boost library names instead of Boost_LIBRARIES var for .pc file generation #187

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ endif()
if(NOT catkin_FOUND)
set(TARGET_NAME ${PROJECT_NAME})
set(PKGCONFIG_LIBS
${Boost_LIBRARIES}
boost_thread boost_system
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@planthaber hmm, I'd rather lookup libraries from targets instead, using get_target_property().

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt that this will work, because it will not provide libraries from recursive dependencies.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps there's a chance, using INTERFACE_LINK_LIBRARIES, but I'll let you guys do the digging.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INTERFACE_LINK_LIBRARIES and LINK_LIBRARIES also contains the targets:

Boost::threadBoost::system/opt/workspace/install/lib/libbase-logging.so/usr/lib/x86_64-linux-gnu/libPocoFoundation.sodl

There are (currently) no other upstream dependencies, but yes, it would be cleaner to to use the libs found rather than hard-coding them (in case of upstream changes).

Nevertheless, I didn't find a decent target property containing the actual libs (used https://stackoverflow.com/a/34292622).

class_loader AUTOGEN_ORIGIN_DEPENDS = ON
class_loader AUTOMOC_COMPILER_PREDEFINES = ON
class_loader AUTOMOC_MACRO_NAMES = Q_OBJECT;Q_GADGET;Q_NAMESPACE
class_loader AUTOMOC_PATH_PREFIX = ON
class_loader BINARY_DIR = /opt/workspace/tools/class_loader/build
class_loader BINARY_DIR = /opt/workspace/tools/class_loader/build
class_loader BUILD_WITH_INSTALL_RPATH = OFF
class_loader IMPORTED = FALSE
class_loader IMPORTED_GLOBAL = FALSE
class_loader INCLUDE_DIRECTORIES = /opt/workspace/install/include;/opt/workspace/tools/class_loader/include;/opt/workspace/install/include;/usr/include;/usr/include
class_loader INCLUDE_DIRECTORIES = /opt/workspace/install/include;/opt/workspace/tools/class_loader/include;/opt/workspace/install/include;/usr/include;/usr/include
class_loader INCLUDE_DIRECTORIES = /opt/workspace/install/include;/opt/workspace/tools/class_loader/include;/opt/workspace/install/include;/usr/include;/usr/include
class_loader INSTALL_RPATH = 
class_loader INSTALL_RPATH_USE_LINK_PATH = OFF
class_loader INTERFACE_LINK_LIBRARIES = Boost::thread;Boost::system;/opt/workspace/install/lib/libbase-logging.so;/usr/lib/x86_64-linux-gnu/libPocoFoundation.so;dl
class_loader LINK_LIBRARIES = Boost::thread;Boost::system;/opt/workspace/install/lib/libbase-logging.so;/usr/lib/x86_64-linux-gnu/libPocoFoundation.so;dl
class_loader NAME = class_loader
class_loader POSITION_INDEPENDENT_CODE = True
class_loader SKIP_BUILD_RPATH = OFF
class_loader SOURCES = src/class_loader.cpp;src/class_loader_core.cpp;src/meta_object.cpp;src/multi_library_class_loader.cpp;include/class_loader/class_loader.h;include/class_loader/class_loader_core.h;include/class_loader/class_loader_exceptions.h;include/class_loader/class_loader_register_macro.h;include/class_loader/console_bridge_compatibility.h;include/class_loader/meta_object.h;include/class_loader/multi_library_class_loader.h
class_loader SOURCE_DIR = /opt/workspace/tools/class_loader
class_loader SOURCE_DIR = /opt/workspace/tools/class_loader
class_loader TYPE = SHARED_LIBRARY
class_loader TYPE = SHARED_LIBRARY
class_loader UNITY_BUILD_BATCH_SIZE = 8

${console_bridge_LIBRARIES}
${Poco_LIBRARIES}
)
Expand Down