Skip to content

Commit

Permalink
Idk, something with assets that i hope works still
Browse files Browse the repository at this point in the history
  • Loading branch information
JustDoom committed Apr 16, 2024
1 parent 9bd4afb commit 7d8c817
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
15 changes: 11 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ project(8ChocChip
LANGUAGES CXX
VERSION 0.1)

add_subdirectory(dependencies)
add_subdirectory(src)
#file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})
#
#install(DIRECTORY assets DESTINATION ${CMAKE_INSTALL_PREFIX})

file(GLOB ASSETS "${CMAKE_SOURCE_DIR}/assets/*")

file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})
# Copy assets to build directory
foreach(ASSET ${ASSETS})
configure_file(${ASSET} ${CMAKE_BINARY_DIR}/assets COPYONLY)
endforeach()

install(DIRECTORY assets DESTINATION ${CMAKE_INSTALL_PREFIX})
add_subdirectory(dependencies)
add_subdirectory(src)
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ endif()

target_link_libraries(8ChocChip PRIVATE sfml-graphics sfml-audio sfml-window sfml-system nativefiledialog ${libname}++)

# Set the RPATH of the executable to include the directory where SFML libraries are located
set_target_properties(8ChocChip PROPERTIES
INSTALL_RPATH "$ORIGIN"
)

# Copy DLLs needed for runtime on Windows
if(WIN32)
if (BUILD_SHARED_LIBS)
Expand Down

0 comments on commit 7d8c817

Please sign in to comment.