mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
d97fc7e110
"SetPaths.cmake" (removed) - resolves absolute paths in "zint-targets.cmake", ticket #318, props John Alexander; also remove "FindZint.cmake" install as not best practice (Daniel Pfeifer “Effective CMake"), but retain in tree for now; also remove APPLE stuff re UNIVERSAL build, obsolete, and setting of CMAKE_OSX_SYSROOT, seems unnecessary
35 lines
1.0 KiB
CMake
35 lines
1.0 KiB
CMake
# Copyright (C) 2008 by BogDan Vatra < bogdan@licentia.eu >
|
|
# Copyright (C) 2009-2024 Robin Stuart <rstuart114@gmail.com>
|
|
# vim: set ts=4 sw=4 et :
|
|
|
|
project(QZint)
|
|
|
|
set(${PROJECT_NAME}_SRCS qzint.cpp)
|
|
|
|
if(USE_QT6)
|
|
qt6_wrap_cpp(QZint_SRCS qzint.h)
|
|
else()
|
|
qt5_wrap_cpp(QZint_SRCS qzint.h)
|
|
endif()
|
|
|
|
add_library(${PROJECT_NAME} STATIC ${QZint_SRCS})
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION "${ZINT_VERSION_MAJOR}.${ZINT_VERSION_MINOR}"
|
|
VERSION ${ZINT_VERSION})
|
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../backend")
|
|
|
|
if(ZINT_SHARED)
|
|
target_link_libraries(${PROJECT_NAME} zint)
|
|
else()
|
|
target_link_libraries(${PROJECT_NAME} zint-static)
|
|
endif()
|
|
target_link_libraries(${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Gui)
|
|
|
|
if(ZINT_TEST)
|
|
add_subdirectory(tests)
|
|
endif()
|
|
|
|
install(TARGETS ${PROJECT_NAME} ${INSTALL_TARGETS_DEFAULT_ARGS})
|
|
install(FILES qzint.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT Devel)
|