Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Fix default installation path for cmake files #845
Conversation
0678a15
to
c4a09f3
Thank you again for the PR, however as mentioned in #737 [1] we do not want to change the default install locations at this time. You can achieve the same effect as this PR by passing a parameter at configure time:
[1] #737 (comment) |
Hello @ras0219-msft unfortunately this doesn't work, because "lib" in Debian is "lib/" and not just lib |
Because it would be a breaking change and I don't understand the value. Especially, what do we say to someone else who comes by and asks to change the defaults later? What makes these defaults "the true best defaults that are better than all others?" Instead, can you explain in detail what the problem is with passing I don't know what you mean by "
|
ok, let me explain. all the cmake files (at least in Debian and Fedora I think, as well as others), should go in
I don't understand how cmake can possibly use "/usr/lib/cpprestsdk/*.cmake" as location, without having to manually hint it. In Debian, we prefer to use The same applies to yocto, where I'm currently maintaining the package I did an additional commit, does it look better to you? |
If you reopen the issue, I think the PR will update with the new commit commit 38bd9cbcecbbd128c6ffb63f24f503faf37f3cec (HEAD -> fix-install, mio/fix-install)
Author: Gianfranco Costamagna <[email protected]>
Date: Mon Aug 20 19:26:00 2018 +0200
Fixup previous commit.
This makes the install location not correct for Debian and similar linux distro, but upstream don't plan to change "lib/cpprestsdk" location,
so at least we can override the location with -DCPPREST_EXPORT_DIR=cmake and keep the CMAKE_INSTALL_LIBDIR multiarch location
diff --git a/Release/CMakeLists.txt b/Release/CMakeLists.txt
index d20b4b07..9f6bbc41 100644
--- a/Release/CMakeLists.txt
+++ b/Release/CMakeLists.txt
@@ -18,7 +18,7 @@ enable_testing()
set(WERROR ON CACHE BOOL "Treat Warnings as Errors.")
set(CPPREST_EXCLUDE_WEBSOCKETS OFF CACHE BOOL "Exclude websockets functionality.")
set(CPPREST_EXCLUDE_COMPRESSION OFF CACHE BOOL "Exclude compression functionality.")
-set(CPPREST_EXPORT_DIR cmake CACHE STRING "Directory to install CMake config files.")
+set(CPPREST_EXPORT_DIR cpprestsdk CACHE STRING "Directory to install CMake config files.")
set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.")
set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.")
|
The fundamental objection I have is twofold:
See the CMake documentation (https://cmake.org/cmake/help/latest/command/find_package.html) and note that all paths are checked on all OS's, even if they aren't considered "native" (Also note that
Great, so what's the problem with
? Or am I misunderstanding and you're saying that you use arch-specific
|
Anyway the updated PR won't change the current behavior just add /lib//cpprestsdk instead of /lib/cpprestsdk when GNUInstallDirs finds an appropriate system. BTW the problem with multiarch is that we need different locations to have amd64 and i386 cohexist, and this is why we put stuff under /lib/ |
After #737 got merged, I think there is still something missing.
Fixup the merge to make cpprest being detected by pkg-config.