[nana] fixed build for windows (#10936)

This commit is contained in:
Darkcacok 2020-05-01 04:40:44 +04:00 committed by GitHub
parent bdb7b8107c
commit e845327406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View File

@ -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)

View File

@ -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()