summaryrefslogtreecommitdiff
path: root/src/share
diff options
context:
space:
mode:
Diffstat (limited to 'src/share')
-rw-r--r--src/share/CMakeLists.txt8
-rw-r--r--src/share/getopt/CMakeLists.txt12
-rw-r--r--src/share/grabbag/CMakeLists.txt12
-rw-r--r--src/share/replaygain_analysis/CMakeLists.txt2
-rw-r--r--src/share/replaygain_synthesis/CMakeLists.txt2
-rw-r--r--src/share/utf8/CMakeLists.txt9
-rw-r--r--src/share/win_utf8_io/CMakeLists.txt1
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)