]> SALOME platform Git repositories - modules/gui.git/blob - tools/RemoteFileBrowser/CMakeLists.txt
Salome HOME
Merge branch 'V8_4_BR'
[modules/gui.git] / tools / RemoteFileBrowser / CMakeLists.txt
1 # Copyright (C) 2017  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19 # Author : Anthony GEAY (EDF R&D)
20
21 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
22 PROJECT(RemoteFileBrowser CXX)
23
24 CMAKE_POLICY(SET CMP0003 NEW)
25
26 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake files")
27 IF(EXISTS ${CONFIGURATION_ROOT_DIR})
28   LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
29   INCLUDE(SalomeMacros)
30 ELSE()
31   MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
32 ENDIF()
33
34 SET(REMOTEFILEBROWSER_INSTALL_BINS bin CACHE PATH "Install path: RemoteFileBrowser binaries")
35 SET(REMOTEFILEBROWSER_INSTALL_LIBS lib CACHE PATH "Install path: RemoteFileBrowser libraries")
36 SET(REMOTEFILEBROWSER_INSTALL_HEADERS include CACHE PATH "Install path: RemoteFileBrowser headers")
37
38 INCLUDE(SalomeSetupPlatform)
39 SET(BUILD_SHARED_LIBS TRUE)
40 INCLUDE(SalomeMacros)
41 FIND_PACKAGE(SalomeQt5 REQUIRED)
42 INCLUDE(UseQtExt)
43 INCLUDE_DIRECTORIES(
44   ${QT_INCLUDES}
45   )
46
47 ADD_DEFINITIONS(
48   ${QT_DEFINITIONS}
49   )
50
51 SET(qremotefilebrowser_SOURCES
52   QRemoteFileBrowser.cxx
53   QMachineBrowser.cxx
54   QRemoteCopyWidget.cxx
55   )
56
57 SET(qremotefilebrowser_HEADERS
58   QRemoteFileBrowser
59   QRemoteCopyWidget
60   QMachineBrowser
61   )
62
63 SET(qremotefilebrowser_LIBRARIES
64   "Qt5::Core;Qt5::Widgets"
65   )
66
67 SET(_moc_HEADERS
68   QRemoteFileBrowser
69   QMachineBrowser
70   QRemoteCopyWidget
71   )
72
73 # sources / moc wrappings
74 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
75
76 ADD_LIBRARY(qremotefilebrowser ${qremotefilebrowser_SOURCES} ${_moc_SOURCES})
77 TARGET_LINK_LIBRARIES(qremotefilebrowser ${qremotefilebrowser_LIBRARIES})
78 ADD_EXECUTABLE(remotefilebrowser remotefilebrowser.cxx)
79 TARGET_LINK_LIBRARIES(remotefilebrowser qremotefilebrowser)
80 INSTALL(TARGETS remotefilebrowser DESTINATION ${REMOTEFILEBROWSER_INSTALL_BINS})
81 INSTALL(TARGETS qremotefilebrowser DESTINATION ${REMOTEFILEBROWSER_INSTALL_LIBS})
82 INSTALL(FILES ${_moc_HEADERS} DESTINATION ${REMOTEFILEBROWSER_INSTALL_HEADERS})