2022-09-28 21:49:30 +00:00
|
|
|
set(TARGET_NAME svg2qvg)
|
|
|
|
set(TARGET_SOURCES main.cpp)
|
|
|
|
|
|
|
|
add_executable(${TARGET_NAME} ${TARGET_SOURCES})
|
|
|
|
|
2022-10-10 12:11:13 +00:00
|
|
|
if(BUILD_SVG2QVG_STANDALONE)
|
2022-09-28 21:49:30 +00:00
|
|
|
|
2022-10-30 16:29:10 +00:00
|
|
|
# NOTE: when building standalone some moc files are transitively required.
|
|
|
|
# These files are being created by the qskinny build, hence we add an explicit dependency.
|
|
|
|
# E.g. main.cpp -> #include <QskGraphic.cpp> -> #include "moc_QskGraphic.cpp"
|
|
|
|
add_dependencies(${TARGET_NAME} qskinny)
|
|
|
|
|
2022-10-30 19:21:06 +00:00
|
|
|
# TODO hack for standalone qvg2svg
|
2022-09-28 21:49:30 +00:00
|
|
|
get_target_property(qskinny_AUTOGEN_DIR qskinny AUTOGEN_BUILD_DIR)
|
2022-10-30 19:21:06 +00:00
|
|
|
if (${qskinny_AUTOGEN_DIR} STREQUAL "")
|
|
|
|
message(FATAL_ERROR "Directory '${qskinny_AUTOGEN_DIR}' doesn't exist")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# TODO fix multi configuration generators
|
|
|
|
if(CMAKE_GENERATOR MATCHES "Visual Studio.*")
|
|
|
|
add_definitions("/I${qskinny_AUTOGEN_DIR}/include_\$(Configuration)")
|
2022-09-28 21:49:30 +00:00
|
|
|
else()
|
2022-10-30 19:21:06 +00:00
|
|
|
target_include_directories(${TARGET_NAME}
|
|
|
|
PRIVATE
|
2022-10-30 19:52:48 +00:00
|
|
|
${qskinny_AUTOGEN_DIR}/include)
|
2022-09-28 21:49:30 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
target_include_directories(${TARGET_NAME}
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_SOURCE_DIR}/src/common
|
2022-10-30 19:21:06 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/src/graphic)
|
2022-09-28 21:49:30 +00:00
|
|
|
|
|
|
|
target_compile_definitions(${TARGET_NAME}
|
|
|
|
PRIVATE
|
|
|
|
QSK_STANDALONE)
|
|
|
|
|
|
|
|
target_link_libraries(${TARGET_NAME}
|
|
|
|
PRIVATE
|
2022-10-27 17:01:10 +00:00
|
|
|
${Qt}::Gui
|
|
|
|
${Qt}::GuiPrivate
|
|
|
|
${Qt}::Svg)
|
2022-09-28 21:49:30 +00:00
|
|
|
else()
|
|
|
|
target_link_libraries(${TARGET_NAME}
|
|
|
|
PRIVATE
|
|
|
|
qskinny
|
2022-10-27 17:01:10 +00:00
|
|
|
${Qt}::Svg)
|
2022-09-28 21:49:30 +00:00
|
|
|
endif()
|
|
|
|
|
2022-10-30 19:21:06 +00:00
|
|
|
set_target_properties(${TARGET_NAME}
|
|
|
|
PROPERTIES
|
|
|
|
FOLDER tools)
|
|
|
|
|
2022-11-01 15:51:26 +00:00
|
|
|
install(TARGETS ${TARGET_NAME})
|