Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions ports/nuklear/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
4 changes: 0 additions & 4 deletions ports/nuklear/CONTROL

This file was deleted.

23 changes: 21 additions & 2 deletions ports/nuklear/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
25 changes: 25 additions & 0 deletions ports/nuklear/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4390,7 +4390,7 @@
},
"nuklear": {
"baseline": "2021-03-18",
"port-version": 0
"port-version": 1
},
"numactl": {
"baseline": "2.0.12",
Expand Down
5 changes: 5 additions & 0 deletions versions/n-/nuklear.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9c243e51fbb0d9fa4562a3e4a8eba9a7fb2e0cdd",
"version-date": "2021-03-18",
"port-version": 1
},
{
"git-tree": "2a8abfe81ed0757650f10d7fd0e2ef8ecd484ae6",
"version-string": "2021-03-18",
Expand Down