51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 018d9ea0..827bf33e 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -312,19 +312,15 @@ IF (WIN32)
|
|
endif (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
endif (WIN32)
|
|
|
|
-# on BSD this must be explicitly linked
|
|
-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
|
- # Not needed on Debian GNU/kFreeBSD..
|
|
- if (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
|
|
- find_library(EXECINFO_LIBRARY NAMES execinfo)
|
|
- endif (NOT CMAKE_SYSTEM_NAME MATCHES "kFreeBSD")
|
|
-
|
|
- # OpenBSD needs the X11 include directory in order to find GL/glu.h
|
|
- if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
|
- find_package(X11 REQUIRED)
|
|
- include_directories(${X11_INCLUDE_DIR})
|
|
- endif ()
|
|
-endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
|
+# Find libexecinfo and libintl for musl
|
|
+find_library(EXECINFO_LIBRARY NAMES execinfo)
|
|
+find_library(INTL_LIBRARY NAMES intl)
|
|
+
|
|
+# OpenBSD needs the X11 include directory in order to find GL/glu.h
|
|
+if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
|
+ find_package(X11 REQUIRED)
|
|
+ include_directories(${X11_INCLUDE_DIR})
|
|
+endif ()
|
|
|
|
if (NOT DEFINED WL_VERSION)
|
|
include (${CMAKE_SOURCE_DIR}/cmake/BzrRevision.cmake)
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
index 31f5a76e..1f27495f 100644
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -140,9 +140,9 @@ wl_library(widelands_options
|
|
logic_filesystem_constants
|
|
)
|
|
|
|
-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
|
- target_link_libraries(widelands_ball_of_mud ${EXECINFO_LIBRARY})
|
|
-endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
|
|
+if (EXECINFO_LIBRARY OR INTL_LIBRARY)
|
|
+ target_link_libraries(widelands_ball_of_mud ${EXECINFO_LIBRARY} ${INTL_LIBRARY})
|
|
+endif (EXECINFO_LIBRARY OR INTL_LIBRARY)
|
|
|
|
if (WIN32)
|
|
target_link_libraries(widelands_ball_of_mud wsock32)
|