Skip to content

Commit

Permalink
[build] always use GNUInstallDirs
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.

With MSVC builds this doesn't change the default values used to install targets.

[1] https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
  • Loading branch information
robUx4 authored and maxsharabayko committed Sep 9, 2022
1 parent bb6fede commit ea84103
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,7 @@ set_if(POSIX LINUX OR DARWIN OR BSD OR SUNOS OR ANDROID OR (CYGWIN AND CYG
set_if(SYMLINKABLE LINUX OR DARWIN OR BSD OR SUNOS OR CYGWIN OR GNU)
set_if(NEED_DESTINATION ${CMAKE_VERSION} VERSION_LESS "3.14.0")

# Not sure what to do in case of compiling by MSVC.
# This will make installdir in C:\Program Files\SRT then
# 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)
include(GNUInstallDirs)
endif()
include(GNUInstallDirs)

# The CMAKE_BUILD_TYPE seems not to be always set, weird.
if (NOT DEFINED ENABLE_DEBUG)
Expand Down

0 comments on commit ea84103

Please sign in to comment.