FLAC now depends on win_utf8_io

Accidently found this missing dependency
This commit is contained in:
Vitaliy Kirsanov 2019-04-14 11:17:08 +03:00 committed by Erik de Castro Lopo
parent 8610c3acfb
commit 2359563a46
9 changed files with 22 additions and 26 deletions

View 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}")

View 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)

View 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)

View 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}/")

View 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

View 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)

View 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)

View File

@ -1,4 +1,2 @@
add_executable(flacdiff main.cpp)
target_link_libraries(flacdiff
FLACXX-static
$<TARGET_NAME_IF_EXISTS:win_utf8_io>)
target_link_libraries(flacdiff FLAC++-static)

View File

@ -1,2 +1,2 @@
add_executable(flactimer main.cpp)
target_link_libraries(flactimer FLACXX-static)
target_link_libraries(flactimer FLAC++-static)