CMake minimum required lowered to 3.1
[flac.git] / src / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.0)
2
3 option(ENABLE_64_BIT_WORDS "Set FLAC__BYTES_PER_WORD to 8 (4 is the default)" OFF)
4 option(WITH_XMMS "Build XMMS plugin" OFF)
5
6 check_include_file("iconv.h" HAVE_ICONV)
7
8 add_subdirectory("libFLAC")
9 if(BUILD_CXXLIBS)
10     add_subdirectory("libFLAC++")
11 endif()
12 add_subdirectory("flac")
13 add_subdirectory("metaflac")
14 add_subdirectory("share")
15 add_subdirectory("utils")
16
17 if(WITH_XMMS)
18     add_subdirectory("plugin_common")
19     add_subdirectory("plugin_xmms")
20 endif()
21
22 if(BUILD_TESTING)
23     add_subdirectory("test_libs_common")
24     add_subdirectory("test_libFLAC")
25     if(BUILD_CXXLIBS)
26         add_subdirectory("test_libFLAC++")
27     endif()
28     add_subdirectory("test_grabbag")
29     add_subdirectory("test_seeking")
30     add_subdirectory("test_streams")
31 endif()