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

README: cmake build: added line to set include directory to yse #80

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

uykusuz
Copy link
Contributor

@uykusuz uykusuz commented Nov 16, 2017

Using the generated config file for easy_profiler we can use the target property for the include directory to add it to the executable in question.

@@ -81,6 +81,7 @@ find_package(easy_profiler REQUIRED)

add_executable(app_for_profiling ${SOURCES})

target_include_directories(app_for_profiling $<TARGET_PROPERTY:easy_profiler,INTERFACE_INCLUDE_DIRECTORIES>)
Copy link
Contributor

Choose a reason for hiding this comment

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

@uykusuz this is redundant and unnecessary, as this is already done automatically by the PUBLIC keyword used here:

target_include_directories(easy_profiler PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include> # <prefix>/include
)

which will automatically include the path to every user targets that are linking easy_profiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants