2017-06-01 00:59:08 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
message(STATUS "Warning: Dynamic building not supported. Building static.")
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
|
|
|
endif()
|
2016-12-04 22:03:47 +08:00
|
|
|
|
2018-06-15 05:56:43 +08:00
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
message(WARNING "You will need to install Xorg dependencies to use nana:\napt install libx11-dev libxft-dev\n")
|
|
|
|
endif()
|
|
|
|
|
2017-06-01 00:59:08 +08:00
|
|
|
include(vcpkg_common_functions)
|
2017-05-03 19:43:07 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO cnjinhao/nana
|
2018-09-18 17:28:21 +08:00
|
|
|
REF v1.6.2
|
|
|
|
SHA512 95271764813e64126abf2941bfc13b399ffe093c570891f65f331505066ce0dcad7df4170b2616951b7e0234ea2d6d21219cdfd15b112ecf598a3afa992cceb4
|
2017-06-01 00:59:08 +08:00
|
|
|
HEAD_REF develop
|
2017-05-03 19:43:07 +08:00
|
|
|
)
|
2016-12-04 22:03:47 +08:00
|
|
|
|
2018-06-15 05:56:43 +08:00
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.cmake.in DESTINATION ${SOURCE_PATH})
|
|
|
|
|
2016-12-04 22:03:47 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2017-06-01 00:59:08 +08:00
|
|
|
PREFER_NINJA
|
2016-12-04 22:03:47 +08:00
|
|
|
OPTIONS
|
2018-06-15 05:56:43 +08:00
|
|
|
-DNANA_ENABLE_PNG=ON
|
|
|
|
-DNANA_ENABLE_JPEG=ON
|
2016-12-04 22:03:47 +08:00
|
|
|
OPTIONS_DEBUG
|
2018-06-15 05:56:43 +08:00
|
|
|
-DNANA_INSTALL_HEADERS=OFF)
|
2016-12-04 22:03:47 +08:00
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2018-06-15 05:56:43 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-nana TARGET_PATH share/unofficial-nana)
|
|
|
|
|
2016-12-04 22:03:47 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2017-02-22 07:21:11 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nana)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/nana/LICENSE ${CURRENT_PACKAGES_DIR}/share/nana/copyright)
|