Update CMakeLists.txt

Build GLU
This commit is contained in:
2024-01-25 16:04:23 -05:00
parent 51979d177d
commit 09097f1ecd

View File

@@ -30,6 +30,17 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
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"
)
CPMAddPackage(
NAME ReWindow
URL https://git.redacted.cc/Redacted/ReWindow/archive/vA0.2.7.zip
@@ -72,8 +83,9 @@ include_directories(
${J3ML_SOURCE_DIR}/include
${SOIL_SOURCE_DIR}/include
${uuid_v4_SOURCE_DIR}/
${PROJECT_BINARY_DIR}/glu/include
)
target_link_libraries(Re3D_Demo PUBLIC Re3D ReWindowLibrary ReHardwareID J3ML soil uuid_v4 GL GLU)
target_link_libraries(Re3D_Demo PUBLIC Re3D ReWindowLibrary ReHardwareID J3ML soil uuid_v4 GL ${PROJECT_BINARY_DIR}/lib/libGLU.so)