summaryrefslogtreecommitdiff
path: root/geography/opencpn/patches/patch-CMakeLists.txt
blob: d6189b13dd28b729553b2588f2289a2c3529095b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-CMakeLists.txt,v 1.3 2016/03/14 11:01:06 bouyer Exp $

--- CMakeLists.txt.orig	2016-02-03 18:44:17.000000000 +0100
+++ CMakeLists.txt	2016-02-17 17:40:51.000000000 +0100
@@ -282,7 +282,7 @@
 
 # Search for opengles, short of running a program to test the speed
 # of acceleration, I simply use gles on "native linux" arm systems
-IF (ARCH MATCHES "arm*" AND (NOT QT_ANDROID) )
+IF (ARCH MATCHES "arm*" AND (NOT QT_ANDROID) AND CMAKE_SYSTEM_NAME MATCHES ".*Linux" )
   find_path(OPENGLESv1_INCLUDE_DIR GLES/gl.h )
   IF (OPENGLESv1_INCLUDE_DIR)
     MESSAGE (STATUS "Found OpenGLESv1")
@@ -1755,9 +1755,9 @@
 
 #   Certain older Cmake FindGTK2 modules ( e.g. cmake-2.8.0-2) do not yield all of the required link libraries
 #   So, add them manually.  These declarations may be redundant in some architectures, but do no harm.
-IF(UNIX)
+IF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
 TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} dl )
-ENDIF(UNIX)
+ENDIF(CMAKE_SYSTEM_NAME MATCHES ".*Linux")
 
 IF(QT_LINUX)
   TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} Qt5Widgets Qt5OpenGL Qt5Gui Qt5Test Qt5Core )