diff --git a/ports/nanovg/CMakeLists.txt b/ports/nanovg/CMakeLists.txt index 16d7afa4bb..8caf73238e 100644 --- a/ports/nanovg/CMakeLists.txt +++ b/ports/nanovg/CMakeLists.txt @@ -1,11 +1,13 @@ cmake_minimum_required(VERSION 3.11) project(nanovg C) +find_path(STB_INCLUDES stb_image.h include) + set(NANOVG_SOURCES src/nanovg.c) -set(NANOVG_HEADERS src/nanovg.h src/nanovg_gl.h src/nanovg_gl_utils.h src/stb_image.h) +set(NANOVG_HEADERS src/nanovg.h src/nanovg_gl.h src/nanovg_gl_utils.h) add_library(nanovg STATIC ${NANOVG_SOURCES} ${NANOVG_HEADERS}) set_target_properties(nanovg PROPERTIES PUBLIC_HEADER "${NANOVG_HEADERS}") -target_include_directories(nanovg PRIVATE 3rdparty/nanovg/src) +target_include_directories(nanovg PRIVATE ${STB_INCLUDES}) if(CMAKE_BUILD_TYPE STREQUAL "Debug") target_compile_definitions(nanovg PRIVATE DEBUG) @@ -25,7 +27,6 @@ install(EXPORT nanovgTargets NAMESPACE nanovg:: DESTINATION share/nanovg) -include(CMakePackageConfigHelpers) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/nanovgConfig.cmake DESTINATION share/nanovg) diff --git a/ports/nanovg/CONTROL b/ports/nanovg/CONTROL index 5291576ac3..57bd00f726 100644 --- a/ports/nanovg/CONTROL +++ b/ports/nanovg/CONTROL @@ -1,4 +1,5 @@ Source: nanovg -Version: 2019-8-30-1 +Version: 2019-8-30-3 Homepage: https://github.com/memononen/nanovg Description: NanoVG is small antialiased vector graphics rendering library for OpenGL. +Build-Depends: stb \ No newline at end of file diff --git a/ports/nanovg/portfile.cmake b/ports/nanovg/portfile.cmake index 9a2cbc7ac4..6a838808bb 100644 --- a/ports/nanovg/portfile.cmake +++ b/ports/nanovg/portfile.cmake @@ -1,4 +1,5 @@ -include(vcpkg_common_functions) +vcpkg_fail_port_install(ON_TARGET "UWP") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO memononen/nanovg @@ -10,12 +11,14 @@ vcpkg_from_github( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/nanovgConfig.cmake DESTINATION ${SOURCE_PATH}) +file(GLOB STB_SRCS ${SOURCE_PATH}/src/stb_*) +if(STB_SRCS) + file(REMOVE_RECURSE ${STB_SRCS}) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA ) vcpkg_install_cmake()