2022-04-12 20:02:50 -04:00
|
|
|
find_package(assimp REQUIRED)
|
2023-07-07 16:02:17 -04:00
|
|
|
set_target_properties(assimp::assimp PROPERTIES MAP_IMPORTED_CONFIG_DEBUG Release)
|
2022-04-12 20:02:50 -04:00
|
|
|
|
2022-04-11 21:59:37 -04:00
|
|
|
add_executable(mdlviewer
|
|
|
|
src/main.cpp
|
2022-04-28 17:50:05 -04:00
|
|
|
src/mainwindow.cpp
|
|
|
|
src/vec3edit.cpp
|
2023-04-09 15:31:19 -04:00
|
|
|
include/vec3edit.h
|
|
|
|
src/gearview.cpp
|
|
|
|
src/singlegearview.cpp
|
2023-07-06 17:37:31 -04:00
|
|
|
src/fullmodelviewer.cpp
|
|
|
|
src/quaternionedit.cpp
|
|
|
|
src/boneeditor.cpp
|
2023-07-08 09:13:02 -04:00
|
|
|
src/cmpeditor.cpp
|
|
|
|
src/gearlistwidget.cpp
|
|
|
|
src/gearlistmodel.cpp)
|
2022-04-11 21:59:37 -04:00
|
|
|
target_include_directories(mdlviewer
|
|
|
|
PUBLIC
|
|
|
|
include)
|
2022-04-12 20:02:50 -04:00
|
|
|
target_link_libraries(mdlviewer PUBLIC
|
|
|
|
${LIBRARIES}
|
|
|
|
Qt5::Core
|
|
|
|
Qt5::Widgets
|
|
|
|
renderer
|
2022-04-17 20:02:06 -04:00
|
|
|
assimp::assimp
|
2022-08-10 14:52:28 -04:00
|
|
|
magic_enum
|
2023-04-09 15:31:19 -04:00
|
|
|
physis z
|
|
|
|
mdlpart)
|
2022-04-11 21:59:37 -04:00
|
|
|
|
|
|
|
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()
|