summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVitaliy Kirsanov <krokoziabla@yandex-team.ru>2019-12-21 12:41:53 +0300
committerErik de Castro Lopo <erikd@mega-nerd.com>2019-12-22 22:09:03 +1100
commit0dfe23504c53fd6fd90895ce6e94981025ad3f3c (patch)
tree55bd3ce36848bd41f758b94ca81443536eebbf21 /CMakeLists.txt
parenta3d8927c2b745d299bd039858dc1173586c6b0b0 (diff)
downloadflac-0dfe23504c53fd6fd90895ce6e94981025ad3f3c.tar.gz
CMake: Handier way to find Iconv
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad0a665a..560bb403 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,9 @@ if(WITH_OGG)
find_package(OGG REQUIRED)
endif()
+find_package(Iconv)
+set(HAVE_ICONV ${Iconv_FOUND})
+
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -funroll-loops")