From 8e61a871325a69274ca4002342dbe29a666ff83c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Fri, 15 Aug 2014 23:32:38 +0200
Subject: Drop FORCE from install dir variables

Why the hell force users to install to places that only fit
a specific OS? No need to use CMake then...

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 317ffa1..e0b86b7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,10 +26,10 @@ 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" FORCE)
-set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "The subdirectory to the binaries prefix (default prefix/bin)" FORCE)
-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})" FORCE)
-set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "The subdirectory to the header prefix" FORCE)
+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(APPLE)
 	option(BUILD_FRAMEWORK "Build an OS X framework" OFF)
-- 
1.8.3.4


From a277f4a1ef09a828a10aa9136e555a3eb6e8dc4c Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 1 Dec 2014 21:02:22 +0000
Subject: fix pkgconfig paths


diff --git a/CMakeLists.txt b/CMakeLists.txt
index e0b86b7..8581dfc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,7 +77,7 @@ if(WIN32)
 endif()
 
 if(NOT WIN32 AND NOT BUILD_FRAMEWORK)
-  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib.pc )
+  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)
 endif()
 
diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt
index 2d9dafc..94ea8c9 100644
--- a/bindings/c/CMakeLists.txt
+++ b/bindings/c/CMakeLists.txt
@@ -62,7 +62,7 @@ install(TARGETS tag_c
 )
 
 if(NOT WIN32 AND NOT BUILD_FRAMEWORK)
-	configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc)
+	configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc @ONLY)
 	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 endif()
 
diff --git a/bindings/c/taglib_c.pc.cmake b/bindings/c/taglib_c.pc.cmake
index 61764fc..5450582 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}
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
 
 
 Name: TagLib C Bindings
 Description: Audio meta-data library (C bindings)
 Requires: taglib
-Version: ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}
-Libs: -L${LIB_INSTALL_DIR} -ltag_c
-Cflags: -I${INCLUDE_INSTALL_DIR}/taglib 
+Version: @TAGLIB_LIB_MAJOR_VERSION@.@TAGLIB_LIB_MINOR_VERSION@.@TAGLIB_LIB_PATCH_VERSION@
+Libs: -L${libdir} -ltag_c
+Cflags: -I${includedir}/taglib 
diff --git a/taglib.pc.cmake b/taglib.pc.cmake
index 909b8fc..8a5159d 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}
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_DIR@
 
 Name: TagLib
 Description: Audio meta-data library
 Requires: 
-Version: ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}
-Libs: -L${LIB_INSTALL_DIR} -ltag
-Cflags: -I${INCLUDE_INSTALL_DIR}/taglib 
+Version: @TAGLIB_LIB_MAJOR_VERSION@.@TAGLIB_LIB_MINOR_VERSION@.@TAGLIB_LIB_PATCH_VERSION@
+Libs: -L${libdir} -ltag
+Cflags: -I${includedir}/taglib 
-- 
1.8.3.4

