Salome HOME
9535ab590c7ec6e4779f585188b0e04c9f83b90a
[modules/yacs.git] / src / bases / CMakeLists.txt
1 # Copyright (C) 2012-2021  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
20 IF(SALOME_BUILD_TESTS)
21   ADD_SUBDIRECTORY(Test)
22 ENDIF(SALOME_BUILD_TESTS)
23
24 # --- options ---
25
26 # additional include directories
27 INCLUDE_DIRECTORIES(
28   ${PTHREAD_INCLUDE_DIR}
29   )
30
31 # libraries to link to
32 SET(_link_LIBRARIES
33   ${PTHREAD_LIBRARIES}
34   ${PLATFORM_LIBS}
35   )
36
37 # --- headers ---
38
39 SET(YACSBases_HEADERS
40   YACSBasesExport.hxx
41   Cstr2d.hxx
42   define.hxx
43   DynLibLoaderGNU.hxx
44   DynLibLoader.hxx
45   DynLibLoaderWin.hxx
46   Exception.hxx
47   AutoRefCnt.hxx
48   AutoLocker.hxx
49   Mutex.hxx
50   MutexPT.hxx
51   Semaphore.hxx
52   SemaphorePT.hxx
53   Thread.hxx
54   ThreadPT.hxx
55   AlternateThread.hxx
56   AlternateThreadPT.hxx
57   YacsTrace.hxx
58   yacsconfig.h
59   )
60
61 # --- sources ---
62
63 SET(YACSBases_SOURCES
64   Exception.cxx
65   Thread.cxx
66   AlternateThread.cxx
67   Mutex.cxx
68   Semaphore.cxx
69   DynLibLoader.cxx
70   Cstr2d.cxx
71   YacsTrace.cxx
72   chrono.cxx
73   )
74
75 # --- type of library ---
76
77 SET(TYPE)
78 IF(WIN32)
79   SET(TYPE STATIC)
80 ELSE(WIN32)
81   SET(TYPE SHARED)
82 ENDIF(WIN32)
83
84 # --- rules ---
85
86 ADD_LIBRARY(YACSBases ${TYPE} ${YACSBases_SOURCES})
87 TARGET_LINK_LIBRARIES(YACSBases ${_link_LIBRARIES})
88 INSTALL(TARGETS YACSBases EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
89
90 INSTALL(FILES ${YACSBases_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})