Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
704 commits
Select commit Hold shift + click to select a range
a56d588
use index instead of cached display pointer in gui ctx
cklosters Aug 28, 2025
74972c6
don't cache display information, always construct & use on the fly - …
cklosters Aug 28, 2025
af41c00
don't depend on display for valid scaling factor, not available on al…
cklosters Aug 29, 2025
8334e13
fix high dpi scaling for renderable 2d text component
cklosters Aug 29, 2025
c3bfed4
Fix SDL3 applet integration X11 & XWayland
cklosters Aug 29, 2025
55920eb
apply scale before recreating glyph cache
cklosters Aug 29, 2025
4b1b101
wrap applet container in unique ptr before being embedded & fix error…
cklosters Aug 29, 2025
785dcc7
Fix app in code signature
stijnvanbeek Sep 1, 2025
157d9b1
filter out incompatible project service configurations on load, this …
cklosters Sep 2, 2025
6f6ecdf
Fix build type and code signature
stijnvanbeek Sep 2, 2025
92f3d5b
attempt to wrap a QT wayland surface in SDL
cklosters Sep 2, 2025
f16501a
remove wayland support for applets embedded in napkin, qt doesn't sup…
cklosters Sep 3, 2025
2bd35b5
quick fix for resizing window under wayland
cklosters Sep 3, 2025
9b35216
quick fix for resizing window under wayland
cklosters Sep 3, 2025
30cb1a1
cleanup
cklosters Sep 3, 2025
6904cd3
don't use render-window, draw to widget instead
cklosters Sep 3, 2025
33efd4a
don't explicitlty activate window
cklosters Sep 3, 2025
0cfd455
cleanup
cklosters Sep 3, 2025
bdb3bc1
Merge pull request #102 from napframework/napkin_wayland
cklosters Sep 3, 2025
4b2fc42
improve todo
cklosters Sep 3, 2025
fc1bb76
don't include wayland as videi target for applets on windows
cklosters Sep 3, 2025
63fdfd0
ensure render widget is a native window
cklosters Sep 3, 2025
458f91b
expose selected backend driver (X11, Wayland, Windows etc.) in the re…
cklosters Sep 4, 2025
0145d0a
Use cached nap video driver flag instead of sdl to validate swapchain…
cklosters Sep 4, 2025
7a9aa16
deprecate high dpi toggle, default to always on
cklosters Sep 4, 2025
b501dbf
add display orientation
cklosters Sep 4, 2025
c6dceaa
cleanup render panel creation & filtering
cklosters Sep 4, 2025
c54778c
fix X11 applet render panel creation
cklosters Sep 4, 2025
4c47ea1
don't create native windows for parent(s) of applet render panel on w…
cklosters Sep 4, 2025
704d8cc
Merge pull request #103 from napframework/sdl3_napkin
cklosters Sep 4, 2025
fe3efc8
forward window events to the running nap applet, so we can use those …
cklosters Sep 4, 2025
c54dfab
Don't fill window with background color!
cklosters Sep 4, 2025
846c0bb
Fix check_build_environment win
stijnvanbeek Sep 4, 2025
041c9b5
Fix faulty member pointers in ComponentInstancePtr
stijnvanbeek Sep 4, 2025
00767f4
package script error return values
stijnvanbeek Sep 4, 2025
7c1c740
Specify msvc version cmake generator
stijnvanbeek Sep 4, 2025
690b4e5
Merge branch 'main' into workflow-test
stijnvanbeek Sep 4, 2025
f374ae9
show cmake generators
stijnvanbeek Sep 4, 2025
06a2772
Update package_app.sh
stijnvanbeek Sep 4, 2025
1bce837
windows-2019 workflow
stijnvanbeek Sep 4, 2025
6033a58
Update msvc version
stijnvanbeek Sep 4, 2025
b3f5d4e
Use manhattan distance for buffer / swapchain comparison, cleanup
cklosters Sep 4, 2025
c83f37a
simplify wayland check
cklosters Sep 4, 2025
a7330cf
fix build windows
cklosters Sep 5, 2025
4f7c152
fix dist license
cklosters Sep 5, 2025
24c77b8
fix linking against sdl3 in an app
cklosters Sep 5, 2025
6178dae
make napkin path mapping user writable
cklosters Sep 5, 2025
31d5df5
cleanup
cklosters Sep 5, 2025
84faef3
Merge branch 'main' into sdl3
cklosters Sep 5, 2025
3ee8ac9
drop support for Ubuntu 22.04 in favor of 24.04 and (future) 25.05
cklosters Sep 5, 2025
665e700
disable fbx converter to test win workflow
stijnvanbeek Sep 5, 2025
19cf5b8
update fix missing ubuntu workflow
stijnvanbeek Sep 5, 2025
534c592
fix apt install
stijnvanbeek Sep 5, 2025
ba4e604
try gitbash to run workflow
stijnvanbeek Sep 5, 2025
62c07c0
skip fix missing ubuntu
stijnvanbeek Sep 5, 2025
fcc75b7
Update build-and-test.yml
stijnvanbeek Sep 5, 2025
63ba27f
Update build-and-test.yml
stijnvanbeek Sep 6, 2025
0c08232
Update build-and-test.yml
stijnvanbeek Sep 6, 2025
6ea835b
Update build-and-test.yml
stijnvanbeek Sep 6, 2025
dfa676d
Update build-and-test.yml
stijnvanbeek Sep 6, 2025
0a05c03
Update build-and-test.yml
stijnvanbeek Sep 6, 2025
a24c830
windows compatibility exe
stijnvanbeek Sep 6, 2025
df75283
test on win not parallel
stijnvanbeek Sep 7, 2025
408e9b0
Update build-and-test.yml
stijnvanbeek Sep 7, 2025
8164d43
print environment
stijnvanbeek Sep 7, 2025
13bcff4
add linux build instructions
cklosters Sep 8, 2025
276dffc
add SDL3 arm64
cklosters Sep 8, 2025
14d6900
update SDL3 Linux build instructions
cklosters Sep 8, 2025
658139c
update SDL3.2 version
cklosters Sep 8, 2025
72bec46
fix SDL linux target x86_64
cklosters Sep 8, 2025
dbf0294
cleanup
cklosters Sep 8, 2025
e100685
remove multiwindow application configuration link
cklosters Sep 8, 2025
c2e915c
bump sdl to latest version mscv x86_64
cklosters Sep 8, 2025
34fda35
cleanup
cklosters Sep 9, 2025
7dc36fa
fix library and dll search paths SDL3
cklosters Sep 9, 2025
43132e7
Add sdl3 msvc libs
cklosters Sep 9, 2025
e85c16a
cleanup
cklosters Sep 9, 2025
e961114
Wrap sdl surface in unique ptr and remove all sdl references from ren…
cklosters Sep 9, 2025
3599e18
cleanp
cklosters Sep 9, 2025
a790971
Merge pull request #104 from napframework/sdl3
cklosters Sep 9, 2025
8a44229
check build env use system python3
stijnvanbeek Sep 9, 2025
28aace8
Call python3 in path
stijnvanbeek Sep 9, 2025
62a6b5a
Update check_build_environment.bat
stijnvanbeek Sep 9, 2025
02c5596
test windows cd
stijnvanbeek Sep 9, 2025
f846fe5
check dirs
stijnvanbeek Sep 9, 2025
4ebf484
build and run test
stijnvanbeek Sep 9, 2025
5ba1d2a
add test app
stijnvanbeek Sep 9, 2025
a047f3b
Update build-and-test.yml
stijnvanbeek Sep 9, 2025
bea9c70
Fix napmidi win debug cmake
stijnvanbeek Sep 9, 2025
e56de3a
fix osc windows no build type
stijnvanbeek Sep 9, 2025
d13fd64
test app
stijnvanbeek Sep 9, 2025
674c222
Update readme.md
cklosters Sep 9, 2025
2d1f4b5
Update build-and-test.yml
stijnvanbeek Sep 10, 2025
33a3afc
Update build-and-test.yml
stijnvanbeek Sep 10, 2025
eb55ba5
remove whitespace characters from read machine-id
cklosters Sep 10, 2025
5fdc38b
remove whitespace characters from read machine-id
cklosters Sep 10, 2025
6199b8d
Merge remote-tracking branch 'origin/main'
cklosters Sep 10, 2025
3e5f195
update generate_solution to VS 2022
stijnvanbeek Sep 10, 2025
08a95ba
Prepare Vulkan SDK on windows runner
stijnvanbeek Sep 10, 2025
a85c7df
Different Vulkan installer
stijnvanbeek Sep 10, 2025
379ce16
Githb actions vulkan version
stijnvanbeek Sep 10, 2025
23b86f0
Virtual-Display-Driver
stijnvanbeek Sep 11, 2025
1695beb
add driver hash parameter
stijnvanbeek Sep 11, 2025
aed8c12
different sha version
stijnvanbeek Sep 11, 2025
b5f59f1
different sha try
stijnvanbeek Sep 11, 2025
c099640
windows server vdd sha
stijnvanbeek Sep 11, 2025
c78585d
include win version vdd
stijnvanbeek Sep 11, 2025
ba380f6
correct powershell
stijnvanbeek Sep 11, 2025
7daa52a
show pwsh version
stijnvanbeek Sep 11, 2025
166456d
different vdd install script
stijnvanbeek Sep 11, 2025
95cab38
check remove &
stijnvanbeek Sep 11, 2025
f43cb5a
Put & back
stijnvanbeek Sep 11, 2025
b606e20
include renderadvanced and demos
stijnvanbeek Sep 16, 2025
28635aa
run fbxconverter
stijnvanbeek Sep 16, 2025
da088bb
build and test all paltforms helloworld
stijnvanbeek Sep 23, 2025
a5240b2
Handle osc input excpetions
stijnvanbeek Sep 25, 2025
a3040ac
Increase wait time testing
stijnvanbeek Sep 29, 2025
0ed9527
Merge pull request #12 from stijnvanbeek/workflow-test
stijnvanbeek Sep 29, 2025
3b158c8
fix applet path mapping deployment for packaged app
cklosters Oct 1, 2025
dcc1299
don't create and provide sdl surface to get available vulkan surface …
cklosters Oct 3, 2025
ec5f536
- allow initialization of vulkan render service using external window…
cklosters Oct 3, 2025
93dbd70
improve grouping of vulkan dummy surface information
cklosters Oct 3, 2025
c15f09e
debug log window display changes
cklosters Oct 3, 2025
b85fb88
resize applet render window to fit parent on creation
cklosters Oct 3, 2025
73ea2be
Merge pull request #105 from napframework/applet_surface_sharing
cklosters Oct 3, 2025
59d0f52
Merge branch 'public_0.8' into msaadepth
cklosters Oct 3, 2025
19b5e10
upgrade vma (vulkan memory allocator) to latest
cklosters Oct 3, 2025
1ab9468
Upgrade vma (vulkan memory allocator) to latest
cklosters Oct 3, 2025
e218281
cleanup
cklosters Oct 3, 2025
d469375
initialize shader compilation using provided (default) config.
cklosters Oct 3, 2025
143fb93
Merge pull request #107 from napframework/public_0.8
cklosters Oct 3, 2025
bdaae3a
purge APPLE directives from cmake
cklosters Oct 6, 2025
3e1e04b
- purge macos thirdparty binaries
cklosters Oct 6, 2025
3187fff
purge macos x86 third-party binaries from system-modules
cklosters Oct 6, 2025
5ed4399
purge macos from build scripts
cklosters Oct 6, 2025
114bf75
don't install deprecated module update script
cklosters Oct 6, 2025
96bded3
remove apple compile directives
cklosters Oct 6, 2025
04999e0
remove pybind and pybind directives from source
cklosters Oct 6, 2025
6c00e83
Merge branch '0.8' into msaadepth
cklosters Oct 6, 2025
497fde0
Remove python demo and python specific rttr type bindings
cklosters Oct 6, 2025
295d53f
Merge pull request #108 from napframework/purge_macos
cklosters Oct 7, 2025
6ec122b
introduce mesh preview applet
cklosters Oct 7, 2025
4f8046a
deserialize and load mesh thread safe
cklosters Oct 7, 2025
6fb013c
Don't allow recording commands when render window is not visible or m…
cklosters Oct 7, 2025
68b8391
force our vulkan sdk version for qt
cklosters Oct 7, 2025
d18cd8f
fix window hidden bitwise comparison
cklosters Oct 7, 2025
e45f87e
Merge branch 'napkin_mesh_preview_applet' of https://github.com/napfr…
cklosters Oct 7, 2025
1c5f0bd
revert window visibility check to previous state, applets are always …
cklosters Oct 7, 2025
af6807e
add env (NAPKIN_DISABLE_APPLETS) variable to disable applets inside n…
cklosters Oct 8, 2025
12be8b5
make env functions inline
cklosters Oct 8, 2025
c4cbb9c
add renderadvanced to mesh preview applet
cklosters Oct 8, 2025
f04e162
introduce mesh frame component for preview applet
cklosters Oct 8, 2025
66c4897
add initial mesh load and frame selection logic
cklosters Oct 8, 2025
aa6624e
Add mesh preview controller, renderer and gui
cklosters Oct 9, 2025
a16cea5
Improve flat shading with wireframe loading and handling, including c…
cklosters Oct 9, 2025
e6f9144
Merge branch '0.8' into msaadepth
lshoek Oct 9, 2025
76ba827
add bounding box visualization to mesh preview
cklosters Oct 14, 2025
d4091d4
add shaded render pass to mesh preview applet
cklosters Oct 14, 2025
dbd9a44
fixing linux compilation
cklosters Oct 14, 2025
3c91c19
add option to rotate framed mesh
cklosters Oct 15, 2025
2a5e1e1
add directional lights and light controls
cklosters Oct 15, 2025
049170d
finish wire frame implementation
cklosters Oct 15, 2025
bddb95f
add triangle count detail
cklosters Oct 15, 2025
ade4211
bit of cleanup
cklosters Oct 15, 2025
abe5a9f
improve blend mode selection based on topology type
cklosters Oct 16, 2025
464a459
allow mesh to be rotated and scaled
cklosters Oct 16, 2025
6c5624f
cleanup
cklosters Oct 16, 2025
7c4460e
Cleanup
cklosters Oct 16, 2025
55b231a
more cleanup
cklosters Oct 16, 2025
66cd06b
sync theme on applet startup
cklosters Oct 16, 2025
1cf1d6b
cleanup
cklosters Oct 16, 2025
63f4779
fix loosing gui scaling information when changing theme at runtime
cklosters Oct 17, 2025
9f446d7
cleanup
cklosters Oct 17, 2025
af9ac19
don't create and install applets when project doesn't include support…
cklosters Oct 17, 2025
2c1ff7d
Add some resource icons for some common types.
cklosters Oct 17, 2025
2a2b501
disable NAP_DEV mode for napkin
cklosters Oct 17, 2025
a10b8f1
disable light controls when no mesh is available for preview
cklosters Oct 17, 2025
ccad3d0
update readme
cklosters Oct 17, 2025
72d1aad
- simplify light shader
cklosters Oct 18, 2025
9571dfa
explicitly exclude certain types from option to preview
cklosters Oct 18, 2025
43e15d2
update material icon
cklosters Oct 18, 2025
56bb760
allow napkin to actually run for 5 seconds before being closed by pac…
cklosters Oct 19, 2025
ac5dbb6
Merge pull request #109 from napframework/napkin_mesh_preview_applet
cklosters Oct 20, 2025
b219161
Merge branch 'main' into 0.8
cklosters Oct 20, 2025
4025cdd
fix dynamicwrite buffers missing update in mtl instance after upload
lshoek Apr 6, 2025
8f31b96
check if QT_QPA_PLATFORM on linux exists, before setting it
cklosters Oct 20, 2025
cd28310
Update display server documentation
cklosters Oct 20, 2025
3e5dede
fix return statement
cklosters Oct 20, 2025
ca18414
improve logging when render panel can't be created
cklosters Oct 20, 2025
68c10cd
fix snapshot render target
lshoek Oct 21, 2025
8d5d2dd
run a bit longer to ensure core initializes on slower systems (napkin)
cklosters Oct 21, 2025
78d9060
Merge branch '0.8' of https://github.com/napframework/nap into 0.8
cklosters Oct 21, 2025
2a65328
properly stop & close napkin including applets and other services, in…
cklosters Oct 21, 2025
07acb56
Merge pull request #110 from napframework/0.8
cklosters Oct 21, 2025
0b4f69f
fix depth texture sampler vulkan validation error - move depth dummie…
lshoek Oct 21, 2025
084f738
Merge branch 'main' into msaadepth
lshoek Oct 22, 2025
b1e8775
small refactor
cklosters Oct 22, 2025
fa5330b
draw bounds last, ensures text is correctly overlayed
cklosters Oct 22, 2025
2a8c35c
Merge pull request #114 from napframework/0.8
cklosters Oct 22, 2025
4276764
Merge pull request #90 from napframework/msaadepth
cklosters Oct 22, 2025
f8c058c
Fix link to NAP framework website in README
cklosters Oct 23, 2025
a75a627
Merge branch 'main' into nap-0.8
stijnvanbeek Oct 28, 2025
d099075
Merge remote-tracking branch 'upstream/main' into nap-0.8
stijnvanbeek Oct 28, 2025
9fd9de9
helloworld running linux
stijnvanbeek Oct 28, 2025
c3b5b78
buil mac OS
stijnvanbeek Oct 28, 2025
b4dff1c
exclude VK_KHR_portability_enumeration
stijnvanbeek Oct 28, 2025
9834d7c
Mac OS helloworld runs
stijnvanbeek Oct 28, 2025
5dce4ea
Update geometryfromfile.h
stijnvanbeek Oct 31, 2025
1cdbe1b
Update path mapping for applets to new build system
stijnvanbeek Oct 31, 2025
e92834c
Cocoa support for applets attempt (failed)
stijnvanbeek Oct 31, 2025
553ee7b
Upgrade vulkan sdk to 1.4 on mac OS
stijnvanbeek Oct 31, 2025
9507c62
Enhance README with build system and usage info
stijnvanbeek Nov 6, 2025
9278876
Enhance README with usage and example sections
stijnvanbeek Nov 6, 2025
4d9c78a
Merge branch 'main' into nap-0.8
stijnvanbeek Nov 6, 2025
2116de2
Remove generator selection windows
stijnvanbeek Nov 21, 2025
d9babd1
Fix windows builds
stijnvanbeek Nov 21, 2025
a914a89
ifdef APPLE specific lines
stijnvanbeek Nov 21, 2025
9c3e584
RTTI define RootEntity as stuct
stijnvanbeek Nov 27, 2025
3f01230
SDL3 dylibs
stijnvanbeek Dec 2, 2025
7d67cd6
SDL header update
stijnvanbeek Dec 2, 2025
982a2ac
Update renderpanel.cpp
stijnvanbeek Dec 2, 2025
f115da8
msvc updates
stijnvanbeek Dec 8, 2025
5a0feeb
Update github workflow with manual mode
stijnvanbeek Dec 9, 2025
fbc23a5
Fix workflow input syntax
stijnvanbeek Dec 9, 2025
9be2bb6
Fix inputs
stijnvanbeek Dec 9, 2025
4cfd883
Update build-and-test.yml
stijnvanbeek Dec 9, 2025
a5cc7d2
Update build-and-test.yml
stijnvanbeek Dec 9, 2025
31cdf4e
Merge branch 'main' into nap-0.8
stijnvanbeek Dec 9, 2025
7107200
Create libvulkan.1.4.328.dylib
stijnvanbeek Dec 9, 2025
a290226
Update MoltenVK_icd.json
stijnvanbeek Dec 9, 2025
ac88d49
Resolve conflict in renderpanel
stijnvanbeek Dec 9, 2025
773b319
Update id libvulkan
stijnvanbeek Dec 14, 2025
dde8fca
Skip (absolute) rpaths
stijnvanbeek Dec 14, 2025
974f6bc
Fix linux rapth settings
stijnvanbeek Dec 14, 2025
ac53d2c
Fix napkin build
stijnvanbeek Dec 15, 2025
8c5c1ce
Fix some warnings
stijnvanbeek Dec 15, 2025
e385858
gui key support
stijnvanbeek Feb 2, 2026
ffa8728
Catch all incoming OSC exception types
stijnvanbeek Feb 2, 2026
313460c
Merge branch 'napkin2' into nap-0.8
stijnvanbeek Apr 13, 2026
d7ea0cf
Merge remote-tracking branch 'upstream/nap-0.8' into update-to-nap-0.8
CasimirGeelhoed May 27, 2026
375e35c
implement old stylesettings
CasimirGeelhoed May 27, 2026
3f69131
remove forward declares to make it compile
CasimirGeelhoed May 27, 2026
eee93e3
comments and code style
CasimirGeelhoed Jun 15, 2026
e0c6903
add entitlements option, update package_4dsound.sh
CasimirGeelhoed Jun 15, 2026
a310396
comment out SDL_SetWindowIcon call to keep icon
CasimirGeelhoed Jun 15, 2026
5536b48
comment and rename to createStyle4D
CasimirGeelhoed Jun 23, 2026
66406f2
restore upstream version, style in app structure
CasimirGeelhoed Jun 24, 2026
8d73a9f
SetWindowIcon property
CasimirGeelhoed Jun 24, 2026
b242441
remove comment
CasimirGeelhoed Jun 24, 2026
b088332
fix crash when resizing window on macos 14.6
CasimirGeelhoed Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
53 changes: 53 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: Build and test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Install prerequisites
shell: bash
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update --fix-missing
sudo apt install -f
sudo apt install -y libx11-dev mesa-vulkan-drivers build-essential libxcb-xinerama0 libxcb-cursor0 libglu1-mesa-dev libxkbcommon-dev xvfb

- name: Check build environment
shell: bash
run: sh check_build_environment.sh

- name: Build and test linux
shell: bash
if: matrix.os == 'ubuntu-latest'
run: xvfb-run sh package_app.sh helloworld -b build -t -d

- name: Build and test win
shell: bash
if: matrix.os == 'windows-latest'
run: sh package_app.sh helloworld -b build

- name: Build and test macos
shell: bash
if: matrix.os == 'macos-latest'
run: sh package_app.sh helloworld -b build -t -d


10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ add_subdirectory(system_modules/napcolor)
add_subdirectory(system_modules/naprender)
add_subdirectory(system_modules/napsdlinput)
add_subdirectory(system_modules/napapp)
#add_subdirectory(system_modules/napimgui)
add_subdirectory(system_modules/napimgui)
add_subdirectory(system_modules/napparameter)
add_subdirectory(system_modules/napparametergui)
add_subdirectory(system_modules/napcameracontrol)
Expand All @@ -33,6 +33,7 @@ add_subdirectory(system_modules/napapi)
add_subdirectory(system_modules/napcalendar)
add_subdirectory(system_modules/napsequence)
add_subdirectory(system_modules/napsequencegui)
add_subdirectory(system_modules/naprenderadvanced)

set(NAP_BUILD_CONTEXT source) # This is here just to guarantee backwards compatibility with 0.6 style NAP modules
add_subdirectory_modules(modules)
Expand All @@ -44,12 +45,15 @@ add_subdirectory(demos/audioanalysis)
add_subdirectory(demos/oscmidi)
add_subdirectory(demos/udpsend)
add_subdirectory(demos/udpreceive)
add_subdirectory(demos/computeflocking)
add_subdirectory(demos/lightsandshadow)
add_subdirectory(demos/spotlight)
add_subdirectory(demos/skybox)

add_subdirectory(tools/fbxconverter)

if (DEFINED ENV{QT_DIR})
add_subdirectory(qt)
add_subdirectory(tools/napkin)
else ()
message(WARNING "QT_DIR environment variable not provided, skipping napkin target. Set QT_DIR to Qt location to build Napkin.")
endif ()
endif ()
8 changes: 8 additions & 0 deletions apps/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.18.4)

project(test)

file(GLOB_RECURSE SOURCES src/*.cpp)
file(GLOB_RECURSE HEADERS src/*.h src/*.hpp)

add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
5 changes: 5 additions & 0 deletions apps/test/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <iostream>

int main(int argc, char *argv[]) {
std::cout << "Hello world!" << std::endl;
}
7 changes: 7 additions & 0 deletions check_build_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
nap_root=$( cd "$(dirname -- "$0")" ; pwd -P )
#. $nap_root/tools/buildsystem/common/sh_shared.sh
#configure_python $nap_root
python3 $nap_root/tools/buildsystem/check_build_environment/source_user_onboarding.py


2 changes: 1 addition & 1 deletion cmake/default_path_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[
"{ROOT}",
"{ROOT}/lib",
"{ROOT}/../Resources"
"{ROOT}/../Resources/lib"
],
"BuildPath": "{PROJECT_DIR}",
"DataPath": "{PROJECT_DIR}/../Resources/"
Expand Down
24 changes: 11 additions & 13 deletions cmake/find_modules/Findnapcore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,18 @@ if(WIN32)
endif()

# Install into packaged app for macOS/Linux
if(NOT WIN32)
if(UNIX)
install(FILES ${NAPCORE_LIBS_RELEASE} DESTINATION lib CONFIGURATIONS Release)

# On Linux use lib directory for RPATH
if(NOT APPLE)
install(CODE "message(\"Setting RPATH on ${CMAKE_INSTALL_PREFIX}/lib/napcore.so\")
execute_process(COMMAND patchelf
--set-rpath
$ORIGIN/.
${CMAKE_INSTALL_PREFIX}/lib/napcore.so
RESULT_VARIABLE EXIT_CODE)
if(NOT \${EXIT_CODE} EQUAL 0)
message(FATAL_ERROR \"Failed to fetch RPATH on napcore.so using patchelf\")
endif()
")
endif()
install(CODE "message(\"Setting RPATH on ${CMAKE_INSTALL_PREFIX}/lib/napcore.so\")
execute_process(COMMAND patchelf
--set-rpath
$ORIGIN/.
${CMAKE_INSTALL_PREFIX}/lib/napcore.so
RESULT_VARIABLE EXIT_CODE)
if(NOT \${EXIT_CODE} EQUAL 0)
message(FATAL_ERROR \"Failed to fetch RPATH on napcore.so using patchelf\")
endif()
")
endif()
24 changes: 11 additions & 13 deletions cmake/find_modules/Findnaprtti.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if(WIN32)
endif()

# Package naprtti and RTTR into apps for macOS/Linux
if(NOT WIN32)
if(UNIX)
install(FILES ${NAPRTTI_LIBS_RELEASE} DESTINATION lib CONFIGURATIONS Release)
install(FILES $<TARGET_FILE:RTTR::Core> DESTINATION lib CONFIGURATIONS Release)

Expand All @@ -88,18 +88,16 @@ if(NOT WIN32)
endif()

# On Linux use lib directory for RPATH
if(UNIX AND NOT APPLE)
install(CODE "message(\"Setting RPATH on ${CMAKE_INSTALL_PREFIX}/lib/naprtti.so\")
execute_process(COMMAND patchelf
--set-rpath
$ORIGIN/.
${CMAKE_INSTALL_PREFIX}/lib/naprtti.so
RESULT_VARIABLE EXIT_CODE)
if(NOT \${EXIT_CODE} EQUAL 0)
message(FATAL_ERROR \"Failed to fetch RPATH on naprtti.so using patchelf\")
endif()
")
endif()
install(CODE "message(\"Setting RPATH on ${CMAKE_INSTALL_PREFIX}/lib/naprtti.so\")
execute_process(COMMAND patchelf
--set-rpath
$ORIGIN/.
${CMAKE_INSTALL_PREFIX}/lib/naprtti.so
RESULT_VARIABLE EXIT_CODE)
if(NOT \${EXIT_CODE} EQUAL 0)
message(FATAL_ERROR \"Failed to fetch RPATH on naprtti.so using patchelf\")
endif()
")

# Package our Python dylib from thirdparty. Doing this here instead of in nappython as RTTI (and as a result Core)
# depends on Python. The Python modules however are only installed if we're using nappython as they're not required
Expand Down
20 changes: 11 additions & 9 deletions cmake/nap_app.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (TARGET nap${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} nap${PROJECT_NAME})
endif()

set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN/lib")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN/${LIB_RPATH}")

# Create the cache directory in source
set(cache_dir ${CMAKE_CURRENT_SOURCE_DIR}/cache)
Expand Down Expand Up @@ -135,19 +135,21 @@ add_custom_command(
${cache_dir}/build_app.json
${BIN_DIR}/${PROJECT_NAME}.json)

set(source_data_dir ${CMAKE_CURRENT_SOURCE_DIR}/data)

## Run FBX converter post-build within bin data dir
#add_dependencies(${PROJECT_NAME} fbxconverter)
#add_custom_command(TARGET ${PROJECT_NAME}
# POST_BUILD
# COMMAND ${BIN_DIR}/fbxconverter -o ${source_data_dir} ${source_data_dir}/*.fbx
# COMMENT "Exporting FBX in '${source_data_dir}'")

# Copy data directory to app specific bin
set(bin_data_dir ${app_install_data_dir}/data)
add_custom_command(
TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/data ${bin_data_dir})

# Run FBX converter post-build within bin data dir
add_dependencies(${PROJECT_NAME} fbxconverter)
add_custom_command(TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${BIN_DIR}/fbxconverter -o ${bin_data_dir} ${bin_data_dir}/*.fbx
COMMENT "Exporting FBX in '${bin_data_dir}'")
${source_data_dir} ${bin_data_dir})

# Copy core license files
set(bin_license_dir ${BIN_DIR}/license)
Expand Down
2 changes: 1 addition & 1 deletion cmake/nap_module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ codesign_target(${PROJECT_NAME})

# Install library and module json
install(FILES $<TARGET_FILE:${PROJECT_NAME}> TYPE LIB OPTIONAL)
install(FILES ${LIB_DIR}/${PROJECT_NAME}.json TYPE DATA OPTIONAL)
install(FILES ${LIB_DIR}/${PROJECT_NAME}.json DESTINATION ${CMAKE_INSTALL_MODULEINFODIR} OPTIONAL)
2 changes: 1 addition & 1 deletion cmake/nap_utilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function(target_link_import_library target library)
endif()
get_target_property(library_path ${library} IMPORTED_LOCATION)
get_target_property(library_path_debug ${library} IMPORTED_LOCATION_DEBUG)
if (DEFINED ${CMAKE_BUILD_TYPE})
if (DEFINED CMAKE_BUILD_TYPE)
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND EXISTS ${library_path_debug})
set(library_path ${library_path_debug})
endif()
Expand Down
16 changes: 16 additions & 0 deletions cmake/qt_checker/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.18.4)
project(qt_checker)

# Add possible Qt installation paths to the HINTS section
find_path(QT_DIR lib/cmake/Qt6/Qt6Config.cmake
HINTS
$ENV{QT_DIR}
)
# Find_package for Qt6 will pick up the Qt installation from CMAKE_PREFIX_PATH
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${QT_DIR})

find_package(Qt6Core REQUIRED)
find_package(Qt6Widgets REQUIRED)
find_package(Qt6Gui REQUIRED)
find_package(Qt6OpenGL REQUIRED)
message(STATUS "Found Qt ${Qt6Core_VERSION}")
15 changes: 1 addition & 14 deletions cmake/qtconfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ macro(find_qt)
endif()

# Set vulkan SDK environment variable so QT to can find and use Vulkan
if(NOT DEFINED ENV{VULKAN_SDK})
set(ENV{VULKAN_SDK} "${NAP_ROOT}/system_modules/naprender/thirdparty/vulkansdk/${NAP_THIRDPARTY_PLATFORM_DIR}/${ARCH}")
message(STATUS "Using VULKAN_SDK environment variable: $ENV{VULKAN_SDK}")
endif()
set(ENV{VULKAN_SDK} "${NAP_ROOT}/system_modules/naprender/thirdparty/vulkansdk/${NAP_THIRDPARTY_PLATFORM_DIR}/${ARCH}")

# Add possible Qt installation paths to the HINTS section
# The version probably doesn't have to match exactly (5.8.? is probably fine)
Expand All @@ -33,17 +30,7 @@ macro(find_qt)
)

if(QT_DIR)
if(APPLE AND DEFINED NAP_PACKAGED_BUILD)
# Ensure we're not using Qt from homebrew as we don't know the legal situation with packaging homebrew's packages.
# Plus Qt's own opensource packages should have wider macOS version support.
if(EXISTS ${QT_DIR}/INSTALL_RECEIPT.json)
message(FATAL_ERROR "Homebrew's Qt packages aren't allowed due largely to a legal unknown.
Install Qt's own opensource release and point environment variable QT_DIR there.")
endif()
endif()

# TODO Ensure we're not packaging system Qt on Linux, we only want to use a download from qt.io

# Find_package for Qt6 will pick up the Qt installation from CMAKE_PREFIX_PATH
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${QT_DIR})
else()
Expand Down
10 changes: 9 additions & 1 deletion cmake/setup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ macro(setup)

# Rpath for searching dynamic libraries
file(RELATIVE_PATH LIB_RPATH ${BIN_DIR} ${LIB_DIR})
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
if (APPLE)
# set(CMAKE_SKIP_BUILD_RPATH TRUE)
else ()
set(CMAKE_BUILD_RPATH_USE_ORIGIN TRUE)
endif ()

# Set the app installation directories
if (NOT DEFINED APP_INSTALL_NAME)
Expand All @@ -39,6 +43,7 @@ macro(setup)
set(CMAKE_INSTALL_LIBDIR ${APP_INSTALL_NAME})
set(CMAKE_INSTALL_DATADIR ${APP_INSTALL_NAME})
set(CMAKE_INSTALL_DOCDIR ${APP_INSTALL_NAME}/doc)
set(CMAKE_INSTALL_MODULEINFODIR ${APP_INSTALL_NAME}/lib)
else()
if (APPLE)
# Install in app bundle structure on MacOS
Expand All @@ -47,14 +52,17 @@ macro(setup)
set(CMAKE_INSTALL_DATADIR ${APP_INSTALL_NAME}/Contents/Resources)
set(CMAKE_INSTALL_DOCDIR ${APP_INSTALL_NAME}/Contents/Resources/doc)
set(CMAKE_INSTALL_INFODIR ${APP_INSTALL_NAME}/Contents) # Used for Info.plist file
set(CMAKE_INSTALL_MODULEINFODIR ${APP_INSTALL_NAME}/Contents/Resources/lib)
else ()
# Install libraries in lib, executable in app root on Linux
set(CMAKE_INSTALL_BINDIR ${APP_INSTALL_NAME})
set(CMAKE_INSTALL_LIBDIR ${APP_INSTALL_NAME}/lib)
set(CMAKE_INSTALL_DATADIR ${APP_INSTALL_NAME})
set(CMAKE_INSTALL_DOCDIR ${APP_INSTALL_NAME}/doc)
set(CMAKE_INSTALL_MODULEINFODIR ${APP_INSTALL_NAME}/lib)
endif()
endif()
set(CMAKE_INSTALL_MESSAGE LAZY) # Don't tell us about up-to-date files.

# Constants for searching library files
if(APPLE)
Expand Down
6 changes: 3 additions & 3 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if(APPLE)
src/nap/osx/directorywatcher.cpp
src/nap/osx/module.cpp
src/nap/osx/core_env.cpp
src/nap/native/modulemanager_ext.cpp
src/nap/native/modulecache_ext.cpp
src/nap/native/logger_ext.cpp
src/nap/native/core_ext.cpp
src/nap/native/resourcemanager_ext.cpp
Expand All @@ -29,7 +29,7 @@ elseif(MSVC)
src/nap/win32/directorywatcher.cpp
src/nap/win32/module.cpp
src/nap/win32/core_env.cpp
src/nap/native/modulemanager_ext.cpp
src/nap/native/modulecache_ext.cpp
src/nap/native/logger_ext.cpp
src/nap/native/core_ext.cpp
src/nap/native/resourcemanager_ext.cpp
Expand All @@ -44,7 +44,7 @@ elseif(UNIX)
src/nap/linux/directorywatcher.cpp
src/nap/linux/module.cpp
src/nap/linux/core_env.cpp
src/nap/native/modulemanager_ext.cpp
src/nap/native/modulecache_ext.cpp
src/nap/native/logger_ext.cpp
src/nap/native/core_ext.cpp
src/nap/native/resourcemanager_ext.cpp
Expand Down
Loading