From: Uwe Hermann Date: Sat, 8 Nov 2014 14:31:30 +0000 (+0100) Subject: CMakeLists.txt: Fix CMAKE_MODULE_PATH related issue. X-Git-Tag: pulseview-0.3.0~524 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=cf2b5b643b53f7f601420a32a032307307fa4bb2 CMakeLists.txt: Fix CMAKE_MODULE_PATH related issue. Append to CMAKE_MODULE_PATH instead of overwriting it, in case it is non-empty initially (which can happen e.g. if -DCMAKE_TOOLCHAIN_FILE is used and the specified toolchain file sets CMAKE_MODULE_PATH). Also, append to CMAKE_MODULE_PATH _after_ running "project(pulseview)", since the latter would apparently reset CMAKE_MODULE_PATH again. This should fix a MinGW-w64 build issue we're currently seeing: CMake Error at CMakeLists.txt:105 (include): include could not find load file: memaccess --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ee1d57a..4af1f67b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,10 +23,10 @@ cmake_minimum_required(VERSION 2.8.6) include(FindPkgConfig) include(GNUInstallDirs) -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake") - project(pulseview) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake") + #=============================================================================== #= User Options #-------------------------------------------------------------------------------