Comments (6)
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.
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"
from cpp_vcpkg_project.
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.
It seem not right to me!
You close this issue without an check of you own code!
from cpp_vcpkg_project.
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.
Thank you for your contributions. I have added #5 to test the installation.
from cpp_vcpkg_project.
Related Issues (10)
- Cmake variables are not translated to parent scope with add_subdirectory HOT 5
- Another example where my_lib is a shared library HOT 2
- Missing dependencies in the .devcontainer HOT 1
- MacOS 12 fails the tests with gcc
- The vcpkg add_executable() does not work? HOT 5
- the docs are not quite up-to-date and generates warnings
- The gitlab-ci generates errors HOT 1
- Dependency Dashboard
- The vcpkg must not installed in source directory! HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpp_vcpkg_project.