mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-24 04:57:45 +00:00
24 lines
823 B
CMake
24 lines
823 B
CMake
add_executable(exdviewer
|
|
src/main.cpp
|
|
src/mainwindow.cpp)
|
|
target_include_directories(exdviewer
|
|
PUBLIC
|
|
include)
|
|
target_link_libraries(exdviewer PUBLIC libxiv ${LIBRARIES} Qt5::Core Qt5::Widgets)
|
|
|
|
install(TARGETS exdviewer
|
|
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 exdviewer
|
|
POST_BUILD
|
|
COMMAND "${WINDEPLOYQT_ENV_SETUP}" && "${WINDEPLOYQT_EXECUTABLE}" \"$<TARGET_FILE:exdviewer>\"
|
|
)
|
|
endif()
|