-
Notifications
You must be signed in to change notification settings - Fork 40
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
CMake issue when using this project as dependency #115
Comments
Also, about includes directories, some are missing (still when using this project as dependency using FetchContent/ExternalProject_add/git-submodules/etc.) Quick fix in the building section : add ################################################################################
# Building #
################################################################################
build_module(NAME zkpp-tests
PATH src/zk/tests
LINK_LIBRARIES
${gtest_LIBRARIES}
)
target_include_directories(zkpp-tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) # <--- here
build_module(NAME zkpp
PATH src/zk
NO_RECURSE
LINK_LIBRARIES
${zookeeper_LIBRARIES}
)
target_include_directories(zkpp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) # <--- here
build_module(NAME zkpp-server
PATH src/zk/server
LINK_LIBRARIES
zkpp
)
target_include_directories(zkpp-server PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) # <--- here Also, it might be cleaner to split .cpp and .hpp files. So .cpp files won't be part of the include interface |
I'm going to write some better testing around this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the top-level CMakeLists, line 24 :
Should be instead :
With this quickfix, the current project can be now use with FetchContent or git submodules as a dependency ;)
The text was updated successfully, but these errors were encountered: