-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
41 lines (29 loc) · 1.07 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required(VERSION 3.1.0)
project(kiss-fft VERSION 2.0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()
include(GNUInstallDirs)
cmake_policy(SET CMP0048 NEW) # set VERSION in project()
cmake_policy(SET CMP0042 NEW) # enable MACOSX_RPATH by default
if (MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wall -Wconversion -Wextra -pedantic)
endif()
add_library(kiss-fft STATIC kiss_fft.cpp kiss_fftr.cpp)
target_include_directories(kiss-fft PRIVATE .)
list(APPEND MYHEADERS kiss_fft.h kiss_fftr.h _kiss_fft_guts.h)
set_target_properties(kiss-fft PROPERTIES
VERSION ${PROJECT_VERSION}
PUBLIC_HEADER "${MYHEADERS}")
install(TARGETS kiss-fft EXPORT kiss-fft-targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(EXPORT kiss-fft-targets
DESTINATION lib/cmake/kiss-fft
FILE kiss-fft-config.cmake
)