-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
41 lines (29 loc) · 1.45 KB
/
CMakeLists.txt
File metadata and controls
41 lines (29 loc) · 1.45 KB
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
# CloudCompare Json RPC plugin based on example for standard plugins
# Add an option to CMake to control whether we build this plugin or not
option( PLUGIN_STANDARD_QJSONRPC "Install Json RPC plugin" OFF )
if ( PLUGIN_STANDARD_QJSONRPC )
project( QJSON_RPC_PLUGIN )
AddPlugin( NAME ${PROJECT_NAME} )
find_package(Qt6 COMPONENTS Network WebSockets REQUIRED)
target_link_libraries(${PROJECT_NAME} Qt6::Core Qt6::Network Qt6::WebSockets)
add_subdirectory( include )
add_subdirectory( src )
target_include_directories( ${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
)
if (WIN32)
# copy Qt's Network abd WebSockets DLLs
get_target_property( Qt6_NETWORK_LIB_LOCATION Qt6::Network LOCATION_RELEASE )
copy_files(${Qt6_NETWORK_LIB_LOCATION} "${CLOUDCOMPARE_DEST_FOLDER}" 0) #mind the quotes!
get_target_property( Qt6_WEBSOCKET_LIB_LOCATION Qt6::WebSockets LOCATION_RELEASE )
copy_files(${Qt6_WEBSOCKET_LIB_LOCATION} "${CLOUDCOMPARE_DEST_FOLDER}" 0) #mind the quotes!
if (CMAKE_CONFIGURATION_TYPES)
#debug DLLs
get_target_property( Qt6_NETWORK_LIB_DEBUG_LOCATION Qt6::Network LOCATION_DEBUG )
copy_files(${Qt6_NETWORK_LIB_DEBUG_LOCATION} "${CLOUDCOMPARE_DEST_FOLDER}" 2) #mind the quotes!
get_target_property( Qt6_WEBSOCKET_LIB_DEBUG_LOCATION Qt6::WebSockets LOCATION_DEBUG )
copy_files(${Qt6_WEBSOCKET_LIB_DEBUG_LOCATION} "${CLOUDCOMPARE_DEST_FOLDER}" 2) #mind the quotes!
endif()
endif()
endif()