Skip to content

Commit 68aee93

Browse files
Eotelandrewfb
authored andcommitted
Fix missing RESOURCES in CMake sample builds
Several samples use loadResource() to load files but their CMakeLists.txt files were missing the RESOURCES parameter in ci_make_app(). This caused the CMake builds to fail at runtime with "Failed to load resource" errors, while Xcode builds worked correctly because resources were explicitly listed in the project. Fixed samples: - ArcballDemo - CameraPersp - ClipboardBasic - Kaleidoscope - LocationManager - MandelbrotGLSL - Picking3D
1 parent 729e1f8 commit 68aee93

File tree

7 files changed

+13
-0
lines changed

7 files changed

+13
-0
lines changed

samples/ArcballDemo/proj/cmake/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ ci_make_app(
1212
SOURCES ${APP_PATH}/src/ArcballDemoApp.cpp
1313
CINDER_PATH ${CINDER_PATH}
1414
INCLUDES ${APP_PATH}/include
15+
RESOURCES ${CINDER_PATH}/samples/data/earth.jpg
1516
)

samples/CameraPersp/proj/cmake/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ ci_make_app(
1212
SOURCES ${APP_PATH}/src/CameraPerspApp.cpp
1313
INCLUDES ${APP_PATH}/include
1414
CINDER_PATH ${CINDER_PATH}
15+
RESOURCES ${CINDER_PATH}/samples/data/environment_maps/humus_sf.jpg
1516
)

samples/ClipboardBasic/proj/cmake/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ ci_make_app(
1212
SOURCES ${APP_PATH}/src/ClipboardBasicApp.cpp
1313
CINDER_PATH ${CINDER_PATH}
1414
INCLUDES ${APP_PATH}/include
15+
RESOURCES ${CINDER_PATH}/samples/data/cinder_logo.png
1516
)

samples/Kaleidoscope/proj/cmake/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ ci_make_app(
1414
${APP_PATH}/src/TrianglePiece.cpp
1515
INCLUDES ${APP_PATH}/include
1616
CINDER_PATH ${CINDER_PATH}
17+
RESOURCES ${APP_PATH}/resources/Asap-Regular.ttf
18+
${APP_PATH}/resources/Kreon-Bold.ttf
1719
)

samples/LocationManager/proj/cmake/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" )
1111
ci_make_app(
1212
SOURCES ${APP_PATH}/src/LocationManagerApp.cpp
1313
CINDER_PATH ${CINDER_PATH}
14+
INCLUDES ${APP_PATH}/include
15+
RESOURCES ${APP_PATH}/resources/earth.jpg
1416
)

samples/MandelbrotGLSL/proj/cmake/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ ci_make_app(
1212
SOURCES ${APP_PATH}/src/MandelbrotGLSLApp.cpp
1313
INCLUDES ${APP_PATH}/include
1414
CINDER_PATH ${CINDER_PATH}
15+
RESOURCES ${APP_PATH}/resources/mandelbrot.vert
16+
${APP_PATH}/resources/mandelbrot.frag
17+
${APP_PATH}/resources/colors.png
1518
)

samples/Picking3D/proj/cmake/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" )
1111
ci_make_app(
1212
SOURCES ${APP_PATH}/src/Picking3DApp.cpp
1313
CINDER_PATH ${CINDER_PATH}
14+
INCLUDES ${APP_PATH}/include
15+
RESOURCES ${APP_PATH}/resources/ducky.msh
16+
${APP_PATH}/resources/ducky.png
1417
)

0 commit comments

Comments
 (0)