]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Improve ExchangePlugin CMakeLists.txt
authorspo <sergey.pokhodenko@opencascade.com>
Tue, 24 Nov 2015 12:18:04 +0000 (15:18 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Wed, 9 Dec 2015 05:16:45 +0000 (08:16 +0300)
src/ExchangePlugin/CMakeLists.txt

index 99041c9611a484dd23b78bd1734e1fb5272b7b4a..3e66333ca2199219bbba09e227390c74c920f3b1 100644 (file)
@@ -3,41 +3,42 @@
 INCLUDE(Common)
 INCLUDE(UnitTest)
 
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Events
-                    ${PROJECT_SOURCE_DIR}/src/Config
-                    ${PROJECT_SOURCE_DIR}/src/ModelAPI
-                    ${PROJECT_SOURCE_DIR}/src/GeomAPI
-                    ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
-)
+INCLUDE_DIRECTORIES(
+  ${PROJECT_SOURCE_DIR}/src/Events
+  ${PROJECT_SOURCE_DIR}/src/Config
+  ${PROJECT_SOURCE_DIR}/src/ModelAPI
+  ${PROJECT_SOURCE_DIR}/src/GeomAPI
+  ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+  )
 
 SET(PROJECT_HEADERS
-    ExchangePlugin.h
-    ExchangePlugin_Plugin.h
-    ExchangePlugin_ImportFeature.h
-    ExchangePlugin_ExportFeature.h
-    ExchangePlugin_Validators.h
-    ExchangePlugin_Tools.h
-)
+  ExchangePlugin.h
+  ExchangePlugin_Plugin.h
+  ExchangePlugin_ImportFeature.h
+  ExchangePlugin_ExportFeature.h
+  ExchangePlugin_Validators.h
+  ExchangePlugin_Tools.h
+  )
 
 SET(PROJECT_SOURCES
-    ExchangePlugin_Plugin.cpp
-    ExchangePlugin_ImportFeature.cpp
-    ExchangePlugin_ExportFeature.cpp
-    ExchangePlugin_Validators.cpp
-    ExchangePlugin_Tools.cpp
-)
+  ExchangePlugin_Plugin.cpp
+  ExchangePlugin_ImportFeature.cpp
+  ExchangePlugin_ExportFeature.cpp
+  ExchangePlugin_Validators.cpp
+  ExchangePlugin_Tools.cpp
+  )
 
 SET(XML_RESOURCES
-    plugin-Exchange.xml
-)
+  plugin-Exchange.xml
+  )
 
 SET(PROJECT_LIBRARIES
-    Events
-    Config
-    ModelAPI
-    GeomAPI
-    GeomAlgoAPI
-)
+  Events
+  Config
+  ModelAPI
+  GeomAPI
+  GeomAlgoAPI
+  )
 
 ADD_DEFINITIONS(-DEXCHANGEPLUGIN_EXPORTS)
 ADD_LIBRARY(ExchangePlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
@@ -47,11 +48,23 @@ TARGET_LINK_LIBRARIES(ExchangePlugin ${PROJECT_LIBRARIES})
 INSTALL(TARGETS ExchangePlugin DESTINATION plugins)
 INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
 
-ADD_UNIT_TESTS(TestImport.py TestExport.py)
+ADD_UNIT_TESTS(
+  TestImport.py
+  TestExport.py
+  )
 
-CONFIGURE_FILE(Test/Data/solid.brep Data/solid.brep COPYONLY)
-CONFIGURE_FILE(Test/Data/solid.brp Data/solid.brp COPYONLY)
-CONFIGURE_FILE(Test/Data/screw.step Data/screw.step COPYONLY)
-CONFIGURE_FILE(Test/Data/screw.stp Data/screw.stp COPYONLY)
-CONFIGURE_FILE(Test/Data/bearing.iges Data/bearing.iges COPYONLY)
-CONFIGURE_FILE(Test/Data/bearing.igs Data/bearing.igs COPYONLY)
+SET(DATA_FILES
+  solid.brep
+  solid.brp
+  screw.step
+  screw.stp
+  bearing.iges
+  bearing.igs
+  )
+
+FOREACH(file ${DATA_FILES})
+  CONFIGURE_FILE(
+    ${CMAKE_CURRENT_SOURCE_DIR}/Test/Data/${file}
+    ${CMAKE_CURRENT_BINARY_DIR}/Data/${file}
+    COPYONLY)
+ENDFOREACH(file ${DATA_FIELS})