Comments (4)
Could you provide some information as to how to install your package such that cmake can find it?
PPS Hmm, hope I did not misunderstand you. I interpreted "package" as the list of CMake scripts found in this repository, and answered accordingly in my previous comment.
That is exactly what I meant. With the information you provided I should be able to start with your package in our project.
Thanks!
Dieter
from cmakenugettools.
Hi Dieter, good to hear! π Hope it will prove useful for you.
No specific location is required.
In my (current) view, CMakeNuGetTools is an intrinsic part of the build scripting of my CMake-based C/C++ projects, and as such it is simply present in my project repositories as a copy. For example, I have the contents of the cmake/
directory of this CMakeNuGetTools repository simply copied over to scripts/CMakeNuGetTools/
in internal projects at my company. (Every other script file in the CMakeNuGetTools repository is for only stand-alone testing. Sidenote: one day I want to automate those tests.)
Then, in the root CMakeLists.txt
of those projects, I can simply write
include("${CMAKE_CURRENT_LIST_DIR}/scripts/CMakeNuGetTools/NuGetTools.cmake")
before calling any of the nuget_*
functions. NuGetTools.cmake
currently includes all other required CMake scripts. I only call nuget_initialize
, nuget_add_dependencies
, nuget_generate_nuspec_files
, and some helper functions from CMakeLists.txt
files currently (e.g. see test project subdirectories under tests/
in this repository). Calling nuget_merge_nuspec_files
and nuget_pack
is done outside of CMakeLists.txt
files from stand-alone CMake script files on top of those driving the build system generation, triggering the actual build and install of the project etc (see CMakeLists.pack.cmake
as a simple example in the root directory of this repository).
So no other "installation method" than copying is used by me currently. Do you have any other means of installation in mind? For example, do you want to directly track changes of the cmake scripts found in the CMakeNuGetTools repository?
I guess I should update the README.md
with some explicit setup information. I also want to create separate repositories for example projects showcasing the use of CMakeNuGetTools in the future.
Oh, and before I forget: do not forget to provide a value for the NUGET_COMMAND
cache variable whenever you invoke any nuget_*
functions, otherwise most of those error out, or print a warning. For me, it is set by passing -DNUGET_COMMAND=nuget
for the CMake executable.
This is fine, if you have the nuget.exe
in your PATH
on Windows. For other platforms, e.g. on Linux, one should have an alias nuget as you can see at https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools#macoslinux, and then -DNUGET_COMMAND=nuget
should be fine if you got past setting up mono
and nuget.exe
on a Linux system. Always test your Linux NuGet CLI setup first by running a nuget install
at the terminal by hand.
You are welcome!
PS One might also use CMake's find_program
for setting NUGET_COMMAND
-- I have never tried this before particularly for the NuGet CLI.
from cmakenugettools.
Could you provide some information as to how to install your package such that cmake can find it?
PPS Hmm, hope I did not misunderstand you. I interpreted "package" as the list of CMake scripts found in this repository, and answered accordingly in my previous comment.
from cmakenugettools.
Cool; you are welcome! Feel free to contact me if you have any other questions. Cheers, KristΓ³f
from cmakenugettools.
Related Issues (5)
- No license specified? HOT 6
- If NUGET_EXCLUDE_VERSION=FALSE and VERSION of a PACKAGE entry in nuget_add_dependencies() changed, then find_package() does not respect the package directory change HOT 5
- CMAKE_* arguments of nuget_generate_nuspec_files() are not optional HOT 1
- How do I know the Target name? HOT 7
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 cmakenugettools.