Skip to content

Commit

Permalink
Make asset directory relative to exe file and copy contents
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeneren committed Jan 3, 2020
1 parent 8b30ba5 commit 9eab385
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ set( RENDER_ENV_TEXTURES OFF CACHE BOOL "Render env sampling textures after crea
add_definitions(-DRENDER_ENV_SAMPLE_TEXTURES=0)
endif()

## Set ASSET_PATH variable to use with VolumeGVDB add path function
get_filename_component(ASSET_DIR ${CMAKE_SOURCE_DIR}/assets ABSOLUTE)
## Set ASSET_PATH variable to assets folder and copy the folder to binary directory

file( GLOB ASSET_FILES "${CMAKE_SOURCE_DIR}/assets/*.*")
file( INSTALL ${ASSET_FILES} DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/assets")

set(ASSET_DIR "./assets")
add_definitions(-DASSET_PATH="${ASSET_DIR}/")

###################################################################


Expand All @@ -42,9 +47,10 @@ file(WRITE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/fireball.ins"
"3\n"
"0 200 0 0 0 0 1 20\n"
"200 200 0 0 0 0 1 20\n"
"-200 200 0 0 0 0 1 20")
"-200 200 0 0 0 0 1 20")


## Grab source files

file( GLOB ATMOSPHERE
"${CMAKE_CURRENT_SOURCE_DIR}/atmosphere/*.h"
Expand Down Expand Up @@ -97,6 +103,8 @@ set(SOURCE_FILES
${GEOMETRY}
${UTIL})

## Group source files

source_group(Cuda FILES ${CUDA_SOURCES})
source_group(bvh FILES ${BVH})
source_group(Imgui FILES ${IMGUI_IMPL_SOURCES})
Expand Down

0 comments on commit 9eab385

Please sign in to comment.