[PATCH] CMakeLists.txt: include GNUInstallDirs after defining the project
yegorslists at googlemail.com
yegorslists at googlemail.com
Wed Jun 4 13:47:18 PDT 2025
From: Yegor Yefremov <yegorslists at googlemail.com>
Fixes the following warning:
CMake Warning (dev) at
/usr/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.
Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
---
CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b4c000..6e1124e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,9 @@
cmake_minimum_required(VERSION 3.13)
-INCLUDE(GNUInstallDirs)
PROJECT(uci C)
+INCLUDE(GNUInstallDirs)
+
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
ADD_DEFINITIONS(-Wall -Werror)
--
2.34.1
More information about the openwrt-devel
mailing list