diff options
| -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) |
