CMakeLists: fix CMake warning for INCLUDE macro
authorDavid Härdeman <[email protected]>
Sun, 5 Oct 2025 12:29:05 +0000 (14:29 +0200)
committerChristian Marangi <[email protected]>
Sun, 5 Oct 2025 12:33:55 +0000 (14:33 +0200)
Fix CMake warning for INCLUDE macro by moving the INCLUDE after the
PROJECT declaration.

CMake Warning (dev) at /usr/share/cmake-3.31/Modules/GNUInstallDirs.cmake:253 (message):
  Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
  target architecture is known.  Please enable at least one language before
  including GNUInstallDirs.

Signed-off-by: David Härdeman <[email protected]>
[ improve commit description ]
Link: https://github.com/openwrt/uci/pull/7
Signed-off-by: Christian Marangi <[email protected]>
CMakeLists.txt

index 6b4c000625ec43b046fedf601e191540d19b89a9..9add8369e0cbac5882e5b5ddf1ede5ca1538fceb 100644 (file)
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 3.13)
-INCLUDE(GNUInstallDirs)
 
 PROJECT(uci C)
+INCLUDE(GNUInstallDirs)
 
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")