summarylogtreecommitdiffstats
path: root/fix_build_32bit.patch
blob: 33cb65864c68d9756d43386088f870b340cd3bee (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
diff '--color=auto' --unified --recursive --text chromaprint-1.5.1.orig/CMakeLists.txt chromaprint-1.5.1.new/CMakeLists.txt
--- chromaprint-1.5.1.orig/CMakeLists.txt	2021-12-23 02:57:54.000000000 -0300
+++ chromaprint-1.5.1.new/CMakeLists.txt	2021-12-28 18:06:18.377350124 -0300
@@ -1,11 +1,21 @@
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 2.8.12)
+
+if(POLICY CMP0042)
+	cmake_policy(SET CMP0042 NEW)
+endif()
+
+if(POLICY CMP0048)
+    cmake_policy(SET CMP0048 OLD)
+endif()
+
+project(chromaprint C CXX)

 set(chromaprint_VERSION_MAJOR 1)
 set(chromaprint_VERSION_MINOR 5)
 set(chromaprint_VERSION_PATCH 1)
 set(chromaprint_VERSION "${chromaprint_VERSION_MAJOR}.${chromaprint_VERSION_MINOR}.${chromaprint_VERSION_PATCH}")

-project(chromaprint LANGUAGES C CXX VERSION "${chromaprint_VERSION}")
+set(PROJECT_VERSION "${chromaprint_VERSION}")

 set(chromaprint_SOVERSION 1)

@@ -24,12 +34,14 @@

 option(BUILD_SHARED_LIBS "Build shared libraries" ON)

-set(CMAKE_CXX_STANDARD 11)
+check_cxx_compiler_flag("-std=c++14" COMPILER_SUPPORTS_CXX11)
+if(COMPILER_SUPPORTS_CXX11)
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+endif()

-if(BUILD_SHARED_LIBS)
-	set(CMAKE_C_VISIBILITY_PRESET hidden)
-	set(CMAKE_CXX_VISIBILITY_PRESET hidden)
-	set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
+if(CMAKE_COMPILER_IS_GNUCXX AND BUILD_SHARED_LIBS)
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
+	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
 endif()

 if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_BUILD_TYPE STREQUAL "Debug")