-
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
Add install and uninstall targets #15
Conversation
Thanks! I will try to have a look at this evening. |
Let me know if you have any additional question: CMake package export has always been tricky, but luckily the quality of CMake documentation and related material available online has been stedly improving during the latest years. |
An additional thing that you may want to evaluate at this is there are any headers in |
Good question. The project name is FMI4cpp, but fmi4cpp is a terrible namespace, which is why the namespace currently used is fmicpp. That's also why the CMake project is named fmicpp and not fmi4cpp. Probably FMICPP is ok for the CMake project name, although the actual project name is FMI4cpp. |
Yeah, there is that. Have not thought much about it really. We'll just have to see with time I guess. |
Yes, iterating a bit make sense. Once the interface have been stable for a while, it could make sense to release a 1.0 version (that is also what Semantic Versioning suggests: https://semver.org/) |
As you are interested in vcpkg integration, consider that vcpkg requires all its cmake configuration files to be installed in a directory called |
Does having the project name (GitHub) be FMI4cpp, the CMake project (and vcpkg port) be named fmi4cpp and the namespace be fmicpp sound ok? |
This should work fine, at least w.r.t. to the CMake/vcpkg integration. |
Took the liberty to change the base branch and merge with dev |
Fix https://github.com/SFI-Mechatronics/FMI4cpp/issues/8 .
I tried to follow the latest CMake guidelines, and I added links to the relevant documentation in the comments. @markaren let me know if you prefer that I expand those.
With this patch, you can install a given directory by specifying the
CMAKE_INSTALL_PREFIX
CMake variable. Once you installed the library, you can find it in a downstream project by adding theCMAKE_INSTALL_PREFIX
directory to theCMAKE_PREFIX_PATH
cmake or environmental variables.In the downstream project the library can be used as in:
Additional work is necessary to make sure that the CMake package is relocatable, but I though it was better to first get this initial support in. Relocatable packages are convenient for inclusion in vcpkg (see microsoft/vcpkg#1027 and microsoft/vcpkg#77).
Regarding the naming, the name of the package is connected to the name of the project in CMake. is
FMICPP
ok? Is the library supposed to be calledFMI4cpp
,FMICPP
orfmicpp
?