1 # Copyright (C) 2017-2022 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 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake files")
25 IF(EXISTS ${CONFIGURATION_ROOT_DIR})
26 LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
27 INCLUDE(SalomeMacros NO_POLICY_SCOPE)
29 MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
32 SET(REMOTEFILEBROWSER_INSTALL_BINS bin CACHE PATH "Install path: RemoteFileBrowser binaries")
33 SET(REMOTEFILEBROWSER_INSTALL_LIBS lib CACHE PATH "Install path: RemoteFileBrowser libraries")
34 SET(REMOTEFILEBROWSER_INSTALL_HEADERS include CACHE PATH "Install path: RemoteFileBrowser headers")
36 INCLUDE(SalomeSetupPlatform)
37 SET(BUILD_SHARED_LIBS TRUE)
38 FIND_PACKAGE(SalomeQt5 REQUIRED)
48 SET(qremotefilebrowser_SOURCES
49 QRemoteFileBrowser.cxx
54 SET(qremotefilebrowser_HEADERS
61 SET(qremotefilebrowser_LIBRARIES
62 "Qt5::Core;Qt5::Widgets"
71 # sources / moc wrappings
72 QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
74 ADD_LIBRARY(qremotefilebrowser ${qremotefilebrowser_SOURCES} ${_moc_SOURCES})
75 TARGET_LINK_LIBRARIES(qremotefilebrowser ${qremotefilebrowser_LIBRARIES})
76 ADD_EXECUTABLE(remotefilebrowser remotefilebrowser.cxx)
77 TARGET_LINK_LIBRARIES(remotefilebrowser qremotefilebrowser)
78 INSTALL(TARGETS remotefilebrowser DESTINATION ${REMOTEFILEBROWSER_INSTALL_BINS})
79 INSTALL(TARGETS qremotefilebrowser DESTINATION ${REMOTEFILEBROWSER_INSTALL_LIBS})
80 INSTALL(FILES ${_moc_HEADERS} DESTINATION ${REMOTEFILEBROWSER_INSTALL_HEADERS})