aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorevpobr <evpobr@gmail.com>2020-05-02 10:54:28 +0500
committerErik de Castro Lopo <erikd@mega-nerd.com>2020-05-03 17:13:50 +1000
commite0b62a61a7b65aef187b038454925a34fa315125 (patch)
tree42cd4bd9f1924528b722fe0fcb6402c17348d94f /CMakeLists.txt
parent7a35c528495b6d8a51e87e007f6810b5553101bc (diff)
downloadflac-e0b62a61a7b65aef187b038454925a34fa315125.tar.gz
Bunch of CMake fixes
* Add more Git ignore patterns * Fix Ogg dependency handling (closes #203) * Remove unneeded compiler flag (closes #204) * Fix Visual Studio DLL build error error C2491: 'flac_internal_rename_utf8': definition of dllimport function not allowed (closes #205) * Add alias targets * Reduce number of CMake files * Improve CMake intrinsics detection
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c26b0b7..c83dd83e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,7 @@ option(INSTALL_CMAKE_CONFIG_MODULE "Install CMake package-config module" ON)
option(WITH_OGG "ogg support (default: test for libogg)" ON)
if(WITH_OGG)
- find_package(OGG REQUIRED)
+ find_package(Ogg REQUIRED)
endif()
find_package(Iconv)
@@ -36,9 +36,6 @@ endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef")
endif()
-if(CMAKE_C_COMPILER_ID MATCHES "GNU")
- set(CMAKE_EXE_LINKER_FLAGS -no-pie)
-endif()
include(CMakePackageConfigHelpers)
include(CPack)
@@ -57,7 +54,11 @@ include(TestBigEndian)
check_include_file("byteswap.h" HAVE_BYTESWAP_H)
check_include_file("inttypes.h" HAVE_INTTYPES_H)
check_include_file("stdint.h" HAVE_STDINT_H)
-check_include_file("x86intrin.h" FLAC__HAS_X86INTRIN)
+if(MSVC)
+ check_include_file("intrin.h" FLAC__HAS_X86INTRIN)
+else()
+ check_include_file("x86intrin.h" FLAC__HAS_X86INTRIN)
+endif()
check_function_exists(fseeko HAVE_FSEEKO)
@@ -140,7 +141,6 @@ if(INSTALL_CMAKE_CONFIG_MODULE)
FILES
"${CMAKE_CURRENT_BINARY_DIR}/flac-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/flac-config-version.cmake"
- "cmake/FindOGG.cmake"
DESTINATION "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake")
endif()