1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-25 05:17:44 +00:00
novus/mdlviewer/CMakeLists.txt

48 lines
1.4 KiB
Text
Raw Normal View History

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
src/mainwindow.cpp
src/vec3edit.cpp
include/vec3edit.h
src/gearview.cpp
src/singlegearview.cpp
src/fullmodelviewer.cpp
src/quaternionedit.cpp
src/boneeditor.cpp
src/cmpeditor.cpp
src/gearlistwidget.cpp
src/gearlistmodel.cpp)
2022-04-11 21:59:37 -04:00
target_include_directories(mdlviewer
PUBLIC
2023-07-08 10:12:35 -04:00
include
PRIVATE
${CMAKE_BINARY_DIR})
2022-04-12 20:02:50 -04:00
target_link_libraries(mdlviewer PUBLIC
${LIBRARIES}
Qt5::Core
Qt5::Widgets
renderer
assimp::assimp
2022-08-10 14:52:28 -04:00
magic_enum
physis z
mdlpart
NovusCommon)
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()