project(SERIALIZE) 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(SERIALIZE_PLUGIN_VERSION 0.1.0) string(REGEX MATCH "^[0-9]+" SERIALIZE_PLUGIN_SOVERSION ${SERIALIZE_PLUGIN_VERSION}) find_package(Qt5Core) find_package(Qt5Widgets) set(QT_LIBRARIES Qt5::Core;Qt5::Widgets) set(SERIALIZE_HEADERS serializeplugin_api.h serializeplugin.h myclassinherit.h myclassstreamed.h ) set(SERIALIZE_SOURCES serializeplugin.cpp myclassinherit.cpp myclassstreamed.cpp ) add_definitions(-DSERIALIZE_PLUGIN_VERSION=${SERIALIZE_PLUGIN_VERSION}) add_library(serializeplugin ${SERIALIZE_SOURCES} ${SERIALIZE_HEADERS}) target_link_libraries(serializeplugin workspace ${QT_LIBRARIES}) set_target_properties(serializeplugin PROPERTIES DEFINE_SYMBOL CSIRO_SERIALIZEPLUGIN_EXPORT VERSION ${SERIALIZE_PLUGIN_VERSION} SOVERSION ${SERIALIZE_PLUGIN_SOVERSION} ) setTargetOutputDirectory(serializeplugin ${CSIRO_INSTALL_AREA}/lib/Plugins)