summaryrefslogtreecommitdiff
blob: 185a1e23ed209642ccff050f1b0a7f5621369970 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
From 5d5315c5ddf2e3a6d92d6b5dba8a120b7c04f46a Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Mon, 15 Feb 2021 22:50:56 +0100
Subject: [PATCH 1/7] Use CMake's CTest which includes BUILD_TESTING option

BUILD_TESTING is default enabled, which is a good default anyway.
Move the CppUnit check to the root CMakeLists.txt, simpler and clearer.
BUILD_TESTS is obsolete.

The need for BUILD_SHARED_LIBS=OFF for testing is not clear, it works on Linux.
But I kept it in the instructions for now.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 CMakeLists.txt        | 13 +++++++++----
 ConfigureChecks.cmake | 10 ----------
 INSTALL.md            |  6 +++---
 3 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5fc91cc6..770fa046 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,8 @@ project(taglib)
 
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
 
+include(CTest)
+
 if(DEFINED ENABLE_STATIC)
   message(FATAL_ERROR "This option is no longer available, use BUILD_SHARED_LIBS instead")
 endif()
@@ -32,7 +34,6 @@ if(ENABLE_CCACHE)
 endif()
 
 option(VISIBILITY_HIDDEN "Build with -fvisibility=hidden" OFF)
-option(BUILD_TESTS "Build the test suite" OFF)
 option(BUILD_EXAMPLES "Build the examples" OFF)
 option(BUILD_BINDINGS "Build the bindings" ON)
 
@@ -147,9 +148,13 @@ if(BUILD_BINDINGS)
   add_subdirectory(bindings)
 endif()
 
-if(BUILD_TESTS AND NOT BUILD_SHARED_LIBS)
-  enable_testing()
-  add_subdirectory(tests)
+if(BUILD_TESTING)
+  find_package(CppUnit)
+  if(CppUnit_FOUND)
+    add_subdirectory(tests)
+  else()
+    message(WARNING "BUILD_TESTING requested, but CppUnit not found, skipping tests.")
+  endif()
 endif()
 
 if(BUILD_EXAMPLES)
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index bcdbfe20..2fe2f129 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -187,16 +187,6 @@ if(NOT ZLIB_SOURCE)
   endif()
 endif()
 
-# Determine whether CppUnit is installed.
-
-if(BUILD_TESTS AND NOT BUILD_SHARED_LIBS)
-  find_package(CppUnit)
-  if(NOT CppUnit_FOUND)
-    message(STATUS "CppUnit not found, disabling tests.")
-    set(BUILD_TESTS OFF)
-  endif()
-endif()
-
 # Detect WinRT mode
 if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
 	set(PLATFORM WINRT 1)
diff --git a/INSTALL.md b/INSTALL.md
index a398654e..19771aca 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -167,7 +167,7 @@ Unit Tests
 
 If you want to run the test suite to make sure TagLib works properly on your
 system, you need to have cppunit installed. To build the tests, include
-the option `-DBUILD_TESTS=ON -DBUILD_SHARED_LIBS=OFF` when running cmake.
+the option `-DBUILD_TESTING=ON` when running cmake.
 
 The test suite has a custom target in the build system, so you can run
 the tests using make:
@@ -183,7 +183,7 @@ Windows MinGW:
   - `mingw32-make; mingw32-make install DESTDIR=/path/to/install/dir`
 * Build TagLib with testing enabled:
   - ```
-    cmake -G "MinGW Makefiles" -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=OFF \
+    cmake -G "MinGW Makefiles" -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=OFF \
     -DCPPUNIT_INCLUDE_DIR=/path/to/cppunit/include \
     -DCPPUNIT_LIBRARIES=/path/to/cppunit/lib/libcppunit.a \
     -DCPPUNIT_INSTALLED_VERSION=1.15.1
@@ -200,7 +200,7 @@ Windows MSVS:
   - It may fail, but the needed libraries should be available in src\cppunit\DebugDll.
 * Build TagLib with testing enabled:
   - ```
-    cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON
+    cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON
     -DBUILD_SHARED_LIBS=OFF -DENABLE_STATIC_RUNTIME=ON
     -DCPPUNIT_INCLUDE_DIR=\path\to\cppunit\include
     -DCPPUNIT_LIBRARIES=\path\to\cppunit\DebugDll\cppunitd_dll.lib
-- 
2.30.1


From 2cb339f46cc5b544ad1c2bb5528fe39c07d9f56b Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Mon, 15 Feb 2021 23:11:38 +0100
Subject: [PATCH 2/7] Move finding ZLIB to root CMakeLists.txt

Small line decrease, but also easier to read what is happening.
Now all dependencies can be read from the root CMakeLists.txt file.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 CMakeLists.txt        | 22 +++++++++++++++-------
 ConfigureChecks.cmake | 11 -----------
 2 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 770fa046..e537aeb3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -101,8 +101,21 @@ math(EXPR TAGLIB_SOVERSION_PATCH "${TAGLIB_SOVERSION_REVISION}")
 
 include(ConfigureChecks.cmake)
 
-if(${ZLIB_FOUND})
-  set(ZLIB_LIBRARIES_FLAGS -lz)
+# Determine whether zlib is installed.
+
+if(NOT ZLIB_SOURCE)
+  find_package(ZLIB)
+  if(ZLIB_FOUND)
+    set(HAVE_ZLIB 1)
+    set(ZLIB_LIBRARIES_FLAGS -lz)
+  else()
+    set(HAVE_ZLIB 0)
+  endif()
+endif()
+
+if(NOT HAVE_ZLIB AND ZLIB_SOURCE)
+  set(HAVE_ZLIB 1)
+  set(HAVE_ZLIB_SOURCE 1)
 endif()
 
 if(NOT WIN32)
@@ -120,11 +133,6 @@ if(NOT BUILD_FRAMEWORK)
   install(FILES "${CMAKE_CURRENT_BINARY_DIR}/taglib.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
 endif()
 
-if(NOT HAVE_ZLIB AND ZLIB_SOURCE)
-  set(HAVE_ZLIB 1)
-  set(HAVE_ZLIB_SOURCE 1)
-endif()
-
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
 configure_file(config.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/config.h")
 
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 2fe2f129..7d2ff953 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -176,17 +176,6 @@ check_cxx_source_compiles("
   }
 " HAVE_ISO_STRDUP)
 
-# Determine whether zlib is installed.
-
-if(NOT ZLIB_SOURCE)
-  find_package(ZLIB)
-  if(ZLIB_FOUND)
-    set(HAVE_ZLIB 1)
-  else()
-    set(HAVE_ZLIB 0)
-  endif()
-endif()
-
 # Detect WinRT mode
 if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
 	set(PLATFORM WINRT 1)
-- 
2.30.1


From 6d94166dc6d2f12d9b913d8b672af32cec211440 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Mon, 15 Feb 2021 23:28:45 +0100
Subject: [PATCH 3/7] Use GNUInstallDirs

Well-established CMake standard for installation directories.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 CMakeLists.txt               | 14 ++++----------
 bindings/c/CMakeLists.txt    | 12 ++++++------
 bindings/c/taglib_c.pc.cmake |  8 ++++----
 taglib-config.cmake          |  4 ++--
 taglib-config.cmd.cmake      |  4 ++--
 taglib.pc.cmake              |  6 +++---
 taglib/CMakeLists.txt        | 10 +++++-----
 7 files changed, 26 insertions(+), 32 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e537aeb3..fb047350 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ project(taglib)
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
 
 include(CTest)
+include(GNUInstallDirs)
 
 if(DEFINED ENABLE_STATIC)
   message(FATAL_ERROR "This option is no longer available, use BUILD_SHARED_LIBS instead")
@@ -47,13 +48,6 @@ endif()
 add_definitions(-DHAVE_CONFIG_H)
 set(TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests/")
 
-## the following are directories where stuff will be installed to
-set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
-set(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Base directory for executables and libraries")
-set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The subdirectory to the binaries prefix (default prefix/bin)")
-set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})")
-set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The subdirectory to the header prefix")
-
 if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
@@ -120,17 +114,17 @@ endif()
 
 if(NOT WIN32)
   configure_file("${CMAKE_CURRENT_SOURCE_DIR}/taglib-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/taglib-config" @ONLY)
-  install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/taglib-config" DESTINATION "${BIN_INSTALL_DIR}")
+  install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/taglib-config" DESTINATION "${CMAKE_INSTALL_BINDIR}")
 endif()
 
 if(WIN32)
   configure_file("${CMAKE_CURRENT_SOURCE_DIR}/taglib-config.cmd.cmake" "${CMAKE_CURRENT_BINARY_DIR}/taglib-config.cmd")
-  install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/taglib-config.cmd" DESTINATION "${BIN_INSTALL_DIR}")
+  install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/taglib-config.cmd" DESTINATION "${CMAKE_INSTALL_BINDIR}")
 endif()
 
 if(NOT BUILD_FRAMEWORK)
   configure_file("${CMAKE_CURRENT_SOURCE_DIR}/taglib.pc.cmake" "${CMAKE_CURRENT_BINARY_DIR}/taglib.pc" @ONLY)
-  install(FILES "${CMAKE_CURRENT_BINARY_DIR}/taglib.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
+  install(FILES "${CMAKE_CURRENT_BINARY_DIR}/taglib.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
 endif()
 
 include_directories(${CMAKE_CURRENT_BINARY_DIR})
diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt
index ebb1267f..15f4e440 100644
--- a/bindings/c/CMakeLists.txt
+++ b/bindings/c/CMakeLists.txt
@@ -58,18 +58,18 @@ set_target_properties(tag_c PROPERTIES
   VERSION 0.0.0
   SOVERSION 0
   DEFINE_SYMBOL MAKE_TAGLIB_C_LIB
-  INSTALL_NAME_DIR ${LIB_INSTALL_DIR}
+  INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR}
 )
 install(TARGETS tag_c
 	FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
-	LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-	RUNTIME DESTINATION ${BIN_INSTALL_DIR}
-	ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-	PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/taglib
+	LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+	RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+	ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+	PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/taglib
 )
 
 if(NOT BUILD_FRAMEWORK)
 	configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc)
-	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
 endif()
 
diff --git a/bindings/c/taglib_c.pc.cmake b/bindings/c/taglib_c.pc.cmake
index 232f4f78..97f0b5a1 100644
--- a/bindings/c/taglib_c.pc.cmake
+++ b/bindings/c/taglib_c.pc.cmake
@@ -1,12 +1,12 @@
 prefix=${CMAKE_INSTALL_PREFIX}
 exec_prefix=${CMAKE_INSTALL_PREFIX}
-libdir=${LIB_INSTALL_DIR}
-includedir=${INCLUDE_INSTALL_DIR}
+libdir=${CMAKE_INSTALL_FULL_LIBDIR}
+includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}
 
 
 Name: TagLib C Bindings
 Description: Audio meta-data library (C bindings)
 Requires: taglib
 Version: ${TAGLIB_LIB_VERSION_STRING}
-Libs: -L${LIB_INSTALL_DIR} -ltag_c
-Cflags: -I${INCLUDE_INSTALL_DIR}/taglib 
+Libs: -L${CMAKE_INSTALL_FULL_LIBDIR} -ltag_c
+Cflags: -I${CMAKE_INSTALL_FULL_INCLUDEDIR}/taglib
diff --git a/taglib-config.cmake b/taglib-config.cmake
index d500fe60..9f251178 100644
--- a/taglib-config.cmake
+++ b/taglib-config.cmake
@@ -16,8 +16,8 @@ EOH
 
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_INSTALL_DIR@
-includedir=@INCLUDE_INSTALL_DIR@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
 
 flags=""
 
diff --git a/taglib-config.cmd.cmake b/taglib-config.cmd.cmake
index 1b807ec8..4e615c5e 100644
--- a/taglib-config.cmd.cmake
+++ b/taglib-config.cmd.cmake
@@ -27,8 +27,8 @@ goto theend
   *       to allow for static, shared or debug builds.
   * It would be preferable if the top level CMakeLists.txt provided the library name during config. ??
 :doit
-if /i "%1#" == "--libs#"    echo -L${LIB_INSTALL_DIR} -llibtag
-if /i "%1#" == "--cflags#"  echo -I${INCLUDE_INSTALL_DIR} -I${INCLUDE_INSTALL_DIR}/taglib
+if /i "%1#" == "--libs#"    echo -L${CMAKE_INSTALL_FULL_LIBDIR} -llibtag
+if /i "%1#" == "--cflags#"  echo -I${CMAKE_INSTALL_FULL_INCLUDEDIR} -I${CMAKE_INSTALL_FULL_INCLUDEDIR}/taglib
 if /i "%1#" == "--version#" echo ${TAGLIB_LIB_VERSION_STRING}
 if /i "%1#" == "--prefix#"  echo ${CMAKE_INSTALL_PREFIX}
 
diff --git a/taglib.pc.cmake b/taglib.pc.cmake
index 71ee09af..4ddabe12 100644
--- a/taglib.pc.cmake
+++ b/taglib.pc.cmake
@@ -1,11 +1,11 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_INSTALL_DIR@
-includedir=@INCLUDE_INSTALL_DIR@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
 
 Name: TagLib
 Description: Audio meta-data library
-Requires: 
+Requires:
 Version: @TAGLIB_LIB_VERSION_STRING@
 Libs: -L${libdir} -ltag @ZLIB_LIBRARIES_FLAGS@
 Cflags: -I${includedir} -I${includedir}/taglib
diff --git a/taglib/CMakeLists.txt b/taglib/CMakeLists.txt
index 563583ef..527c0073 100644
--- a/taglib/CMakeLists.txt
+++ b/taglib/CMakeLists.txt
@@ -344,7 +344,7 @@ endif()
 set_target_properties(tag PROPERTIES
   VERSION ${TAGLIB_SOVERSION_MAJOR}.${TAGLIB_SOVERSION_MINOR}.${TAGLIB_SOVERSION_PATCH}
   SOVERSION ${TAGLIB_SOVERSION_MAJOR}
-  INSTALL_NAME_DIR ${LIB_INSTALL_DIR}
+  INSTALL_NAME_DIR ${CMAKE_INSTALL_LIBDIR}
   DEFINE_SYMBOL MAKE_TAGLIB_LIB
   LINK_INTERFACE_LIBRARIES ""
   PUBLIC_HEADER "${tag_HDRS}"
@@ -365,8 +365,8 @@ endif()
 
 install(TARGETS tag
   FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
-  LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-  RUNTIME DESTINATION ${BIN_INSTALL_DIR}
-  ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-  PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/taglib
+  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/taglib
 )
-- 
2.30.1


From b23eb1f4208ca8a5806648bf1a442c55a06aeeae Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Mon, 15 Feb 2021 23:31:00 +0100
Subject: [PATCH 4/7] Use FeatureSummary for a nice CMake summary output

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fb047350..0370bd05 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ project(taglib)
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
 
 include(CTest)
+include(FeatureSummary)
 include(GNUInstallDirs)
 
 if(DEFINED ENABLE_STATIC)
@@ -173,3 +174,5 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_C
 if(NOT TARGET uninstall)
   add_custom_target(uninstall COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
 endif()
+
+feature_summary(WHAT ALL   FATAL_ON_MISSING_REQUIRED_PACKAGES)
-- 
2.30.1


From bcdae81dee3ff7e044e862b31f92b4a281fa19d1 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Mon, 15 Feb 2021 23:44:11 +0100
Subject: [PATCH 5/7] Just set CMAKE_MODULE_PATH instead of list(APPEND), drop
 ENABLE_STATIC err

ENABLE_STATIC error has been there since 2014, that is long enough.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 CMakeLists.txt | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0370bd05..f5b1c479 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,16 +2,12 @@ cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
 
 project(taglib)
 
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
 
 include(CTest)
 include(FeatureSummary)
 include(GNUInstallDirs)
 
-if(DEFINED ENABLE_STATIC)
-  message(FATAL_ERROR "This option is no longer available, use BUILD_SHARED_LIBS instead")
-endif()
-
 option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
 if(APPLE)
   option(BUILD_FRAMEWORK "Build an OS X framework" OFF)
-- 
2.30.1


From 5b94ac436b02ee9280de7fd705e7d02d77bd1a43 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Mon, 15 Feb 2021 23:47:26 +0100
Subject: [PATCH 6/7] Install examples after we selected to build them

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 examples/CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index f991739d..2360ada0 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -38,3 +38,8 @@ target_link_libraries(framelist tag)
 add_executable(strip-id3v1 strip-id3v1.cpp)
 target_link_libraries(strip-id3v1 tag)
 
+install(TARGETS tagreader tagreader_c tagwriter framelist strip-id3v1
+  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
-- 
2.30.1


From b8ee92c5b53df4259fae6499a7e1f9d1cb275a85 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Tue, 16 Feb 2021 00:19:05 +0100
Subject: [PATCH 7/7] Install taglib.png icon into html folder structure

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 CMakeLists.txt      | 2 +-
 doc/api-header.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5b1c479..759b23c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -161,7 +161,7 @@ if(BUILD_EXAMPLES)
 endif()
 
 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake" "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
-file(COPY doc/taglib.png DESTINATION doc)
+file(COPY doc/taglib.png DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/doc/html)
 add_custom_target(docs doxygen)
 
 # uninstall target
diff --git a/doc/api-header.html b/doc/api-header.html
index ab133c25..52617513 100644
--- a/doc/api-header.html
+++ b/doc/api-header.html
@@ -12,7 +12,7 @@
       <table border="0" width="100%">
           <tr>
             <td width="1">
-              <img src="../taglib.png">
+              <img src="taglib.png">
             </td>
             <td>
               <div id="intro">
-- 
2.30.1