Package: libsdsl / 2.0.3-4

0001-Patch-cmake-files.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
From: Tomasz Buchert <tomasz@debian.org>
Date: Tue, 25 Aug 2015 09:36:21 +0200
Subject: Patch cmake files

We change three things:

   * we comment out machine-specific compiler flags
   * we disable compilation of "external" libraries; libdivsufsort is
     packaged in Debian now
   * use GNUInstallDirs
---
 CMakeLists.txt              | 21 ++++++++++++---------
 include/sdsl/CMakeLists.txt |  2 +-
 lib/CMakeLists.txt          |  6 +++---
 3 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 20b1377..8f9da0f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,17 +51,20 @@ else()
     append_cxx_compiler_flags("-O3 -ffast-math -funroll-loops" "CLANG" CMAKE_CXX_OPT_FLAGS)
 endif()
 
+## disable machine-specific flags
+# include(CheckSSE4_2)
+# if( BUILTIN_POPCNT )
+#    if( CMAKE_COMPILER_IS_GNUCXX )
+#         append_cxx_compiler_flags("-msse4.2" "GCC" CMAKE_CXX_OPT_FLAGS)
+#     else()
+#         append_cxx_compiler_flags("-msse4.2" "CLANG" CMAKE_CXX_OPT_FLAGS)
+#     endif()
+# endif()
 
-include(CheckSSE4_2)
-if( BUILTIN_POPCNT )
-    if( CMAKE_COMPILER_IS_GNUCXX )
-        append_cxx_compiler_flags("-msse4.2" "GCC" CMAKE_CXX_OPT_FLAGS)
-    else()
-        append_cxx_compiler_flags("-msse4.2" "CLANG" CMAKE_CXX_OPT_FLAGS)
-    endif()
-endif()
+include(GNUInstallDirs)
 
-add_subdirectory(external)
+## we use packaged libdivsufsort
+# add_subdirectory(external)
 add_subdirectory(include)
 add_subdirectory(lib)
 
diff --git a/include/sdsl/CMakeLists.txt b/include/sdsl/CMakeLists.txt
index ef921f0..cbed536 100644
--- a/include/sdsl/CMakeLists.txt
+++ b/include/sdsl/CMakeLists.txt
@@ -11,7 +11,7 @@ file(GLOB hppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_
 
 foreach(hppFile ${hppFiles}) # copy each file
 	configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/${hppFile}" "${CMAKE_CURRENT_BINARY_DIR}/${hppFile}" COPYONLY ) 
-	install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${hppFile}" DESTINATION include/sdsl)
+	install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${hppFile}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/sdsl")
 #	MESSAGE(${hppFile})
 endforeach(hppFile)
 
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 32888b2..ff7fb02 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -1,6 +1,6 @@
 include_directories(#"${CMAKE_CURRENT_SOURCE_DIR}/../include"
 					"${CMAKE_CURRENT_BINARY_DIR}/../include" 
-					"${CMAKE_CURRENT_BINARY_DIR}/../external/libdivsufsort-2.0.1/include" 
+#					"${CMAKE_CURRENT_BINARY_DIR}/../external/libdivsufsort-2.0.1/include" 
 					)
 
 
@@ -12,8 +12,8 @@ add_library( sdsl ${sdsl_SRCS} )
 
 install(TARGETS sdsl
 		RUNTIME DESTINATION bin
-		LIBRARY DESTINATION lib
-		ARCHIVE DESTINATION lib)	
+		LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+		ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
 
 set_target_properties(sdsl PROPERTIES
 	VERSION "${LIBRARY_VERSION_FULL}"