Skip to content

Commit

Permalink
CMakeLists.txt: Fix installation error on Windows
Browse files Browse the repository at this point in the history
Apparently all this time we weren't checking if the user is using Windows...
  • Loading branch information
tseli0s committed May 24, 2024
1 parent 7affb4b commit 1490c26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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()
Expand Down

0 comments on commit 1490c26

Please sign in to comment.