From c8e5cbbdd4d8772a082e818a08530069bcaef31b Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Wed, 18 Feb 2026 17:31:42 +0100 Subject: [PATCH] CMakeLists.txt: try to fix issue with commit 278e04ebd6e5b5d0e96d77e1fc839af3ccd2b3ce --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4df6ac..73ec5d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,6 @@ cmake_minimum_required(VERSION 3.10) project(openFPGALoader VERSION "1.0.0" LANGUAGES CXX) add_definitions(-DVERSION=\"v${PROJECT_VERSION}\") -option(WINDOWS_CROSSCOMPILE "Enable cross-compile on windows" OFF) #if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") # set(WINDOWS_CROSSCOMPILE ON) #else() @@ -19,7 +18,8 @@ option(ENABLE_OPTIM "Enable build with -O3 optimization level" option(BUILD_STATIC "Whether or not to build with static libraries" OFF) option(USE_PKGCONFIG "Use pkgconfig to find libraries" ON) option(LINK_CMAKE_THREADS "Use CMake find_package to link the threading library" OFF) -option(WINDOWS_STATIC_ZLIB "Link zlib statically for Windows builds" ON) +option(WINDOWS_CROSSCOMPILE "Enable cross-compile on windows" OFF) +option(WINDOWS_STATIC_ZLIB "Link zlib statically for Windows builds" ON) if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(ENABLE_UDEV OFF) @@ -225,7 +225,7 @@ if (USE_PKGCONFIG) endif() # zlib support (gzip) - if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + if(WINDOWS_CROSSCOMPILE) if (WINDOWS_STATIC_ZLIB) set(ZLIB_USE_STATIC_LIBS ON) endif()