summaryrefslogtreecommitdiffstats
path: root/src/openthreads-1-fixes.patch
blob: 2621288c7ad7d0ae7bebc239138b4e366e5147ac (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
This file is part of MXE.
See index.html for further information.

Contains ad hoc patches for cross building.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Rashad Kanavath <rashad.kanavath@c-s.fr>
Date: Mon, 11 Jan 2016 15:33:57 +1100
Subject: [PATCH] build standalone openthreads


diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -649,7 +649,7 @@ OPTION(OSG_USE_LOCAL_LUA_SOURCE "Enable to use local Lua source when building th
 #
 IF(ANDROID)
     ANDROID_3RD_PARTY()
-ELSE()
+ELSEIF(NOT OPENTHREADS_STANDALONE)
 # Common to all platforms except android:
     FIND_PACKAGE(Freetype)
     FIND_PACKAGE(Inventor)
@@ -787,7 +787,7 @@ ENDIF(BUILD_OSG_EXAMPLES AND NOT ANDROID)
 
 # Image readers/writers depend on 3rd party libraries except for OS X which
 # can use Quicktime.
-IF(NOT ANDROID)
+IF(NOT ANDROID AND NOT OPENTHREADS_STANDALONE)
     IF(NOT APPLE)
         FIND_PACKAGE(GIFLIB)
         FIND_PACKAGE(JPEG)
@@ -1044,7 +1044,9 @@ ELSE ()
     SET(OPENSCENEGRAPH_USER_DEFINED_DYNAMIC_OR_STATIC "STATIC")
 ENDIF()
 
-
+IF(OPENTHREADS_STANDALONE)
+ADD_SUBDIRECTORY(src/OpenThreads)
+ELSE()
 # OSG Core
 ADD_SUBDIRECTORY(src)
 
@@ -1055,7 +1057,7 @@ ENDIF()
 IF   (BUILD_OSG_EXAMPLES)
     ADD_SUBDIRECTORY(examples)
 ENDIF()
-
+ENDIF()
 
 IF(APPLE AND NOT ANDROID)
 
@@ -1250,7 +1252,9 @@ IF(CMAKE_CPACK_COMMAND)
 ENDIF()
 
 # Generate pkg-config configuration files
-
+IF(OPENTHREADS_STANDALONE)
+SET(PKGCONFIG_FILES)
+ELSE()
 SET(PKGCONFIG_FILES
   openscenegraph
   openscenegraph-osg
@@ -1269,6 +1273,7 @@ SET(PKGCONFIG_FILES
   openscenegraph-osgAnimation
   openscenegraph-osgVolume
 )
+ENDIF()
 
 IF(QT4_FOUND OR Qt5Widgets_FOUND )
   SET(PKGCONFIG_FILES ${PKGCONFIG_FILES} openscenegraph-osgQt)