Update CMakeLists.txt

This commit is contained in:
2024-01-25 16:15:51 -05:00
parent 09097f1ecd
commit e570a2f0e8

View File

@@ -29,17 +29,16 @@ 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}")
find_program(MESON_EXECUTABLE meson)
if(NOT MESON_EXECUTABLE)
message(FATAL_ERROR "Meson not found. Please install Meson before proceeding.")
endif()
set(gluURL "https://git.redacted.cc/Redacted/glu.git")
execute_process(
COMMAND bash -c "rm -rf glu && mkdir lib && git clone ${gluURL} && cd glu && meson setup builddir && cd builddir && meson compile && cd src && mv libGLU.so.1.3.1 ../../../lib/libGLU.so"
)
if(UNIX AND NOT APPLE)
find_program(MESON_EXECUTABLE meson)
if(NOT MESON_EXECUTABLE)
message(FATAL_ERROR "Meson not found. Please install Meson before proceeding.")
endif()
execute_process(
COMMAND bash -c "rm -rf glu && mkdir lib && git clone ${gluURL} && cd glu && meson setup builddir && cd builddir && meson compile && cd src && mv libGLU.so.1.3.1 ../../../lib/libGLU.so"
)
endif()
CPMAddPackage(
NAME ReWindow
@@ -85,7 +84,11 @@ include_directories(
${uuid_v4_SOURCE_DIR}/
${PROJECT_BINARY_DIR}/glu/include
)
if(UNIX AND NOT APPLE)
target_link_libraries(Re3D_Demo PUBLIC Re3D ReWindowLibrary ReHardwareID J3ML soil uuid_v4 GL ${PROJECT_BINARY_DIR}/lib/libGLU.so)
endif()
target_link_libraries(Re3D_Demo PUBLIC Re3D ReWindowLibrary ReHardwareID J3ML soil uuid_v4 GL ${PROJECT_BINARY_DIR}/lib/libGLU.so)
if(WIN32)
target_link_libraries(Re3D_Demo PUBLIC Re3D ReWindowLibrary ReHardwareID J3ML soil uuid_v4 GL GLU)
endif()