Package: opensurgsim / 0.7.0-8

fix-hurd-build.patch Patch series | download
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
Description: Remove CMake checks on CMAKE_SYSTEM_NAME equals Linux
 In a couple CMakeLists.txt decisions are made based on the CMAKE_SYSTEM_NAME
 being equal to 'Linux'. For Debian GNU/Hurd this resulted in the wrong options
 being used.
Author: Paul Novotny <paul@paulnovo.us>
Last-Update: 2016-10-14

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,12 +63,10 @@
 endif(WIN32)
 find_package(GLUT)  # only needed for visual device tests
 find_package(GlutFromOsg)  # look for GLUT in the OSG tree if not found above
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-	# The standard FindGLUT code in CMake 2.8 includes some annoying old
-	# junk (-lXmu -lXi) in GLUT_LIBRARIES for Unix/Linux, which is
-	# neither needed nor usually available.  We only need GLUT itself.
-	set(GLUT_LIBRARIES ${GLUT_glut_LIBRARY})
-endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+# The standard FindGLUT code in CMake 2.8 includes some annoying old
+# junk (-lXmu -lXi) in GLUT_LIBRARIES for Unix/Linux, which is
+# neither needed nor usually available.  We only need GLUT itself.
+set(GLUT_LIBRARIES ${GLUT_glut_LIBRARY})
 
 if(${BUILD_SHARED_LIBS})
 	set(Boost_USE_STATIC_LIBS OFF)
@@ -85,9 +83,7 @@
 find_package(Threads REQUIRED)
 # Append pthread and rt to Boost_LIBRARIES since they are boost dependancies
 list(APPEND Boost_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-	list(APPEND Boost_LIBRARIES rt)
-endif()
+list(APPEND Boost_LIBRARIES rt)
 
 find_package(yaml-cpp 0.5.2 QUIET)
 if(yaml-cpp_FOUND)
--- a/SurgSim/Devices/MultiAxis/CMakeLists.txt
+++ b/SurgSim/Devices/MultiAxis/CMakeLists.txt
@@ -13,11 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-else(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-	find_package(WDK REQUIRED)
-endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-
 include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
 
 if(WDK_FOUND)
@@ -88,13 +83,8 @@
 	win32/WdkHidDeviceHandle.h
 )
 
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-	list(APPEND MULTIAXIS_DEVICE_SOURCES ${MULTIAXIS_DEVICE_LINUX_SOURCES})
-	list(APPEND MULTIAXIS_DEVICE_HEADERS ${MULTIAXIS_DEVICE_LINUX_HEADERS})
-elseif(WDK_FOUND)
-	list(APPEND MULTIAXIS_DEVICE_SOURCES ${MULTIAXIS_DEVICE_WDK_HID_SOURCES})
-	list(APPEND MULTIAXIS_DEVICE_HEADERS ${MULTIAXIS_DEVICE_WDK_HID_HEADERS})
-endif()
+list(APPEND MULTIAXIS_DEVICE_SOURCES ${MULTIAXIS_DEVICE_LINUX_SOURCES})
+list(APPEND MULTIAXIS_DEVICE_HEADERS ${MULTIAXIS_DEVICE_LINUX_HEADERS})
 
 # TODO(advornik): the installation should NOT copy all the headers...
 surgsim_add_library(