Link libs to Re3D & link Re3D to executable.

This commit is contained in:
2024-06-08 02:06:21 -04:00
parent 970301a5e7
commit 8ea6f89c93
2 changed files with 9 additions and 10 deletions

View File

@@ -23,10 +23,6 @@ file(GLOB_RECURSE ASSETS "assets/*")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
#Copy the assets to the build directory.
file(COPY "assets" DESTINATION "${PROJECT_BINARY_DIR}")
file(COPY "cfg" DESTINATION "${PROJECT_BINARY_DIR}")
#TODO: Publish release
CPMAddPackage(
NAME Event
@@ -59,8 +55,8 @@ CPMAddPackage(
)
CPMAddPackage(
NAME UUID
URL https://git.redacted.cc/Redacted/uuid/archive/v1.zip
NAME UUID
URL https://git.redacted.cc/Redacted/uuid/archive/v1.zip
)
CPMAddPackage(
@@ -99,7 +95,7 @@ set_target_properties(Re3D PROPERTIES LINKER_LANGUAGE CXX)
find_package(OpenGL REQUIRED)
target_link_libraries(Re3D PUBLIC Event)
target_link_libraries(Re3D PUBLIC Event ReWindowLibrary ReHardwareID J3ML soil GL glad Collage JGL archive)
include(src/demo/RuntimeTest/CMakeLists.txt)

View File

@@ -4,11 +4,14 @@ add_executable(Re3D-RuntimeTest "src/demo/RuntimeTest/main.cpp")
#Link based on the relative path *so you can copy the game around*
set_target_properties(Re3D-RuntimeTest PROPERTIES LINK_FLAGS "-Wl,-rpath,./lib")
# TODO: Link all applicable dependencies to Re3D directly
#Copy the assets to the build directory.
file(COPY "assets" DESTINATION "${PROJECT_BINARY_DIR}")
file(COPY "cfg" DESTINATION "${PROJECT_BINARY_DIR}")
if(UNIX AND NOT APPLE)
target_link_libraries(Re3D-RuntimeTest PUBLIC Re3D ReWindowLibrary ReHardwareID J3ML soil GL glad Collage JGL archive)
target_link_libraries(Re3D-RuntimeTest PUBLIC Re3D)
endif()
if(WIN32)
target_link_libraries(Re3D-RuntimeTest PUBLIC Re3D ReWindowLibrary ReHardwareID J3ML soil GL Collage glad archive)
target_link_libraries(Re3D-RuntimeTest PUBLIC Re3D)
endif()