mirror of https://github.com/microsoft/vcpkg.git
[nuklear] Export unofficial target, add features (#18881)
* [nuklear] Export unofficial target, add features. * update version stuff * Update ports/nuklear/portfile.cmake * Update versions/n-/nuklear.json * Update ports/nuklear/CMakeLists.txt * Update ports/nuklear/CMakeLists.txt * Update ports/nuklear/CMakeLists.txt * Update versions/n-/nuklear.json
This commit is contained in:
parent
5236efaa9d
commit
0bf44b144b
|
|
@ -0,0 +1,34 @@
|
|||
cmake_minimum_required(VERSION 3.16)
|
||||
project(Nuklear LANGUAGES C CXX)
|
||||
|
||||
option(INSTALL_EXAMPLE "Install the example code" OFF)
|
||||
option(INSTALL_DEMO "Install the demo code" OFF)
|
||||
|
||||
add_library(nuklear INTERFACE)
|
||||
|
||||
target_include_directories(nuklear INTERFACE $<INSTALL_INTERFACE:include/nuklear>)
|
||||
target_compile_definitions(nuklear INTERFACE NK_IMPLEMENTATION)
|
||||
|
||||
# Installation
|
||||
install(
|
||||
TARGETS nuklear
|
||||
EXPORT unofficial-nuklear
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_LIST_DIR}/nuklear.h" DESTINATION "include/nuklear")
|
||||
|
||||
|
||||
install(EXPORT unofficial-nuklear FILE unofficial-nuklear-config.cmake DESTINATION share/unofficial-nuklear)
|
||||
|
||||
if (INSTALL_EXAMPLE)
|
||||
install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/example" DESTINATION share/nuklear)
|
||||
|
||||
endif()
|
||||
|
||||
if (INSTALL_DEMO)
|
||||
install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/demo" DESTINATION share/nuklear)
|
||||
|
||||
endif()
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
Source: nuklear
|
||||
Version: 2021-03-18
|
||||
Homepage: https://github.com/Immediate-Mode-UI/Nuklear
|
||||
Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain
|
||||
|
|
@ -5,6 +5,25 @@ vcpkg_from_github(
|
|||
SHA512 ce064dff721111749d4056717879f42d3e24bb94655dd2b04c137eb7391d2c90d0b1b95155912c100b537f74fd150aedc48e0ac85eb72963c66e35ac81048323
|
||||
HEAD_REF master
|
||||
)
|
||||
file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(INSTALL ${SOURCE_PATH}/Readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/nuklear RENAME copyright)
|
||||
|
||||
file(COPY "${CURRENT_PORT_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
example INSTALL_EXAMPLE
|
||||
demo INSTALL_DEMO
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-nuklear)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/Readme.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "nuklear",
|
||||
"version-date": "2021-03-18",
|
||||
"port-version": 1,
|
||||
"description": "This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain",
|
||||
"homepage": "https://github.com/Immediate-Mode-UI/Nuklear",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"demo": {
|
||||
"description": "Install demo files"
|
||||
},
|
||||
"example": {
|
||||
"description": "Install example files"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4398,7 +4398,7 @@
|
|||
},
|
||||
"nuklear": {
|
||||
"baseline": "2021-03-18",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"numactl": {
|
||||
"baseline": "2.0.12",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "9c243e51fbb0d9fa4562a3e4a8eba9a7fb2e0cdd",
|
||||
"version-date": "2021-03-18",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "2a8abfe81ed0757650f10d7fd0e2ef8ecd484ae6",
|
||||
"version-string": "2021-03-18",
|
||||
|
|
|
|||
Loading…
Reference in New Issue