Salome HOME
Issue 0022816: duplicated files
[modules/yacs.git] / src / bases / CMakeLists.txt
index 51e0f84806eb8508a506c10df8a17266a4762fea..3438cb501e793441fe1dd84666e2b3dcb16a7a32 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2014  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,7 @@
 #
 
 IF(SALOME_BUILD_TESTS)
-  ADD_SUBDIRECTORY( Test )
+  ADD_SUBDIRECTORY(Test)
 ENDIF(SALOME_BUILD_TESTS)
 
 # --- options ---
@@ -28,11 +28,6 @@ INCLUDE_DIRECTORIES(
   ${PTHREAD_INCLUDE_DIR}
   )
 
-# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
-  "-DYACS_PTHREAD"
-  )
-
 # libraries to link to
 SET(_link_LIBRARIES
   ${PTHREAD_LIBRARIES}
@@ -49,6 +44,8 @@ SET(YACSBases_HEADERS
   DynLibLoader.hxx
   DynLibLoaderWin.hxx
   Exception.hxx
+  AutoRefCnt.hxx
+  AutoLocker.hxx
   Mutex.hxx
   MutexPT.hxx
   Semaphore.hxx
@@ -59,7 +56,6 @@ SET(YACSBases_HEADERS
   AlternateThreadPT.hxx
   YacsTrace.hxx
   yacsconfig.h
-  chrono.hxx
   )
 
 # --- sources ---
@@ -76,9 +72,18 @@ SET(YACSBases_SOURCES
   chrono.cxx
   )
 
+# --- type of library ---
+
+SET(TYPE)
+IF(WIN32)
+  SET(TYPE STATIC)
+ELSE(WIN32)
+  SET(TYPE SHARED)
+ENDIF(WIN32)
+
 # --- rules ---
 
-ADD_LIBRARY(YACSBases ${YACSBases_SOURCES})
+ADD_LIBRARY(YACSBases ${TYPE} ${YACSBases_SOURCES})
 TARGET_LINK_LIBRARIES(YACSBases ${_link_LIBRARIES})
 INSTALL(TARGETS YACSBases EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})