project(OBJECTGROUPS) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) find_path(WORKSPACE_CMAKE_ROOT Workspace_CMake_Root.txt HINTS ${CMAKE_SOURCE_DIR} ENV WORKSPACE_CMAKE_ROOT DOC "Directory containing the Workspace_CMake_Root.txt file") if (NOT WORKSPACE_CMAKE_ROOT) message(FATAL_ERROR "Please set WORKSPACE_CMAKE_ROOT to the directory containing the file Workspace_CMake_Root.txt") endif() include( ${WORKSPACE_CMAKE_ROOT}/CMakeLists.txt NO_POLICY_SCOPE ) endif() set(OBJECTGROUPS_PLUGIN_VERSION 0.1.0) string(REGEX MATCH "^[0-9]+" OBJECTGROUPS_PLUGIN_SOVERSION ${OBJECTGROUPS_PLUGIN_VERSION}) find_package(Qt5Core) find_package(Qt5Widgets) set(QT_LIBRARIES Qt5::Core;Qt5::Widgets) set(OBJECTGROUPS_HEADERS objectgroupsplugin_api.h objectgroupsplugin.h mygroup.h mypair.h ) set(OBJECTGROUPS_SOURCES objectgroupsplugin.cpp mygroup.cpp mypair.cpp ) add_definitions(-DOBJECTGROUPS_PLUGIN_VERSION=${OBJECTGROUPS_PLUGIN_VERSION}) add_library(objectgroupsplugin ${OBJECTGROUPS_SOURCES} ${OBJECTGROUPS_HEADERS}) target_link_libraries(objectgroupsplugin workspace ${QT_LIBRARIES}) set_target_properties(objectgroupsplugin PROPERTIES DEFINE_SYMBOL CSIRO_OBJECTGROUPSPLUGIN_EXPORT VERSION ${OBJECTGROUPS_PLUGIN_VERSION} SOVERSION ${OBJECTGROUPS_PLUGIN_SOVERSION} ) setTargetOutputDirectory(objectgroupsplugin ${CSIRO_INSTALL_AREA}/lib/Plugins)