Skip to content

Commit 82af6ce

Browse files
CMake: Minor improvements
1 parent 187045e commit 82af6ce

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
cmake_minimum_required (VERSION 3.0)
22

3+
project (fftw VERSION 3.3.10 LANGUAGES C)
4+
35
if (NOT DEFINED CMAKE_BUILD_TYPE)
46
set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type")
57
endif ()
68

7-
project (fftw)
8-
99
if (POLICY CMP0042)
1010
cmake_policy (SET CMP0042 NEW)
1111
endif ()
@@ -279,8 +279,6 @@ if (HAVE_AVX2)
279279
list (APPEND SOURCEFILES ${fftw_dft_simd_avx2_SOURCE} ${fftw_rdft_simd_avx2_SOURCE})
280280
endif ()
281281

282-
set (FFTW_VERSION 3.3.10)
283-
284282
set (PREC_SUFFIX)
285283
if (ENABLE_FLOAT)
286284
set (FFTW_SINGLE TRUE)
@@ -370,7 +368,7 @@ if (OPENMP_FOUND)
370368
endif ()
371369

372370
foreach(subtarget ${subtargets})
373-
set_target_properties (${subtarget} PROPERTIES SOVERSION 3.6.9 VERSION 3)
371+
set_target_properties (${subtarget} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
374372
install (TARGETS ${subtarget}
375373
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
376374
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
@@ -424,7 +422,7 @@ set (prefix ${CMAKE_INSTALL_PREFIX})
424422
set (exec_prefix ${CMAKE_INSTALL_PREFIX})
425423
set (libdir ${CMAKE_INSTALL_FULL_LIBDIR})
426424
set (includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
427-
set (VERSION ${FFTW_VERSION})
425+
set (VERSION ${PROJECT_VERSION})
428426
configure_file (fftw.pc.in fftw3${PREC_SUFFIX}.pc @ONLY)
429427
install (FILES
430428
${CMAKE_CURRENT_BINARY_DIR}/fftw3${PREC_SUFFIX}.pc

FFTW3ConfigVersion.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
set (PACKAGE_VERSION "@FFTW_VERSION@")
2+
set (PACKAGE_VERSION "@PROJECT_VERSION@")
33

44
# Check whether the requested PACKAGE_FIND_VERSION is compatible
55
if ("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ FFTW3@PREC_SUFFIX@Config.cmake: $(top_srcdir)/FFTW3Config.cmake.in
151151
$(top_srcdir)/FFTW3Config.cmake.in > $@
152152
FFTW3@PREC_SUFFIX@ConfigVersion.cmake: $(top_srcdir)/FFTW3ConfigVersion.cmake.in
153153
$(SED) \
154-
-e 's|[@]FFTW_VERSION@|@PACKAGE_VERSION@|g' \
154+
-e 's|[@]PROJECT_VERSION@|@PACKAGE_VERSION@|g' \
155155
$(top_srcdir)/FFTW3ConfigVersion.cmake.in > $@
156156
cmakedir = $(libdir)/cmake/fftw3
157157
cmake_DATA = FFTW3@PREC_SUFFIX@Config.cmake FFTW3@PREC_SUFFIX@ConfigVersion.cmake

cmake.config.h.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
#define PACKAGE_NAME "fftw"
295295

296296
/* Define to the full name and version of this package. */
297-
#define PACKAGE_STRING "fftw @FFTW_VERSION@"
297+
#define PACKAGE_STRING "fftw @PROJECT_VERSION@"
298298

299299
/* Define to the one symbol short name of this package. */
300300
#define PACKAGE_TARNAME "fftw"
@@ -303,7 +303,7 @@
303303
#define PACKAGE_URL ""
304304

305305
/* Define to the version of this package. */
306-
#define PACKAGE_VERSION "@FFTW_VERSION@"
306+
#define PACKAGE_VERSION "@PROJECT_VERSION@"
307307

308308
/* Define to necessary symbol if this constant uses a non-standard name on
309309
your system. */
@@ -366,7 +366,7 @@
366366
#cmakedefine USING_POSIX_THREADS 1
367367

368368
/* Version number of package */
369-
#define VERSION "@FFTW_VERSION@"
369+
#define VERSION "@PROJECT_VERSION@"
370370

371371
/* Use common Windows Fortran mangling styles for the Fortran interfaces. */
372372
/* #undef WINDOWS_F77_MANGLING */

0 commit comments

Comments
 (0)