1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-26 13:47:46 +00:00
novus/mdlviewer/CMakeLists.txt
Joshua Goins 7407d26247 Overhaul mdlviewer to use the MDL part, and add the full model viewer
This is a major code overhaul for mdlviewer, which will make it easier
to extend and modify in the future (trust me, the old code was garbage).

The different views are now split up (SingleGearView, FullModelViewer,
and MDLPart) which makes the functionality easier to handle, and less
error-prone.

Right now bone debugging is disabled (not that it worked that well
anyway) but will be brought back in a future commit.
2023-04-09 15:31:19 -04:00

39 lines
1.1 KiB
CMake

find_package(assimp REQUIRED)
add_executable(mdlviewer
src/main.cpp
src/mainwindow.cpp
src/vec3edit.cpp
include/vec3edit.h
src/gearview.cpp
src/singlegearview.cpp
src/fullmodelviewer.cpp)
target_include_directories(mdlviewer
PUBLIC
include)
target_link_libraries(mdlviewer PUBLIC
${LIBRARIES}
Qt5::Core
Qt5::Widgets
renderer
assimp::assimp
magic_enum
physis z
mdlpart)
install(TARGETS mdlviewer
DESTINATION "${INSTALL_BIN_PATH}")
if(WIN32)
get_target_property(QMAKE_EXE Qt5::qmake IMPORTED_LOCATION)
get_filename_component(QT_BIN_DIR "${QMAKE_EXE}" DIRECTORY)
find_program(WINDEPLOYQT_ENV_SETUP qtenv2.bat HINTS "${QT_BIN_DIR}")
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${QT_BIN_DIR}")
# Run windeployqt immediately after build
add_custom_command(TARGET mdlviewer
POST_BUILD
COMMAND "${WINDEPLOYQT_ENV_SETUP}" && "${WINDEPLOYQT_EXECUTABLE}" \"$<TARGET_FILE:mdlviewer>\"
)
endif()