Skip to content

Commit

Permalink
CMake: Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniovazquezblanco committed Jun 15, 2024
1 parent 187045e commit 3c891af
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
cmake_minimum_required (VERSION 3.0)

project (fftw VERSION 3.3.10 LANGUAGES C)

if (NOT DEFINED CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type")
endif ()

project (fftw)

if (POLICY CMP0042)
cmake_policy (SET CMP0042 NEW)
endif ()
Expand Down Expand Up @@ -279,8 +279,6 @@ if (HAVE_AVX2)
list (APPEND SOURCEFILES ${fftw_dft_simd_avx2_SOURCE} ${fftw_rdft_simd_avx2_SOURCE})
endif ()

set (FFTW_VERSION 3.3.10)

set (PREC_SUFFIX)
if (ENABLE_FLOAT)
set (FFTW_SINGLE TRUE)
Expand Down Expand Up @@ -370,7 +368,7 @@ if (OPENMP_FOUND)
endif ()

foreach(subtarget ${subtargets})
set_target_properties (${subtarget} PROPERTIES SOVERSION 3.6.9 VERSION 3)
set_target_properties (${subtarget} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
install (TARGETS ${subtarget}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down Expand Up @@ -424,7 +422,7 @@ set (prefix ${CMAKE_INSTALL_PREFIX})
set (exec_prefix ${CMAKE_INSTALL_PREFIX})
set (libdir ${CMAKE_INSTALL_FULL_LIBDIR})
set (includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
set (VERSION ${FFTW_VERSION})
set (VERSION ${PROJECT_VERSION})
configure_file (fftw.pc.in fftw3${PREC_SUFFIX}.pc @ONLY)
install (FILES
${CMAKE_CURRENT_BINARY_DIR}/fftw3${PREC_SUFFIX}.pc
Expand Down

0 comments on commit 3c891af

Please sign in to comment.