Skip to content

Commit

Permalink
[build] Allow using all GNU directories even if libdir is set
Browse files Browse the repository at this point in the history
It's possible to use GNUInstallDirs and allow the user to force some specific
target folder. The values set by the user are not overriden in that case [1]:

> If the includer does not define a value the above-shown default will be used
> and the value will appear in the cache for editing by the user.

According to the comment, the main goal is not to use GNU directories when
compiling with MSVC, so the MICROSOFT check should be enough.

[1] https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
  • Loading branch information
robUx4 committed Sep 2, 2022
1 parent daf838e commit 3ee27d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -49,7 +49,7 @@ set_if(SYMLINKABLE LINUX OR DARWIN OR BSD OR SUNOS OR CYGWIN OR GNU)
# inside "bin" and "lib64" directories. At least this maintains
# the current status. Shall this be not desired, override values
# of CMAKE_INSTALL_BINDIR, CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR.
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
if (NOT MICROSOFT)
include(GNUInstallDirs)
endif()

Expand Down

0 comments on commit 3ee27d2

Please sign in to comment.