diff options
| author | Markus Rickert <rickertm@users.noreply.github.com> | 2020-05-08 19:35:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-08 10:35:22 -0700 |
| commit | 2fc37d513a59d50f471b895c0f5d2c1f53456a6a (patch) | |
| tree | 0ebb4de3c8cdb8fcc2b95d43225b67e9aca12754 /ports/simage/link-flac-library.patch | |
| parent | 5db4f98d6e7d7b83285452020e8e147f8f0c8d7c (diff) | |
| download | vcpkg-2fc37d513a59d50f471b895c0f5d2c1f53456a6a.tar.gz vcpkg-2fc37d513a59d50f471b895c0f5d2c1f53456a6a.zip | |
[Coin3D] Add new ports for simage, Coin, and SoQt (#9880)
* [simage] Add new port
* [coin] Add new port
* [soqt] Add new port
Diffstat (limited to 'ports/simage/link-flac-library.patch')
| -rw-r--r-- | ports/simage/link-flac-library.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/ports/simage/link-flac-library.patch b/ports/simage/link-flac-library.patch new file mode 100644 index 000000000..7b8e35a10 --- /dev/null +++ b/ports/simage/link-flac-library.patch @@ -0,0 +1,60 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 775037a..2de9b9f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -108,6 +108,10 @@ find_package(Jasper) + find_package(OggVorbis)
+ find_package(Sndfile)
+
++if(SNDFILE_FOUND)
++ find_package(FLAC)
++endif()
++
+ if(APPLE AND SIMAGE_USE_CGIMAGE)
+ check_cxx_source_compiles("
+ #include <CoreFoundation/CoreFoundation.h>
+@@ -467,6 +471,9 @@ endif() + if(SNDFILE_FOUND)
+ target_include_directories(simage PRIVATE ${SNDFILE_INCLUDE_DIRS})
+ target_link_libraries(simage PRIVATE ${SNDFILE_LIBRARIES})
++ if(FLAC_FOUND)
++ target_link_libraries(simage PRIVATE ${FLAC_LIBRARIES})
++ endif()
+ endif()
+
+ if(TIFF_FOUND)
+diff --git a/FindFLAC.cmake b/FindFLAC.cmake +new file mode 100644 +index 0000000..ce40a11 +--- /dev/null ++++ b/FindFLAC.cmake +@@ -0,0 +1,29 @@ ++include(FindPackageHandleStandardArgs) ++ ++find_path(FLAC_INCLUDE_DIR FLAC/all.h) ++ ++mark_as_advanced(FLAC_INCLUDE_DIR) ++ ++set(FLAC_INCLUDE_DIRS ${FLAC_INCLUDE_DIR}) ++ ++find_library(FLAC_LIBRARY NAMES FLAC) ++ ++mark_as_advanced( ++ FLAC_INCLUDE_DIR ++ FLAC_LIBRARY ++) ++ ++set(FLAC_LIBRARIES ${FLAC_LIBRARY}) ++ ++find_package_handle_standard_args( ++ FLAC ++ DEFAULT_MSG ++ FLAC_INCLUDE_DIRS ++ FLAC_LIBRARIES ++) ++ ++if(FLAC_FOUND AND NOT TARGET FLAC::FLAC) ++ add_library(FLAC::FLAC UNKNOWN IMPORTED) ++ set_target_properties(FLAC::FLAC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}") ++ set_property(TARGET FLAC::FLAC APPEND PROPERTY IMPORTED_LOCATION "${FLAC_LIBRARY}") ++endif() |
