]> SALOME platform Git repositories - modules/yacs.git/blob - src/bases/CMakeLists.txt
Salome HOME
Compilation on Windows
[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 IF(WIN32)
36   ADD_DEFINITIONS(-DNOGDI)
37 ENDIF(WIN32)
38
39 # libraries to link to
40 SET(_link_LIBRARIES
41   ${PTHREAD_LIBRARIES}
42   ${PLATFORM_LIBS}
43   )
44
45 # --- headers ---
46
47 SET(YACSBases_HEADERS
48   YACSBasesExport.hxx
49   Cstr2d.hxx
50   define.hxx
51   DynLibLoaderGNU.hxx
52   DynLibLoader.hxx
53   DynLibLoaderWin.hxx
54   Exception.hxx
55   Mutex.hxx
56   MutexPT.hxx
57   Semaphore.hxx
58   SemaphorePT.hxx
59   Thread.hxx
60   ThreadPT.hxx
61   AlternateThread.hxx
62   AlternateThreadPT.hxx
63   YacsTrace.hxx
64   yacsconfig.h
65   chrono.hxx
66   )
67
68 # --- sources ---
69
70 SET(YACSBases_SOURCES
71   Exception.cxx
72   Thread.cxx
73   AlternateThread.cxx
74   Mutex.cxx
75   Semaphore.cxx
76   DynLibLoader.cxx
77   Cstr2d.cxx
78   YacsTrace.cxx
79   chrono.cxx
80   )
81
82 # --- type of library ---
83
84 SET(TYPE)
85 IF(WIN32)
86   SET(TYPE STATIC)
87 ELSE(WIN32)
88   SET(TYPE SHARED)
89 ENDIF(WIN32)
90
91 # --- rules ---
92
93 ADD_LIBRARY(YACSBases ${TYPE} ${YACSBases_SOURCES})
94 TARGET_LINK_LIBRARIES(YACSBases ${_link_LIBRARIES})
95 INSTALL(TARGETS YACSBases EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
96
97 INSTALL(FILES ${YACSBases_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})