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

Fix exporting of Targets.cmake for include dir #812

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

Conversation

drTr0jan
Copy link

Description

Building main example from Readme via CMake (CMakeLists.txt) using doctestTargets.cmake causes an error.

boris@boris:~/doctest% cmake --build .
[ 50%] Building CXX object CMakeFiles/main.dir/main.cpp.o
/home/boris/doctest/main.cpp:2:10: fatal error: 'doctest.h' file not found
#include "doctest.h"
         ^~~~~~~~~~~
1 error generated.
gmake[2]: *** [CMakeFiles/main.dir/build.make:76: CMakeFiles/main.dir/main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/main.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

Proposed patch specifies doctest directory explicit for INCLUDES DESTINATION.

Main example builds with the patched doctestTargets.cmake successful.

GitHub Issues

For #175.

lemirep pushed a commit to KDAB/KDGpu that referenced this pull request Nov 7, 2023
As described by doctest/doctest#812
the doctest cmake package requires to #include <doctest/doctest.h>
instead of just #include <doctest.h>.

But our FetchContent-based code path sets things up so that we can just

Change-Id: I4332165fa0b6646499eb336fc07e0a7d75bdd126
Reviewed-on: https://codereview.kdab.com/c/kdab/toy-renderer/+/132255
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Tested-by: Continuous Integration <build@kdab.com>
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

1 participant