summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-07-12 16:17:02 +0800
committerErik Kundiman <erik@megapahit.org>2023-07-19 12:42:50 +0800
commitb844e48297b6650003aa1f24bef618f7b652466c (patch)
tree6dd15c6a0964e2a73773e0d70a196c67e9358ce7
parent008a46e3080e811fe5e34607c0c4cceb77d829d5 (diff)
FreeBSD has SDL keyboard & window files built too
and any Linux SDL code should be applied to FreeBSD too.
-rw-r--r--indra/llwindow/CMakeLists.txt4
-rw-r--r--indra/llwindow/llwindowsdl.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index ca08e38f77..c2989e84c9 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -61,7 +61,7 @@ set(llwindow_LINK_LIBRARIES
)
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
-if (LINUX)
+if (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
list(APPEND viewer_SOURCE_FILES
llkeyboardsdl.cpp
llwindowsdl.cpp
@@ -84,7 +84,7 @@ if (LINUX)
)
endif (BUILD_HEADLESS)
-endif (LINUX)
+endif (LINUX OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
if (DARWIN)
list(APPEND llwindow_SOURCE_FILES
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index 8d55e0dc79..d9f7d07326 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -51,7 +51,7 @@ extern "C" {
# include "fontconfig/fontconfig.h"
}
-#if LL_LINUX
+#if LL_LINUX || LL_FREEBSD
// not necessarily available on random SDL platforms, so #if LL_LINUX
// for execv(), waitpid(), fork()
# include <unistd.h>
@@ -2490,7 +2490,7 @@ BOOL LLWindowSDL::dialogColorPicker( F32 *r, F32 *g, F32 *b)
}
#endif // LL_GTK
-#if LL_LINUX
+#if LL_LINUX || LL_FREEBSD
// extracted from spawnWebBrowser for clarity and to eliminate
// compiler confusion regarding close(int fd) vs. LLWindow::close()
void exec_cmd(const std::string& cmd, const std::string& arg)
@@ -2546,7 +2546,7 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
LL_INFOS() << "spawn_web_browser: " << escaped_url << LL_ENDL;
-#if LL_LINUX
+#if LL_LINUX || LL_FREEBSD
# if LL_X11
if (mSDL_Display)
{