mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +02:00
Seems to work.
This commit is contained in:
parent
aa4320104b
commit
d11aa64306
6 changed files with 44 additions and 17 deletions
|
@ -1,31 +1,39 @@
|
||||||
set(TARGET_NAME auto-tester)
|
set(TARGET_NAME auto-tester)
|
||||||
project(${TARGET_NAME})
|
project(${TARGET_NAME})
|
||||||
|
|
||||||
|
# Automatically run UIC and MOC. This replaces the older WRAP macros
|
||||||
|
SET(CMAKE_AUTOUIC ON)
|
||||||
|
SET(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
setup_hifi_project(Widgets)
|
setup_hifi_project(Widgets)
|
||||||
link_hifi_libraries()
|
link_hifi_libraries()
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
|
|
||||||
set_property(TARGET auto-tester PROPERTY WIN32_EXECUTABLE true)
|
set_property(TARGET auto-tester PROPERTY WIN32_EXECUTABLE true)
|
||||||
|
|
||||||
set(SOURCES src/main.cpp src/Test.cpp src/ui/AutoTester.cpp src/ui/MismatchWindow.cpp)
|
# This is preferred to GLOB_RECURSE, as per CMake documentation
|
||||||
set(MOC_HEADERS src/ui/AutoTester.h src/ui/MismatchWindow.h)
|
set(SOURCES src/main.cpp src/Test.cpp src/ui/autoTester.cpp src/ui/mismatchWindow.cpp)
|
||||||
set(UIS ui/AutoTester.ui ui/MismatchWindow.ui)
|
set(MOC_HEADERS src/autoTester.h src/mismatchWindow.h)
|
||||||
set(RESOURCES src/AutoTester.qrc)
|
set(UIS src/ui/autoTester.ui src/ui/mismatchWindow.ui)
|
||||||
|
|
||||||
QT5_ADD_RESOURCES(RES_SOURCES ${RESOURCES})
|
|
||||||
QT5_WRAP_UI(UI_HEADERS ${UIS})
|
|
||||||
QT5_WRAP_CPP(MOC_SRCS ${MOC_HEADERS})
|
|
||||||
|
|
||||||
add_executable(PROJECT_NAME ${SOURCES} ${MOC_SRCS} ${RES_SOURCES} ${UI_HEADERS})
|
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
add_executable(PROJECT_NAME WIN32 ${SOURCES} ${MOC_SRCS} ${UI_HEADERS})
|
||||||
|
else()
|
||||||
|
add_executable(PROJECT_NAME ${SOURCES} ${MOC_SRCS} ${RES_SOURCES} ${UI_HEADERS})
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(PROJECT_NAME ${QT_LIBRARIES})
|
target_link_libraries(PROJECT_NAME ${QT_LIBRARIES})
|
||||||
|
|
||||||
|
# Copy required dll's.
|
||||||
|
# Note that the two ImageMagick files are copied twice. This is to allow the tester to run from VS as well as
|
||||||
|
# directly from the executable.
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET auto-tester
|
TARGET auto-tester
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:Qt5::Core> $<TARGET_FILE_DIR:auto-tester>
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:Qt5::Core> $<TARGET_FILE_DIR:auto-tester>
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:Qt5::Gui> $<TARGET_FILE_DIR:auto-tester>
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:Qt5::Gui> $<TARGET_FILE_DIR:auto-tester>
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:Qt5::Widgets> $<TARGET_FILE_DIR:auto-tester>
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:Qt5::Widgets> $<TARGET_FILE_DIR:auto-tester>
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/ImageMagick/magick.exe $<TARGET_FILE_DIR:auto-tester>
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/ImageMagick/magic.xml $<TARGET_FILE_DIR:auto-tester>
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/ImageMagick/magick.exe $<TARGET_FILE_DIR:auto-tester>/..
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/ImageMagick/magic.xml $<TARGET_FILE_DIR:auto-tester>/..
|
||||||
)
|
)
|
23
tools/auto-tester/ImageMagick/magic.xml
Normal file
23
tools/auto-tester/ImageMagick/magic.xml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE magicmap [
|
||||||
|
<!ELEMENT magicmap (magic)+>
|
||||||
|
<!ELEMENT magic (#PCDATA)>
|
||||||
|
<!ATTLIST magic name CDATA #REQUIRED>
|
||||||
|
<!ATTLIST magic offset CDATA "0">
|
||||||
|
<!ATTLIST magic target CDATA #REQUIRED>
|
||||||
|
]>
|
||||||
|
<!--
|
||||||
|
Associate an image format with a unique identifier.
|
||||||
|
|
||||||
|
Many image formats have identifiers that uniquely identify a particular
|
||||||
|
image format. For example, the GIF image format always begins with GIF8
|
||||||
|
as the first 4 characters of the image. ImageMagick uses this information
|
||||||
|
to quickly determine the type of image it is dealing with when it reads
|
||||||
|
an image.
|
||||||
|
-->
|
||||||
|
<magicmap>
|
||||||
|
<!-- <magic name="GIF" offset="0" target="GIF8"/> -->
|
||||||
|
<!-- <magic name="JPEG" offset="0" target="\377\330\377"/> -->
|
||||||
|
<!-- <magic name="PNG" offset="0" target="\211PNG\r\n\032\n"/> -->
|
||||||
|
<!-- <magic name="TIFF" offset="0" target="\115\115\000\052"/> -->
|
||||||
|
</magicmap>
|
BIN
tools/auto-tester/ImageMagick/magick.exe
Normal file
BIN
tools/auto-tester/ImageMagick/magick.exe
Normal file
Binary file not shown.
|
@ -1,4 +0,0 @@
|
||||||
<RCC>
|
|
||||||
<qresource prefix="AutoTester">
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
Loading…
Reference in a new issue