aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkcacok <darkcacok1@gmail.com>2020-05-01 04:40:44 +0400
committerGitHub <noreply@github.com>2020-04-30 17:40:44 -0700
commite845327406806cc3d5f7924d1b519fdd286f4065 (patch)
tree5e91feb6d31165c58d1c7587edf19dbf581e78b9
parentbdb7b8107cba67368455696c7e088c1c5b0cd3a0 (diff)
downloadvcpkg-e845327406806cc3d5f7924d1b519fdd286f4065.tar.gz
vcpkg-e845327406806cc3d5f7924d1b519fdd286f4065.zip
[nana] fixed build for windows (#10936)
-rw-r--r--ports/nana/CONTROL10
-rw-r--r--ports/nana/config.cmake.in9
2 files changed, 11 insertions, 8 deletions
diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL
index 551051140..a61242099 100644
--- a/ports/nana/CONTROL
+++ b/ports/nana/CONTROL
@@ -1,5 +1,5 @@
-Source: nana
-Version: 1.7.2-1
-Homepage: https://github.com/cnjinhao/nana
-Description: Cross-platform library for GUI programming in modern C++ style.
-Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows)
+Source: nana
+Version: 1.7.2-2
+Homepage: https://github.com/cnjinhao/nana
+Description: Cross-platform library for GUI programming in modern C++ style.
+Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows)
diff --git a/ports/nana/config.cmake.in b/ports/nana/config.cmake.in
index 8a18bbdf4..43b21dcc4 100644
--- a/ports/nana/config.cmake.in
+++ b/ports/nana/config.cmake.in
@@ -7,11 +7,14 @@ if(UNIX)
find_library(FONTCONFIG_LIB NAMES fontconfig)
endif()
-if(@NANA_ENABLE_PNG@)
+option(NANA_ENABLE_PNG "Enable PNG support" @NANA_ENABLE_PNG@)
+option(NANA_ENABLE_JPEG "Enable JPEG support" @NANA_ENABLE_JPEG@)
+
+if(NANA_ENABLE_PNG)
find_package(PNG REQUIRED)
endif()
-if(@NANA_ENABLE_JPEG@)
+if(NANA_ENABLE_JPEG)
find_package(JPEG REQUIRED)
endif()
@@ -21,6 +24,6 @@ if(UNIX)
target_link_libraries(unofficial::nana::nana INTERFACE ${FONTCONFIG_LIB} ${X11_LIBRARIES} ${X11_Xft_LIB})
endif()
-if(@NANA_ENABLE_JPEG@)
+if(NANA_ENABLE_JPEG)
target_link_libraries(unofficial::nana::nana INTERFACE ${JPEG_LIBRARIES})
endif()