From: asl Date: Wed, 12 Oct 2016 07:03:56 +0000 (+0300) Subject: correction of the configuration for Linux X-Git-Tag: v1.6~59 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e8acef6ae70d40f40ff538499ad29d5fa42882a2;p=modules%2Fhydro.git correction of the configuration for Linux --- diff --git a/CMake/UsePyQt4EXT.cmake b/CMake/UsePyQt4EXT.cmake index b6b0f5a5..e846b9cb 100644 --- a/CMake/UsePyQt4EXT.cmake +++ b/CMake/UsePyQt4EXT.cmake @@ -45,10 +45,10 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles) FOREACH(_input ${ARGN}) SET(_output) - + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPycmodule.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPycmodule.cc) - + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Application.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Application.cc) @@ -72,7 +72,7 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles) LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_AltitudeObject.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_AltitudeObject.cc) - + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_ObstacleAltitude.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_ObstacleAltitude.cc) @@ -126,7 +126,7 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles) LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Stream.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Stream.cc) - + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Zone.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_Zone.cc) @@ -147,7 +147,7 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles) LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_SplitShapesGroup.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_SplitShapesGroup.cc) - + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyTCollection_AsciiString.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyTCollection_AsciiString.cc) @@ -162,13 +162,13 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles) LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100Handle_HYDROData_Entity.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100Handle_HYDROData_Entity.cc) - + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XY.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XY.cc) LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XYZ.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100gp_XYZ.cc) - + LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_IPolylineSectionType.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyNCollection_Sequence0100HYDROData_IPolylineSectionType.cc) @@ -180,13 +180,13 @@ MACRO(PYQT4_WRAP_SIP_EXT outfiles) LIST(APPEND _output ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_LandCoverMap.cc) SET(${outfiles} ${${outfiles}} ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_LandCoverMap.cc) - + ADD_CUSTOM_COMMAND( OUTPUT ${_output} COMMAND ${SIP_EXECUTABLE} ${PYQT_SIPFLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/${_input} MAIN_DEPENDENCY ${_input} ) - + ENDFOREACH() ENDMACRO(PYQT4_WRAP_SIP_EXT) diff --git a/src/HYDROPy/CMakeLists.txt b/src/HYDROPy/CMakeLists.txt index 18ceff0c..dd0c4db2 100644 --- a/src/HYDROPy/CMakeLists.txt +++ b/src/HYDROPy/CMakeLists.txt @@ -1,8 +1,4 @@ include(../../CMake/Common.cmake) -include(../../CMake/UsePyQt4EXT.cmake) -#include(UsePyQt4) - -# --- options --- # additional include directories INCLUDE_DIRECTORIES( @@ -31,11 +27,11 @@ SET(_link_LIBRARIES # --- resources --- # sip files / to be processed by sip -SET(_sip_files +SET(_sip_input_file HYDROData.sip ) -SET(_add_SOURCES +SET(_sip_output_files ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPycmodule.cc ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPygp_XY.cc ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPygp_XYZ.cc @@ -88,23 +84,13 @@ SET(_add_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/sipHYDROPyHYDROData_BathymetryAltitudePoint.cc ) -foreach( add_file ${_add_SOURCES}) - if(NOT EXISTS ${add_file}) - file(WRITE ${add_file} "") - endif() -endforeach() - -# --- sources --- - -# sources / sip wrappings -PYQT4_WRAP_SIP_EXT( _sip_SOURCES ${_sip_files} ) # SOURCES ${_add_SOURCES}) - -# sources / to compile -SET(HYDROPy_SOURCES ${_sip_SOURCES} ${_add_SOURCES}) - -# --- rules --- +ADD_CUSTOM_COMMAND( + OUTPUT ${_sip_output_files} + COMMAND ${SIP_EXECUTABLE} ${PYQT_SIPFLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/${_sip_input_file} + MAIN_DEPENDENCY ${_sip_input_file} +) -ADD_LIBRARY(HYDROPy ${HYDROPy_SOURCES}) +ADD_LIBRARY(HYDROPy ${_sip_output_files} ) TARGET_LINK_LIBRARIES(HYDROPy ${_link_LIBRARIES}) INSTALL(TARGETS HYDROPy EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/HYDRO_tests/reference_data/CMakeLists.txt b/src/HYDRO_tests/reference_data/CMakeLists.txt index 5194e06e..b475d963 100644 --- a/src/HYDRO_tests/reference_data/CMakeLists.txt +++ b/src/HYDRO_tests/reference_data/CMakeLists.txt @@ -117,5 +117,5 @@ SET(REFERENCE_DATA # Application tests -SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test) +SET(TEST_INSTALL_DIRECTORY $ENV{HYDRO_ROOT_DIR}/bin/salome/test) INSTALL(FILES ${REFERENCE_DATA} DESTINATION ${TEST_INSTALL_DIRECTORY})