diff options
author | Vitaliy Kirsanov <krokoziabla@yandex-team.ru> | 2019-03-31 23:04:45 +0300 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2019-05-04 11:41:48 +1000 |
commit | c39718d7a36405114f9ed0b1a7acaef64ea88131 (patch) | |
tree | 3d3633d0af41f00ccb6f0ec4dc48f9b018d5ff7c /src/share | |
parent | 12ec86c6188aef9ebd4b9bd0393eab7326e185fc (diff) | |
download | flac-c39718d7a36405114f9ed0b1a7acaef64ea88131.tar.gz |
CMake support added
Diffstat (limited to 'src/share')
-rw-r--r-- | src/share/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/share/getopt/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/share/grabbag/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/share/replaygain_analysis/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/share/replaygain_synthesis/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/share/utf8/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/share/win_utf8_io/CMakeLists.txt | 1 |
7 files changed, 46 insertions, 0 deletions
diff --git a/src/share/CMakeLists.txt b/src/share/CMakeLists.txt new file mode 100644 index 00000000..b3c5a712 --- /dev/null +++ b/src/share/CMakeLists.txt @@ -0,0 +1,8 @@ +add_subdirectory("replaygain_analysis") +add_subdirectory("replaygain_synthesis") +add_subdirectory("getopt") +add_subdirectory("utf8") +if(WIN32) + add_subdirectory("win_utf8_io") +endif() +add_subdirectory("grabbag") diff --git a/src/share/getopt/CMakeLists.txt b/src/share/getopt/CMakeLists.txt new file mode 100644 index 00000000..a247336c --- /dev/null +++ b/src/share/getopt/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.12) + +check_include_file("libintl.h" HAVE_LIBINTL_H) +check_include_file("string.h" HAVE_STRING_H) + +add_compile_definitions( + $<$<BOOL:${HAVE_LIBINTL_H}>:HAVE_LIBINTL_H> + $<$<BOOL:${HAVE_STRING_H}>:HAVE_STRING_H>) + +add_library(getopt STATIC + getopt.c + getopt1.c) diff --git a/src/share/grabbag/CMakeLists.txt b/src/share/grabbag/CMakeLists.txt new file mode 100644 index 00000000..6d405d05 --- /dev/null +++ b/src/share/grabbag/CMakeLists.txt @@ -0,0 +1,12 @@ +add_library(grabbag STATIC + alloc.c + cuesheet.c + file.c + picture.c + replaygain.c + seektable.c + snprintf.c) +target_link_libraries(grabbag + FLAC-static + replaygain_analysis + $<TARGET_NAME_IF_EXISTS:win_utf8_io>) diff --git a/src/share/replaygain_analysis/CMakeLists.txt b/src/share/replaygain_analysis/CMakeLists.txt new file mode 100644 index 00000000..4362b902 --- /dev/null +++ b/src/share/replaygain_analysis/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(replaygain_analysis STATIC + replaygain_analysis.c) diff --git a/src/share/replaygain_synthesis/CMakeLists.txt b/src/share/replaygain_synthesis/CMakeLists.txt new file mode 100644 index 00000000..0736f4fc --- /dev/null +++ b/src/share/replaygain_synthesis/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(replaygain_synthesis STATIC + replaygain_synthesis.c) diff --git a/src/share/utf8/CMakeLists.txt b/src/share/utf8/CMakeLists.txt new file mode 100644 index 00000000..e0e32ac1 --- /dev/null +++ b/src/share/utf8/CMakeLists.txt @@ -0,0 +1,9 @@ +set(CMAKE_REQUIRED_LIBRARIES iconv) +check_symbol_exists(iconv "iconv.h" HAVE_ICONV_LIB) + +add_library(utf8 STATIC + charset.c + iconvert.c + utf8.c) + +target_link_libraries(utf8 PUBLIC $<$<BOOL:${HAVE_ICONV_LIB}>:iconv>) diff --git a/src/share/win_utf8_io/CMakeLists.txt b/src/share/win_utf8_io/CMakeLists.txt new file mode 100644 index 00000000..797e728b --- /dev/null +++ b/src/share/win_utf8_io/CMakeLists.txt @@ -0,0 +1 @@ +add_library(win_utf8_io STATIC win_utf8_io.c) |