-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (37 loc) · 1.34 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.3.0)
project(demo_plugin)
find_package(ImFusionLib REQUIRED)
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_INSTALL_RPATH "/Applications/ImFusionSuite.app/Contents/Frameworks")
endif(APPLE)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
# Define and configure the targets
set(PLUGIN_SOURCES
src/algorithm.cpp
src/controller.cpp
src/factory.cpp
src/plugin.cpp
src/controller.ui
)
set(PLUGIN_HEADERS
include/${PROJECT_NAME}/algorithm.hpp
include/${PROJECT_NAME}/controller.hpp
include/${PROJECT_NAME}/factory.hpp
include/${PROJECT_NAME}/plugin.hpp
)
# Define target library
add_library(${PROJECT_NAME} SHARED ${PLUGIN_SOURCES} ${PLUGIN_HEADERS})
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14)
target_include_directories(${PROJECT_NAME} PRIVATE include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
# Link agains the ImFusionLib and selected modules/plugins. If other modules are needed, add them to your Plugin.
target_link_libraries(${PROJECT_NAME} PRIVATE ImFusionLib)
# Check if this is needed, how this is provided or how this should be provided.
imfusion_set_common_target_properties()
imfusion_provide_ide_instructions()
# Install step
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})