Skip to content
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

CMake move include(GNUInstallDirs) below project #1022

Closed
timrulebosch opened this issue Nov 26, 2021 · 3 comments
Closed

CMake move include(GNUInstallDirs) below project #1022

timrulebosch opened this issue Nov 26, 2021 · 3 comments

Comments

@timrulebosch
Copy link

The include for GNUInstallDirs should come after the project(). Like this:

CMAKE_MINIMUM_REQUIRED(VERSION 3.4.0)
PROJECT(hiredis)
INCLUDE(GNUInstallDirs)

Otherwise, we get warnings from newer versions of CMake.

CMake Warning (dev) at /snap/cmake/992/share/cmake-3.22/Modules/GNUInstallDirs.cmake:239 (message):
  Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
  target architecture is known.  Please enable at least one language before
  including GNUInstallDirs.
Call Stack (most recent call first):
  CMakeLists.txt:2 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

INCLUDE(GNUInstallDirs)

I can provide a PR if you like.

@bjosv
Copy link
Contributor

bjosv commented Nov 26, 2021

The PR #994 touches this, but for a different reason

@bjosv
Copy link
Contributor

bjosv commented Jan 9, 2022

This issue can be closed now, fixed via the merged #872

@michael-grunder
Copy link
Collaborator

Closing via #872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants