From: Gerhard Sittig Date: Thu, 20 Aug 2020 07:11:20 +0000 (+0200) Subject: cmake: move project() before other statements X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=d1125d7d9e5830bc1d17636988e6c72f9deaeaf3 cmake: move project() before other statements The included GNUInstallDirs logic needs to know about the programming languages which are used in the project. Without this spec a verbose developer message gets emitted: CMake Warning (dev) at $HOME/share/cmake-3.18/Modules/GNUInstallDirs.cmake:225 (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:24 (include) This warning is for project developers. Use -Wno-dev to suppress it. Move the project() statement in CMakeList.txt before the include(), and specify the C and C++ programming languages (C is needed at configuration time for feature detection, before the application's C++ sources get built). --- diff --git a/CMakeLists.txt b/CMakeLists.txt index aa5175cc..160a0c0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,9 +21,9 @@ cmake_minimum_required(VERSION 2.8.12) -include(GNUInstallDirs) +project(pulseview C CXX) -project(pulseview) +include(GNUInstallDirs) # Let AUTOMOC and AUTOUIC process GENERATED files. if(POLICY CMP0071)