FLAC now depends on win_utf8_io
authorVitaliy Kirsanov <krokoziabla@yandex-team.ru>
Sun, 14 Apr 2019 08:17:08 +0000 (11:17 +0300)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 4 May 2019 01:41:48 +0000 (11:41 +1000)
Accidently found this missing dependency

CMakeLists.txt
examples/cpp/decode/file/CMakeLists.txt
examples/cpp/encode/file/CMakeLists.txt
src/libFLAC++/CMakeLists.txt
src/libFLAC/CMakeLists.txt
src/share/grabbag/CMakeLists.txt
src/test_libFLAC++/CMakeLists.txt
src/utils/flacdiff/CMakeLists.txt
src/utils/flactimer/CMakeLists.txt

index b7dd296..8f83b38 100644 (file)
@@ -119,7 +119,7 @@ install(
     DESTINATION "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake")
 
 file(GLOB FLAC_HEADERS "include/FLAC/*.h")
-file(GLOB FLACXX_HEADERS "include/FLAC++/*.h")
+file(GLOB FLAC++_HEADERS "include/FLAC++/*.h")
 install(FILES ${FLAC_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/FLAC")
-install(FILES ${FLACXX_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/FLAC++")
+install(FILES ${FLAC++_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/FLAC++")
 install(FILES "man/flac.1" "man/metaflac.1" DESTINATION "${CMAKE_INSTALL_MANDIR}")
index 0cea828..46ab401 100644 (file)
@@ -1,2 +1,2 @@
 add_executable(decode_file_cxx main.cpp)
-target_link_libraries(decode_file_cxx FLACXX-static)
+target_link_libraries(decode_file_cxx FLAC++-static)
index b4526d7..cc11721 100644 (file)
@@ -1,2 +1,2 @@
 add_executable(encode_file_cxx main.cpp)
-target_link_libraries(encode_file_cxx FLACXX-static)
+target_link_libraries(encode_file_cxx FLAC++-static)
index f6d6110..e73ffcb 100644 (file)
@@ -25,25 +25,25 @@ set(SOURCES
     stream_decoder.cpp
     stream_encoder.cpp)
 
-add_library(FLACXX-static STATIC ${SOURCES})
-target_compile_definitions(FLACXX-static PUBLIC FLAC__NO_DLL)
-target_include_directories(FLACXX-static INTERFACE
+add_library(FLAC++-static STATIC ${SOURCES})
+target_compile_definitions(FLAC++-static PUBLIC FLAC__NO_DLL)
+target_include_directories(FLAC++-static INTERFACE
     "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
     "$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>")
-target_link_libraries(FLACXX-static PUBLIC FLAC-static)
+target_link_libraries(FLAC++-static PUBLIC FLAC-static)
 
-add_library(FLACXX SHARED ${SOURCES})
-target_compile_definitions(FLACXX PRIVATE FLACPP_API_EXPORTS FLAC__USE_VISIBILITY_ATTR)
-target_include_directories(FLACXX INTERFACE
+add_library(FLAC++ SHARED ${SOURCES})
+target_compile_definitions(FLAC++ PRIVATE FLACPP_API_EXPORTS FLAC__USE_VISIBILITY_ATTR)
+target_include_directories(FLAC++ INTERFACE
     "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
     "$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>")
-target_link_libraries(FLACXX PRIVATE FLAC)
-set_target_properties(FLACXX PROPERTIES
+target_link_libraries(FLAC++ PRIVATE FLAC)
+set_target_properties(FLAC++ PROPERTIES
     CXX_VISIBILITY_PRESET hidden
     VERSION 6.3.0
     SOVERSION 6)
 
-install(TARGETS FLACXX FLACXX-static EXPORT targets
+install(TARGETS FLAC++ FLAC++-static EXPORT targets
     ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/"
     LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/"
     RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/")
index 594b672..17d940b 100644 (file)
@@ -107,15 +107,13 @@ target_include_directories(FLAC-static INTERFACE
     "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
     "$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>")
 target_link_libraries(FLAC-static PUBLIC
-    $<TARGET_NAME_IF_EXISTS:Ogg::Ogg-static>
+    $<TARGET_NAME_IF_EXISTS:win_utf8_io>
     $<TARGET_NAME_IF_EXISTS:FLAC-asm>
     $<$<BOOL:${HAVE_LROUND}>:m>)
 if(TARGET Ogg::Ogg-static)
-    target_link_libraries(FLAC-static PUBLIC
-        $<TARGET_NAME_IF_EXISTS:Ogg::Ogg-static>)
+    target_link_libraries(FLAC-static PUBLIC Ogg::Ogg-static)
 elseif(TARGET Ogg::Ogg)
-    target_link_libraries(FLAC-static PUBLIC
-        $<TARGET_NAME_IF_EXISTS:Ogg::Ogg>)
+    target_link_libraries(FLAC-static PUBLIC Ogg::Ogg)
 endif()
 
 add_library(FLAC SHARED ${SOURCES})
@@ -126,6 +124,7 @@ target_include_directories(FLAC INTERFACE
 target_link_libraries(FLAC PRIVATE
     $<TARGET_NAME_IF_EXISTS:Ogg::Ogg>
     $<TARGET_NAME_IF_EXISTS:FLAC-asm>
+    $<TARGET_NAME_IF_EXISTS:win_utf8_io>
     $<$<BOOL:${HAVE_LROUND}>:m>)
 set_target_properties(FLAC PROPERTIES
     C_VISIBILITY_PRESET hidden
index 6d405d0..a7ab166 100644 (file)
@@ -8,5 +8,4 @@ add_library(grabbag STATIC
     snprintf.c)
 target_link_libraries(grabbag
     FLAC-static
-    replaygain_analysis
-    $<TARGET_NAME_IF_EXISTS:win_utf8_io>)
+    replaygain_analysis)
index 27f3cdb..91d2a17 100644 (file)
@@ -5,4 +5,4 @@ add_executable(test_libFLAC++
     metadata.cpp
     metadata_manip.cpp
     metadata_object.cpp)
-target_link_libraries(test_libFLAC++ FLACXX-static test_libs_common grabbag)
+target_link_libraries(test_libFLAC++ FLAC++-static test_libs_common grabbag)
index d64383f..7f1421e 100644 (file)
@@ -1,4 +1,2 @@
 add_executable(flacdiff main.cpp)
-target_link_libraries(flacdiff 
-    FLACXX-static
-    $<TARGET_NAME_IF_EXISTS:win_utf8_io>)
\ No newline at end of file
+target_link_libraries(flacdiff FLAC++-static)
index d40de89..40db1cf 100644 (file)
@@ -1,2 +1,2 @@
 add_executable(flactimer main.cpp)
-target_link_libraries(flactimer FLACXX-static)
+target_link_libraries(flactimer FLAC++-static)