1 # Copyright (C) 2017 CEA/DEN, EDF R&D
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 # Author : Anthony GEAY (EDF R&D)
21 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
22 PROJECT(RemoteFileBrowser CXX)
24 CMAKE_POLICY(SET CMP0003 NEW)
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")
31 MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
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")
38 INCLUDE(SalomeSetupPlatform)
39 SET(BUILD_SHARED_LIBS TRUE)
41 FIND_PACKAGE(SalomeQt5 REQUIRED)
51 SET(qremotefilebrowser_SOURCES
52 QRemoteFileBrowser.cxx
57 SET(qremotefilebrowser_HEADERS
63 SET(qremotefilebrowser_LIBRARIES
64 "Qt5::Core;Qt5::Widgets"
73 # sources / moc wrappings
74 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
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})