Git Product home page Git Product logo

Comments (6)

ClausKlein avatar ClausKlein commented on June 14, 2024 1

Thanks, I work hours today to understand the Problem.
The first Problem is the scope of CMake Variables
The second is this strange Problems when I use set(... PARENT_SCOPE) in combination with INTERFACE libraries.

The will be a workaround, we have to look for.

from cpp_vcpkg_project.

aminya avatar aminya commented on June 14, 2024

You are passing absolute paths to package_project.
https://github.com/ClausKlein/cpp_cmake_project/blob/bbe0fd6be37b2b131af83917c0923c3cd29c69fd/CMakeLists.txt#L120
https://github.com/ClausKlein/cpp_cmake_project/blob/bbe0fd6be37b2b131af83917c0923c3cd29c69fd/my_header_lib/CMakeLists.txt#L6

Avoid changing the template without testing the changes. It clearly says "must be relative paths"

set(my_header_lib_INCLUDE_DIR "./include") # must be relative paths

from cpp_vcpkg_project.

ClausKlein avatar ClausKlein commented on June 14, 2024

Same result with your original version too!
You do not check the installation,
and you do not build against the installed version!

bash-3.2$ cmake --build ./build --config Release
ninja: no work to do.
bash-3.2$ DESTDIR=/Users/clausklein/.local cmake --build ./build --config Release --target install
[0/1] Install the project...
-- Install configuration: "Release"
-- Installing: /Users/clausklein/.local/usr/local/bin/my_exe
-- Installing: /Users/clausklein/.local/usr/local/lib/libmy_lib.a
-- Installing: /Users/clausklein/.local/usr/local/share/cpp_vcpkg_project/cpp_vcpkg_projectConfigVersion.cmake
-- Installing: /Users/clausklein/.local/usr/local/share/cpp_vcpkg_project/cpp_vcpkg_projectConfig.cmake
-- Installing: /Users/clausklein/.local/usr/local/share/cpp_vcpkg_project/cpp_vcpkg_projectTargets.cmake
-- Installing: /Users/clausklein/.local/usr/local/share/cpp_vcpkg_project/cpp_vcpkg_projectTargets-release.cmake
-- Installing: /Users/clausklein/.local/usr/local/share/cpp_vcpkg_project/usage
-- # The package cpp_vcpkg_project provides the following CMake targets:

    find_package(cpp_vcpkg_project CONFIG REQUIRED)
    target_link_libraries(main PRIVATE  cpp_vcpkg_project::my_exe cpp_vcpkg_project::my_lib cpp_vcpkg_project::my_header_lib cpp_vcpkg_project::project_options cpp_vcpkg_project::project_warnings)
  
bash-3.2$ git remote -v
origin	https://github.com/aminya/cpp_vcpkg_project.git (fetch)
origin	https://github.com/aminya/cpp_vcpkg_project.git (push)
bash-3.2$ git log -1
commit 89e97167d283d700daf181ca03ca3e808a623434 (HEAD -> main, origin/main, origin/HEAD)
Author: Amin Yahyaabadi <[email protected]>
Date:   Thu May 5 13:38:00 2022 -0700

    fix: update to project_options v0.21.1
bash-3.2$ git status
On branch main
Your branch is up to date with 'origin/main'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	GNUmakefile

nothing added to commit but untracked files present (use "git add" to track)
bash-3.2$ 

from cpp_vcpkg_project.

ClausKlein avatar ClausKlein commented on June 14, 2024

It seem not right to me!
You close this issue without an check of you own code!

from cpp_vcpkg_project.

aminya avatar aminya commented on June 14, 2024

This is tested in project_options. Not sure why it is not translated here.
https://github.com/aminya/project_options/tree/main/test_install

from cpp_vcpkg_project.

aminya avatar aminya commented on June 14, 2024

Thank you for your contributions. I have added #5 to test the installation.

from cpp_vcpkg_project.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.