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

FetchContent dependency conflict. #102

Open
SomePerson1111 opened this issue Apr 19, 2024 · 0 comments
Open

FetchContent dependency conflict. #102

SomePerson1111 opened this issue Apr 19, 2024 · 0 comments

Comments

@SomePerson1111
Copy link

FetchContent download package into CMAKE_BINARY_DIR. Therefore, dependencies, for example TCLAP, downloaded in wrong dir. To correct it, (for cmake/Dependencies/TCLAP/TCLAP.cmake) this command

FetchContent_Declare(
    tclap-external
    GIT_REPOSITORY      https://github.com/mirror/tclap.git
    GIT_TAG             v1.2.5 # 58c5c8ef24111072fc21fb723f8ab45d23395809
    PATCH_COMMAND       ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${CMAKE_CURRENT_BINARY_DIR}/_deps/tclap-external-src/CMakeLists.txt"
  )

could be modified to

FetchContent_Declare(
    tclap-external
    GIT_REPOSITORY      https://github.com/mirror/tclap.git
    GIT_TAG             v1.2.5 # 58c5c8ef24111072fc21fb723f8ab45d23395809
    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps/tclap-external-src
    SUBBUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps/tclap-external-subbuild
    BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps/tclap-external-build
    PATCH_COMMAND       ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${CMAKE_CURRENT_BINARY_DIR}/_deps/tclap-external-src/CMakeLists.txt"
  )

and simillary to other dependencies

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

No branches or pull requests

1 participant