Salome HOME
51e0f84806eb8508a506c10df8a17266a4762fea
[modules/yacs.git] / src / bases / CMakeLists.txt
1 # Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
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.
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 # additional preprocessor / compiler flags
32 ADD_DEFINITIONS(
33   "-DYACS_PTHREAD"
34   )
35
36 # libraries to link to
37 SET(_link_LIBRARIES
38   ${PTHREAD_LIBRARIES}
39   ${PLATFORM_LIBS}
40   )
41
42 # --- headers ---
43
44 SET(YACSBases_HEADERS
45   YACSBasesExport.hxx
46   Cstr2d.hxx
47   define.hxx
48   DynLibLoaderGNU.hxx
49   DynLibLoader.hxx
50   DynLibLoaderWin.hxx
51   Exception.hxx
52   Mutex.hxx
53   MutexPT.hxx
54   Semaphore.hxx
55   SemaphorePT.hxx
56   Thread.hxx
57   ThreadPT.hxx
58   AlternateThread.hxx
59   AlternateThreadPT.hxx
60   YacsTrace.hxx
61   yacsconfig.h
62   chrono.hxx
63   )
64
65 # --- sources ---
66
67 SET(YACSBases_SOURCES
68   Exception.cxx
69   Thread.cxx
70   AlternateThread.cxx
71   Mutex.cxx
72   Semaphore.cxx
73   DynLibLoader.cxx
74   Cstr2d.cxx
75   YacsTrace.cxx
76   chrono.cxx
77   )
78
79 # --- rules ---
80
81 ADD_LIBRARY(YACSBases ${YACSBases_SOURCES})
82 TARGET_LINK_LIBRARIES(YACSBases ${_link_LIBRARIES})
83 INSTALL(TARGETS YACSBases EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
84
85 INSTALL(FILES ${YACSBases_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})