Skip to content

Commit 3c891af

Browse files
CMake: Minor improvements
1 parent 187045e commit 3c891af

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
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

0 commit comments

Comments
 (0)