diff options
| author | Ziyi Yan <ziyi.yan23@gmail.com> | 2019-05-16 00:42:16 +0800 |
|---|---|---|
| committer | Griffin Downs <35574547+grdowns@users.noreply.github.com> | 2019-05-15 09:42:16 -0700 |
| commit | d112af9f174166105fddfcaea3c5998eaa0cc8e2 (patch) | |
| tree | e9fd06a54becb7c7b9ea5d113cf395daf2d3a4c9 | |
| parent | 3f5e477bda8339ca09accea7cf66146775ce8802 (diff) | |
| download | vcpkg-d112af9f174166105fddfcaea3c5998eaa0cc8e2.tar.gz vcpkg-d112af9f174166105fddfcaea3c5998eaa0cc8e2.zip | |
[io2d] macOS support (#6456)
* [io2d] macOS support
* Update version string
| -rw-r--r-- | ports/io2d/CONTROL | 4 | ||||
| -rw-r--r-- | ports/io2d/portfile.cmake | 21 |
2 files changed, 16 insertions, 9 deletions
diff --git a/ports/io2d/CONTROL b/ports/io2d/CONTROL index 7e36cb5d9..2376ce6de 100644 --- a/ports/io2d/CONTROL +++ b/ports/io2d/CONTROL @@ -1,4 +1,4 @@ Source: io2d -Version: 0.1-1 +Version: 0.1-2 Description: a lightweight, cross platform drawing library -Build-Depends: cairo, graphicsmagick +Build-Depends: cairo (!osx), graphicsmagick (!osx) diff --git a/ports/io2d/portfile.cmake b/ports/io2d/portfile.cmake index c1d536d57..0375a9689 100644 --- a/ports/io2d/portfile.cmake +++ b/ports/io2d/portfile.cmake @@ -24,6 +24,10 @@ if ("${SOURCE_PATH}" STREQUAL "") endif() # Configure the library, using CMake +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin) + set(IO2D_DEFAULT_OPTION "-DIO2D_DEFAULT=COREGRAPHICS_MAC") +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -31,6 +35,7 @@ vcpkg_configure_cmake( -DIO2D_WITHOUT_SAMPLES=1 -DIO2D_WITHOUT_TESTS=1 -DCMAKE_INSTALL_INCLUDEDIR:STRING=include + ${IO2D_DEFAULT_OPTION} ) # Build + install the library, using CMake @@ -42,14 +47,16 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/io2d) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake ${CURRENT_PACKAGES_DIR}/share/io2d/io2dTargets.cmake) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake " -include(CMakeFindDependencyMacro) -find_dependency(unofficial-cairo CONFIG) -find_dependency(unofficial-graphicsmagick CONFIG) +if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake ${CURRENT_PACKAGES_DIR}/share/io2d/io2dTargets.cmake) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake " + include(CMakeFindDependencyMacro) + find_dependency(unofficial-cairo CONFIG) + find_dependency(unofficial-graphicsmagick CONFIG) -include(\${CMAKE_CURRENT_LIST_DIR}/io2dTargets.cmake) -") + include(\${CMAKE_CURRENT_LIST_DIR}/io2dTargets.cmake) + ") +endif() file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/io2d RENAME copyright) |
