CMakeLists.txt 2.18 KB
Newer Older
1
set(SRC_FILES
2
3
	src/MantidWebServiceAPIHelper.cpp
	src/MantidWebServiceAPIJobManager.cpp)
4

5
set(INC_FILES
6
7
	inc/MantidRemoteJobManagers/MantidWebServiceAPIHelper.h
	inc/MantidRemoteJobManagers/MantidWebServiceAPIJobManager.h)
8

9
set(TEST_FILES
10
11
	MantidWebServiceAPIHelperTest.h
	MantidWebServiceAPIJobManagerTest.h)
12

13
# set ( TEST_PY_FILES
14
#
15
# ) No Python tests yet...
16

17
if(COVERAGE)
18
19
20
21
22
  foreach(loop_var ${SRC_FILES} ${INC_FILES})
    set_property(GLOBAL APPEND
                 PROPERTY COVERAGE_SRCS
                          "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
  endforeach(loop_var)
23
24
endif()

25
26
27
# Not for now, remember later if convenient: Add a precompiled header where they
# are supported enable_precompiled_headers (
# inc/MantidRemoteJobManagers/PrecompiledHeader.h SRC_FILES )
28
29

# Add the target for this directory
30
add_library(RemoteJobManagers ${SRC_FILES} ${INC_FILES})
Stephen's avatar
Stephen committed
31
32
33
34
35
36
add_library(Mantid::RemoteJobManagers ALIAS RemoteJobManagers)

target_include_directories(RemoteJobManagers PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
		$<INSTALL_INTERFACE:include/Mantid>
)
37
38

# Set the name of the generated library
39
40
set_target_properties(RemoteJobManagers
                      PROPERTIES OUTPUT_NAME MantidRemoteJobManagers)
41

42
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
43
44
45
46
47
48
49
  set_target_properties(RemoteJobManagers
                        PROPERTIES INSTALL_RPATH
                                   "@loader_path/../Contents/MacOS")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
  set_target_properties(RemoteJobManagers
                        PROPERTIES INSTALL_RPATH "\$ORIGIN/../${LIB_DIR}")
endif()
50
51

# Add to the 'Framework' group in VS
52
set_property(TARGET RemoteJobManagers PROPERTY FOLDER "MantidFramework")
53

Stephen's avatar
Stephen committed
54
target_link_libraries(RemoteJobManagers PUBLIC Mantid::Kernel Mantid::API)
55
56

# Add the unit tests directory
57
add_subdirectory(test)
58
59

# Installation settings
Stephen's avatar
Stephen committed
60
61
62
63
64
65
66
67
set(TARGET_EXPORT_NAME "MantidRemoteJobManagersTargets")
mtd_install_dylib(TARGETS RemoteJobManagers EXPORT_NAME ${TARGET_EXPORT_NAME} INSTALL_DIRS ${LIB_DIR} ${WORKBENCH_LIB_DIR})

install(EXPORT ${TARGET_EXPORT_NAME}
        FILE ${TARGET_EXPORT_NAME}.cmake
        NAMESPACE Mantid::
        DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MantidFramework
)