From 1490c2679993d83643b9cff6b77c643115f90668 Mon Sep 17 00:00:00 2001 From: Aggelos Tselios Date: Fri, 24 May 2024 16:15:49 +0300 Subject: [PATCH] CMakeLists.txt: Fix installation error on Windows Apparently all this time we weren't checking if the user is using Windows... --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7612934..bf72df8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ set(NVDIALOG_MAXBUF 4096) # 2. Most linkers shipped with distributions do not search on /usr/local for shared libraries. # This means the library won't be found at runtime unless LD_LIBRARY_PATH is set to do so. # For that reason, we set the prefix to /usr. -if (NOT DEFINED ENV{FLATPAK_ID}) +if (NOT DEFINED $ENV{FLATPAK_ID} AND CMAKE_HOST_UNIX AND NOT CMAKE_HOST_APPLE) set(CMAKE_INSTALL_PREFIX /usr) endif() @@ -30,6 +30,7 @@ endif() if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR APPLE) set(CMAKE_C_COMPILER clang) set(MACOSX TRUE) + enable_language(OBJC) # See #55 else() set(MACOSX FALSE) endif()