PhobosK - 2018-06-11

Hi,
Sorry for writing a bug report here, but you have disabled the SF ticketing system...

There is a problem with the project() command used in the CMAKE files, especially when CMAKE > 3.0 is used project() CMP0048 policy
The second usage of the project() command if the -DBUILD_EXAMPLES=ON is used, removes any previous variable settings, thus at the end of the compilation libsoxr remains without a version (actually with version string "..") on the pkg-config level.

This way the configure scripts of the applications that use libsoxr and that utilize pkg-config, fail.....

I've reported this bug in the Gentoo bug #657300 reporting system where i proposed a patch....

Since I cannot attach files here, I am just pasting the patch's code... though I am sure you can find a better way to fix this...

--- a/CMakeLists.txt    2018-02-23 23:39:25.000000000 +0200
+++ b/CMakeLists.txt    2018-06-03 22:26:38.673844365 +0300
@@ -3,7 +3,7 @@

 cmake_minimum_required (VERSION 3.1 FATAL_ERROR)

-project (soxr C)
+project (soxr)
 set (DESCRIPTION_SUMMARY
     "High quality, one-dimensional sample-rate conversion library")

@@ -100,10 +100,6 @@
   set (LIBM_LIBRARIES m)
 endif ()

-if (${BUILD_EXAMPLES})
-  project (${PROJECT_NAME}) # Adds c++ compiler
-endif ()
-
 if (WITH_OPENMP)
   find_package (OpenMP)
   if (OPENMP_FOUND)

Thanks for your attention