-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (43 loc) · 1.59 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
48
49
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(Libigl-Community-Plugins)
if (NOT ParaView_BINARY_DIR)
find_package(ParaView REQUIRED)
endif()
include(GNUInstallDirs)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
if(PARAVIEW_USE_FILE)
# ParaView 5.6
# ------------
#If the plugin is used internally we don't need to include.
if (NOT ParaView_BINARY_DIR)
include(${PARAVIEW_USE_FILE})
endif(NOT ParaView_BINARY_DIR)
add_subdirectory(Plugins/Libigl)
else()
# ParaView 6 or later
# --------------------
# `paraview_plugin_build` uses `add_subdirectory` so it has to be in a sub-directory
paraview_plugin_scan(
PLUGIN_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Plugins/Libigl/paraview.plugin"
ENABLE_BY_DEFAULT ON
HIDE_PLUGINS_FROM_CACHE ON
PROVIDES_PLUGINS plugins
REQUIRES_MODULES required_modules
)
foreach (module IN LISTS required_modules)
if (NOT TARGET "${module}")
message("Missing required module: ${module}")
return ()
endif ()
endforeach ()
#Message("CMAKE_INSTALL_BINDIR" "${CMAKE_INSTALL_BINDIR}")
#Message("CMAKE_INSTALL_LIBDIR" "${CMAKE_INSTALL_LIBDIR}")
#Message("PARAVIEW_PLUGIN_SUBDIR" "${PARAVIEW_PLUGIN_SUBDIR}")
paraview_plugin_build(
RUNTIME_DESTINATION "${CMAKE_INSTALL_BINDIR}"
LIBRARY_DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY_SUBDIRECTORY "${PARAVIEW_PLUGIN_SUBDIR}"
PLUGINS ${plugins})
endif()