# rev: v6.2.0 # Use the sha / tag you want to point at
# hooks:
# - id: rstcheck
+ - repo: https://github.com/cheshirekow/cmake-format-precommit
+ rev: v0.6.10
+ hooks:
+ - id: cmake-format
+ # - id: cmake-lint
-# Copyright (c) 2012 - 2013, Lars Bilke
-# All rights reserved.
+# Copyright (c) 2012 - 2013, Lars Bilke All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without modification,
-# are permitted provided that the following conditions are met:
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright notice,
-# this list of conditions and the following disclaimer in the documentation
-# and/or other materials provided with the distribution.
-#
-# 3. Neither the name of the copyright holder nor the names of its contributors
-# may be used to endorse or promote products derived from this software without
-# specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# list of conditions and the following disclaimer.
+#
+# 1. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# 1. Neither the name of the copyright holder nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# CHANGES:
#
-# 2012-01-31, Lars Bilke
-# - Enable Code Coverage
+# 2012-01-31, Lars Bilke - Enable Code Coverage
#
-# 2013-09-17, Joakim Söderberg
-# - Added support for Clang.
-# - Some additional usage instructions.
+# 2013-09-17, Joakim Söderberg - Added support for Clang. - Some additional
+# usage instructions.
#
# USAGE:
-# 0. (Mac only) If you use Xcode 5.1 make sure to patch geninfo as described here:
-# http://stackoverflow.com/a/22404544/80480
+# 1. (Mac only) If you use Xcode 5.1 make sure to patch geninfo as described
+# here: http://stackoverflow.com/a/22404544/80480
#
# 1. Copy this file into your cmake modules path.
#
-# 2. Add the following line to your CMakeLists.txt:
-# INCLUDE(CodeCoverage)
-#
-# 3. Set compiler flags to turn off optimization and enable coverage:
-# SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-# SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
+# 1. Add the following line to your CMakeLists.txt: INCLUDE(CodeCoverage)
#
-# 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
-# which runs your test executable and produces a lcov code coverage report:
-# Example:
-# SETUP_TARGET_FOR_COVERAGE(
-# my_coverage_target # Name for custom target.
-# test_driver # Name of the test driver executable that runs the tests.
-# # NOTE! This should always have a ZERO as exit code
-# # otherwise the coverage generation will not complete.
-# coverage # Name of output directory.
-# )
+# 1. Set compiler flags to turn off optimization and enable coverage:
+# SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
+# SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
#
-# 4. Build a Debug build:
-# cmake -DCMAKE_BUILD_TYPE=Debug ..
-# make
-# make my_coverage_target
+# 1. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target
+# which runs your test executable and produces a lcov code coverage report:
+# Example: SETUP_TARGET_FOR_COVERAGE( my_coverage_target # Name for custom
+# target. test_driver # Name of the test driver executable that runs
+# the tests. # NOTE! This should always have a ZERO as exit code # otherwise
+# the coverage generation will not complete. coverage # Name of
+# output directory. )
#
+# 1. Build a Debug build: cmake -DCMAKE_BUILD_TYPE=Debug .. make make
+# my_coverage_target
#
# Check prereqs
-FIND_PROGRAM( GCOV_PATH gcov )
-FIND_PROGRAM( LCOV_PATH lcov )
-FIND_PROGRAM( GENHTML_PATH genhtml )
-FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
-
-IF(NOT GCOV_PATH)
- MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
-ENDIF() # NOT GCOV_PATH
-
-IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- # Clang version 3.0.0 and greater now supports gcov as well.
- MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")
-
- IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
- ENDIF()
-ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX
-
-SET(CMAKE_CXX_FLAGS_COVERAGE
+find_program(GCOV_PATH gcov)
+find_program(LCOV_PATH lcov)
+find_program(GENHTML_PATH genhtml)
+find_program(GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
+
+if(NOT GCOV_PATH)
+ message(FATAL_ERROR "gcov not found! Aborting...")
+endif() # NOT GCOV_PATH
+
+if(NOT CMAKE_COMPILER_IS_GNUCXX)
+ # Clang version 3.0.0 and greater now supports gcov as well.
+ message(
+ WARNING
+ "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't."
+ )
+
+ if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
+ endif()
+endif() # NOT CMAKE_COMPILER_IS_GNUCXX
+
+set(CMAKE_CXX_FLAGS_COVERAGE
"-g -O0 --coverage -fprofile-arcs -ftest-coverage"
- CACHE STRING "Flags used by the C++ compiler during coverage builds."
- FORCE )
-SET(CMAKE_C_FLAGS_COVERAGE
+ CACHE STRING "Flags used by the C++ compiler during coverage builds." FORCE)
+set(CMAKE_C_FLAGS_COVERAGE
"-g -O0 --coverage -fprofile-arcs -ftest-coverage"
- CACHE STRING "Flags used by the C compiler during coverage builds."
- FORCE )
-SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
+ CACHE STRING "Flags used by the C compiler during coverage builds." FORCE)
+set(CMAKE_EXE_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used for linking binaries during coverage builds."
- FORCE )
-SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
+ FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
""
- CACHE STRING "Flags used by the shared libraries linker during coverage builds."
- FORCE )
-MARK_AS_ADVANCED(
- CMAKE_CXX_FLAGS_COVERAGE
- CMAKE_C_FLAGS_COVERAGE
- CMAKE_EXE_LINKER_FLAGS_COVERAGE
- CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
-
-IF ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Coverage"))
- MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
-ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
-
-
-# Param _targetname The name of new the custom make target
-# Param _testrunner The name of the target which runs the tests.
-# MUST return ZERO always, even on errors.
-# If not, no coverage report will be created!
-# Param _outputname lcov output is generated as _outputname.info
-# HTML report is generated in _outputname/index.html
-# Optional fourth parameter is passed as arguments to _testrunner
-# Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
-
- IF(NOT LCOV_PATH)
- MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
- ENDIF() # NOT LCOV_PATH
-
- IF(NOT GENHTML_PATH)
- MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
- ENDIF() # NOT GENHTML_PATH
-
- # Setup target
- ADD_CUSTOM_TARGET(${_targetname}
-
- # Cleanup lcov
- ${LCOV_PATH} --directory . --zerocounters
-
- # Run tests
- COMMAND ${_testrunner} ${ARGV3}
-
- # Capturing lcov counters and generating report
- COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
- COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
- COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
- COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
-
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
- )
-
- # Show info where to find the report
- ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
- COMMAND ;
- COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
- )
-
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
-
-# Param _targetname The name of new the custom make target
-# Param _testrunner The name of the target which runs the tests
-# Param _outputname cobertura output is generated as _outputname.xml
-# Optional fourth parameter is passed as arguments to _testrunner
-# Pass them in list form, e.g.: "-j;2" for -j 2
-FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
-
- IF(NOT PYTHON_EXECUTABLE)
- MESSAGE(FATAL_ERROR "Python not found! Aborting...")
- ENDIF() # NOT PYTHON_EXECUTABLE
-
- IF(NOT GCOVR_PATH)
- MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
- ENDIF() # NOT GCOVR_PATH
-
- ADD_CUSTOM_TARGET(${_targetname}
-
- # Run tests
- ${_testrunner} ${ARGV3}
-
- # Running gcovr
- COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- COMMENT "Running gcovr to produce Cobertura code coverage report."
- )
-
- # Show info where to find the report
- ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
- COMMAND ;
- COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
- )
-
-ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
+ CACHE STRING
+ "Flags used by the shared libraries linker during coverage builds."
+ FORCE)
+mark_as_advanced(
+ CMAKE_CXX_FLAGS_COVERAGE CMAKE_C_FLAGS_COVERAGE
+ CMAKE_EXE_LINKER_FLAGS_COVERAGE CMAKE_SHARED_LINKER_FLAGS_COVERAGE)
+
+if(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL
+ "Coverage"))
+ message(
+ WARNING
+ "Code coverage results with an optimized (non-Debug) build may be misleading"
+ )
+endif() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
+
+# Param _targetname The name of new the custom make target Param _testrunner
+# The name of the target which runs the tests. MUST return ZERO always, even on
+# errors. If not, no coverage report will be created! Param _outputname lcov
+# output is generated as _outputname.info HTML report is generated in
+# _outputname/index.html Optional fourth parameter is passed as arguments to
+# _testrunner Pass them in list form, e.g.: "-j;2" for -j 2
+function(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
+
+ if(NOT LCOV_PATH)
+ message(FATAL_ERROR "lcov not found! Aborting...")
+ endif() # NOT LCOV_PATH
+
+ if(NOT GENHTML_PATH)
+ message(FATAL_ERROR "genhtml not found! Aborting...")
+ endif() # NOT GENHTML_PATH
+
+ # Setup target
+ add_custom_target(
+ ${_targetname}
+ # Cleanup lcov
+ ${LCOV_PATH} --directory . --zerocounters
+ # Run tests
+ COMMAND ${_testrunner} ${ARGV3}
+ # Capturing lcov counters and generating report
+ COMMAND ${LCOV_PATH} --directory . --capture --output-file
+ ${_outputname}.info
+ COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*'
+ --output-file ${_outputname}.info.cleaned
+ COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
+ COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info
+ ${_outputname}.info.cleaned
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ COMMENT
+ "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
+ )
+
+ # Show info where to find the report
+ add_custom_command(
+ TARGET ${_targetname}
+ POST_BUILD
+ COMMAND ;
+ COMMENT
+ "Open ./${_outputname}/index.html in your browser to view the coverage report."
+ )
+
+endfunction() # SETUP_TARGET_FOR_COVERAGE
+
+# Param _targetname The name of new the custom make target Param _testrunner
+# The name of the target which runs the tests Param _outputname cobertura
+# output is generated as _outputname.xml Optional fourth parameter is passed as
+# arguments to _testrunner Pass them in list form, e.g.: "-j;2" for -j 2
+function(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner
+ _outputname)
+
+ if(NOT PYTHON_EXECUTABLE)
+ message(FATAL_ERROR "Python not found! Aborting...")
+ endif() # NOT PYTHON_EXECUTABLE
+
+ if(NOT GCOVR_PATH)
+ message(FATAL_ERROR "gcovr not found! Aborting...")
+ endif() # NOT GCOVR_PATH
+
+ add_custom_target(
+ ${_targetname}
+ # Run tests
+ ${_testrunner} ${ARGV3}
+ # Running gcovr
+ COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e
+ '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ COMMENT "Running gcovr to produce Cobertura code coverage report.")
+
+ # Show info where to find the report
+ add_custom_command(
+ TARGET ${_targetname}
+ POST_BUILD
+ COMMAND ;
+ COMMENT "Cobertura code coverage report saved in ${_outputname}.xml.")
+
+endfunction() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required(VERSION 2.6)
cmake_policy(SET CMP0011 NEW)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-IF(WIN32)
- ## Specific definitions: EHsc to avoid exceptions-linkage unresolved symbols
- ADD_DEFINITIONS(-DWIN32 -D_WINDOWS /EHsc)
-ENDIF(WIN32)
+if(WIN32)
+ # Specific definitions: EHsc to avoid exceptions-linkage unresolved symbols
+ add_definitions(-DWIN32 -D_WINDOWS /EHsc)
+endif(WIN32)
-IF(UNIX)
- IF(CMAKE_COMPILER_IS_GNUCC)
- #C++11 is not supported on some platforms, disable it
- #MESSAGE(STATUS "Setting -std=c++0x flag for the gcc...")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+if(UNIX)
+ if(CMAKE_COMPILER_IS_GNUCC)
+ # C++11 is not supported on some platforms, disable it MESSAGE(STATUS
+ # "Setting -std=c++0x flag for the gcc...")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- #Supporting test coverage checks (gcov) in the DEBUG mode
- IF(USE_TEST_COVERAGE)
- INCLUDE(CodeCoverage)
- MESSAGE(STATUS "Setting flags for gcov support the gcc...")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
- SET(CMAKE_SHARED_LINKER_FLAGS "-lgcov")
+ # Supporting test coverage checks (gcov) in the DEBUG mode
+ if(USE_TEST_COVERAGE)
+ include(CodeCoverage)
+ message(STATUS "Setting flags for gcov support the gcc...")
+ set(CMAKE_CXX_FLAGS
+ "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
+ set(CMAKE_C_FLAGS
+ "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
+ set(CMAKE_SHARED_LINKER_FLAGS "-lgcov")
- SETUP_TARGET_FOR_COVERAGE(test_coverage # Name for custom target.
- ctest # Name of the test driver executable that runs the tests.
- coverage) # Name of output directory.
+ setup_target_for_coverage(
+ test_coverage # Name for custom target.
+ ctest # Name of the test driver executable that runs the tests.
+ coverage) # Name of output directory.
- SET(USE_TEST_COVERAGE False)
- ENDIF(USE_TEST_COVERAGE)
+ set(USE_TEST_COVERAGE False)
+ endif(USE_TEST_COVERAGE)
- #SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -E")
- #MESSAGE(STATUS "gcc flags are: " ${CMAKE_CXX_FLAGS})
- #MESSAGE(STATUS "linker flags are: " ${CMAKE_SHARED_LINKER_FLAGS})
- ENDIF(CMAKE_COMPILER_IS_GNUCC)
-ENDIF(UNIX)
+ # SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -E")
+ # MESSAGE(STATUS "gcc flags are: " ${CMAKE_CXX_FLAGS}) MESSAGE(STATUS
+ # "linker flags are: " ${CMAKE_SHARED_LINKER_FLAGS})
+ endif(CMAKE_COMPILER_IS_GNUCC)
+endif(UNIX)
# Set highest warnings level
-IF(MSVC)
- IF(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+if(MSVC)
+ if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
-ELSE()
+else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
-ENDIF()
+endif()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-IF (CMAKE_GENERATOR MATCHES "NMake Makefiles")
- IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
- ADD_DEFINITIONS(-D_DEBUG)
- ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
- IF(WIN32)
- FIND_PATH(VC_INCLUDE_PATH stdio.h)
- INCLUDE_DIRECTORIES(${VC_INCLUDE_PATH})
- ENDIF(WIN32)
-ENDIF (CMAKE_GENERATOR MATCHES "NMake Makefiles")
+if(CMAKE_GENERATOR MATCHES "NMake Makefiles")
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ add_definitions(-D_DEBUG)
+ endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ if(WIN32)
+ find_path(VC_INCLUDE_PATH stdio.h)
+ include_directories(${VC_INCLUDE_PATH})
+ endif(WIN32)
+endif(CMAKE_GENERATOR MATCHES "NMake Makefiles")
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-# - Try to find PlaneGCS (sketcher part of FreeCAD)
-# Once done this will define
+# * Try to find PlaneGCS (sketcher part of FreeCAD) Once done this will define
#
-# PLANEGCS_FOUND - system has PlaneGCS
-# PLANEGCS_INCLUDE_DIRS - the Plaine include directory
-# PLANEGCS_LIBRARIES - Link these to use PlaneGCS
+# PLANEGCS_FOUND - system has PlaneGCS PLANEGCS_INCLUDE_DIRS - the Plaine
+# include directory PLANEGCS_LIBRARIES - Link these to use PlaneGCS
-IF(NOT PLANEGCS_FIND_QUIETLY)
- MESSAGE(STATUS "Try to find PlainGCS at $ENV{PLANEGCS_ROOT_DIR}...")
-ENDIF()
+if(NOT PLANEGCS_FIND_QUIETLY)
+ message(STATUS "Try to find PlainGCS at $ENV{PLANEGCS_ROOT_DIR}...")
+endif()
-FIND_PATH(PLANEGCS_INCLUDE_DIR NAMES GCS.h
+find_path(
+ PLANEGCS_INCLUDE_DIR
+ NAMES GCS.h
HINTS ENV PLANEGCS_ROOT_DIR
- PATH_SUFFIXES include
-)
+ PATH_SUFFIXES include)
-FIND_PATH(PLANEGCS_CMAKE_DIR NAMES FindEigen3.cmake
+find_path(
+ PLANEGCS_CMAKE_DIR
+ NAMES FindEigen3.cmake
HINTS ENV PLANEGCS_ROOT_DIR
- PATH_SUFFIXES cmake
-)
+ PATH_SUFFIXES cmake)
-FIND_LIBRARY(PLANEGCS_LIBRARY NAMES PlaneGCS
+find_library(
+ PLANEGCS_LIBRARY
+ NAMES PlaneGCS
HINTS ENV PLANEGCS_ROOT_DIR
- PATH_SUFFIXES lib
-)
+ PATH_SUFFIXES lib)
# verify Eigen and Boost libraries are found
-FILE(TO_CMAKE_PATH "$ENV{EIGEN_ROOT_DIR}/include/eigen3" EIGEN3_INCLUDE_DIR)
-FILE(TO_CMAKE_PATH "$ENV{BOOST_ROOT_DIR}" BOOST_ROOT)
-SET(CMAKE_MODULE_PATH "${PLANEGCS_CMAKE_DIR}" ${CMAKE_MODULE_PATH})
-FIND_PACKAGE(Eigen3 3.2.5 REQUIRED)
-FIND_PACKAGE(Boost COMPONENTS graph REQUIRED)
+file(TO_CMAKE_PATH "$ENV{EIGEN_ROOT_DIR}/include/eigen3" EIGEN3_INCLUDE_DIR)
+file(TO_CMAKE_PATH "$ENV{BOOST_ROOT_DIR}" BOOST_ROOT)
+set(CMAKE_MODULE_PATH "${PLANEGCS_CMAKE_DIR}" ${CMAKE_MODULE_PATH})
+find_package(Eigen3 3.2.5 REQUIRED)
+find_package(Boost COMPONENTS graph REQUIRED)
-IF(Boost_FOUND AND EIGEN3_FOUND)
- SET(PLANEGCS_INCLUDE_DIRS ${PLANEGCS_INCLUDE_DIR})
- SET(PLANEGCS_LIBRARIES ${PLANEGCS_LIBRARY})
-ENDIF()
+if(Boost_FOUND AND EIGEN3_FOUND)
+ set(PLANEGCS_INCLUDE_DIRS ${PLANEGCS_INCLUDE_DIR})
+ set(PLANEGCS_LIBRARIES ${PLANEGCS_LIBRARY})
+endif()
-# handle the QUIETLY and REQUIRED arguments and set PLANEGCS_FOUND to TRUE
-# if all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(PlaneGCS
- REQUIRED_VARS PLANEGCS_LIBRARY PLANEGCS_INCLUDE_DIR)
+# handle the QUIETLY and REQUIRED arguments and set PLANEGCS_FOUND to TRUE if
+# all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PlaneGCS REQUIRED_VARS PLANEGCS_LIBRARY
+ PLANEGCS_INCLUDE_DIR)
-MARK_AS_ADVANCED(PLANEGCS_LIBRARY PLANEGCS_INCLUDE_DIR)
+mark_as_advanced(PLANEGCS_LIBRARY PLANEGCS_INCLUDE_DIR)
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-UNSET(PYTHON_INCLUDE_DIRS)
-UNSET(PYTHON_LIBRARIES)
+unset(PYTHON_INCLUDE_DIRS)
+unset(PYTHON_LIBRARIES)
-IF(WIN32)
- IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
- SET(PYTHON_LIBRARY_FILE "python36_d.lib")
- ElSE()
- SET(PYTHON_LIBRARY_FILE "python36.lib")
- ENDIF()
-ElSE()
- SET(PYTHON_LIBRARY_FILE "libpython3.6.so")
-ENDIF()
+if(WIN32)
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(PYTHON_LIBRARY_FILE "python36_d.lib")
+ else()
+ set(PYTHON_LIBRARY_FILE "python36.lib")
+ endif()
+else()
+ set(PYTHON_LIBRARY_FILE "libpython3.6.so")
+endif()
-IF(DEFINED ENV{PYTHONHOME})
- IF(WIN32)
- FILE(TO_CMAKE_PATH "$ENV{PYTHONHOME}/libs/${PYTHON_LIBRARY_FILE}" PATH_PYTHON_LIBRARY)
- ElSE()
- FILE(TO_CMAKE_PATH "$ENV{PYTHONHOME}/lib/${PYTHON_LIBRARY_FILE}" PATH_PYTHON_LIBRARY)
- ENDIF()
- SET(PYTHON_LIBRARY ${PATH_PYTHON_LIBRARY} CACHE FILEPATH "path to the python library" FORCE)
-ENDIF()
+if(DEFINED ENV{PYTHONHOME})
+ if(WIN32)
+ file(TO_CMAKE_PATH "$ENV{PYTHONHOME}/libs/${PYTHON_LIBRARY_FILE}"
+ PATH_PYTHON_LIBRARY)
+ else()
+ file(TO_CMAKE_PATH "$ENV{PYTHONHOME}/lib/${PYTHON_LIBRARY_FILE}"
+ PATH_PYTHON_LIBRARY)
+ endif()
+ set(PYTHON_LIBRARY
+ ${PATH_PYTHON_LIBRARY}
+ CACHE FILEPATH "path to the python library" FORCE)
+endif()
-IF(DEFINED ENV{PYTHON_INCLUDE})
- FILE(TO_CMAKE_PATH $ENV{PYTHON_INCLUDE} PATH_PYTHON_INCLUDE_DIR)
- SET(PYTHON_INCLUDE_DIR ${PATH_PYTHON_INCLUDE_DIR} CACHE PATH "path to where Python.h is found" FORCE)
-ELSE()
- IF(WIN32)
- IF(DEFINED ENV{PYTHON_ROOT_DIR})
- SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
- SET(PYTHON_INCLUDE_DIR ${PYTHON_ROOT_DIR} CACHE PATH "path to where Python.h is found" FORCE)
- ENDIF()
- ENDIF()
-ENDIF()
+if(DEFINED ENV{PYTHON_INCLUDE})
+ file(TO_CMAKE_PATH $ENV{PYTHON_INCLUDE} PATH_PYTHON_INCLUDE_DIR)
+ set(PYTHON_INCLUDE_DIR
+ ${PATH_PYTHON_INCLUDE_DIR}
+ CACHE PATH "path to where Python.h is found" FORCE)
+else()
+ if(WIN32)
+ if(DEFINED ENV{PYTHON_ROOT_DIR})
+ set(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
+ set(PYTHON_INCLUDE_DIR
+ ${PYTHON_ROOT_DIR}
+ CACHE PATH "path to where Python.h is found" FORCE)
+ endif()
+ endif()
+endif()
-FIND_PACKAGE(PythonInterp REQUIRED)
-FIND_PACKAGE(PythonLibs REQUIRED)
+find_package(PythonInterp REQUIRED)
+find_package(PythonLibs REQUIRED)
-INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR})
+include_directories(${PYTHON_INCLUDE_DIR})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-IF(HAVE_SALOME)
- SET(SUIT_INCLUDE "${GUI_ROOT_DIR}/include/salome")
- SET(SUIT_LIB_DIR "${GUI_ROOT_DIR}/lib/salome")
-ELSE(HAVE_SALOME)
- SET(SUIT_DIR $ENV{SUIT_DIR})
- IF(EXISTS ${SUIT_DIR})
- MESSAGE(STATUS "SUIT found at ${SUIT_DIR}")
- IF(WIN32)
- SET(SUIT_LIB_DIR ${SUIT_DIR}/lib)
- ElSE()
- SET(SUIT_LIB_DIR ${SUIT_DIR}/lib/salome)
- ENDIF()
+if(HAVE_SALOME)
+ set(SUIT_INCLUDE "${GUI_ROOT_DIR}/include/salome")
+ set(SUIT_LIB_DIR "${GUI_ROOT_DIR}/lib/salome")
+else(HAVE_SALOME)
+ set(SUIT_DIR $ENV{SUIT_DIR})
+ if(EXISTS ${SUIT_DIR})
+ message(STATUS "SUIT found at ${SUIT_DIR}")
+ if(WIN32)
+ set(SUIT_LIB_DIR ${SUIT_DIR}/lib)
+ else()
+ set(SUIT_LIB_DIR ${SUIT_DIR}/lib/salome)
+ endif()
- FIND_LIBRARY(Event Event ${SUIT_LIB_DIR})
- FIND_LIBRARY(PyConsole PyConsole ${SUIT_LIB_DIR})
- FIND_LIBRARY(PyInterp PyInterp ${SUIT_LIB_DIR})
- FIND_LIBRARY(qtx qtx ${SUIT_LIB_DIR})
- FIND_LIBRARY(suit suit ${SUIT_LIB_DIR})
- FIND_LIBRARY(ViewerData ViewerData ${SUIT_LIB_DIR})
+ find_library(Event Event ${SUIT_LIB_DIR})
+ find_library(PyConsole PyConsole ${SUIT_LIB_DIR})
+ find_library(PyInterp PyInterp ${SUIT_LIB_DIR})
+ find_library(qtx qtx ${SUIT_LIB_DIR})
+ find_library(suit suit ${SUIT_LIB_DIR})
+ find_library(ViewerData ViewerData ${SUIT_LIB_DIR})
- IF(WIN32)
- SET(SUIT_INCLUDE ${SUIT_DIR}/include)
- ElSE()
- SET(SUIT_INCLUDE ${SUIT_DIR}/include/salome)
- ENDIF()
- ENDIF(EXISTS ${SUIT_DIR})
-ENDIF(HAVE_SALOME)
+ if(WIN32)
+ set(SUIT_INCLUDE ${SUIT_DIR}/include)
+ else()
+ set(SUIT_INCLUDE ${SUIT_DIR}/include/salome)
+ endif()
+ endif(EXISTS ${SUIT_DIR})
+endif(HAVE_SALOME)
-FILE(TO_CMAKE_PATH ${SUIT_LIB_DIR} SUIT_LIB_DIR)
-FILE(TO_CMAKE_PATH ${SUIT_INCLUDE} SUIT_INCLUDE)
-MESSAGE(STATUS "SUIT includes: ${SUIT_INCLUDE}")
-MESSAGE(STATUS "SUIT libraries: ${SUIT_LIB_DIR}")
+file(TO_CMAKE_PATH ${SUIT_LIB_DIR} SUIT_LIB_DIR)
+file(TO_CMAKE_PATH ${SUIT_INCLUDE} SUIT_INCLUDE)
+message(STATUS "SUIT includes: ${SUIT_INCLUDE}")
+message(STATUS "SUIT libraries: ${SUIT_LIB_DIR}")
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-IF(${HAVE_SALOME})
- FIND_LIBRARY(caf caf ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(CAM CAM ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(CASCatch CASCatch ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(DDS DDS ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(Event Event ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(GLViewer GLViewer ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(LightApp LightApp ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(LogWindow LogWindow ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(ObjBrowser ObjBrowser ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(OCCViewer OCCViewer ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(OpenGLUtils OpenGLUtils ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(Plot2d Plot2d ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(PyConsole PyConsole ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(PyInterp PyInterp ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(QDS QDS ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(qtx qtx ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(QxScene QxScene ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomeApp SalomeApp ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomeIDLGUI SalomeIDLGUI ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomeObject SalomeObject ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomePrs SalomePrs ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomePyQtGUILight SalomePyQtGUILight ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomePyQtGUI SalomePyQtGUI ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomePyQt SalomePyQt ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomePy SalomePy ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomeSession SalomeSession ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomeStyle SalomeStyle ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SOCC SOCC ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SPlot2d SPlot2d ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(std std ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SUITApp SUITApp ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(suit suit ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SVTK SVTK ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(ToolsGUI ToolsGUI ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(ViewerTools ViewerTools ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(ViewerData ViewerData ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(VTKViewer VTKViewer ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(vtkEDFOverloads vtkEDFOverloads ${GUI_ROOT_DIR}/lib/paraview)
- FIND_LIBRARY(vtkTools vtkTools ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomeGuiHelpers SalomeGuiHelpers ${GUI_ROOT_DIR}/lib/salome)
- FIND_LIBRARY(SalomeTreeData SalomeTreeData ${GUI_ROOT_DIR}/lib/salome)
-ENDIF()
+if(${HAVE_SALOME})
+ find_library(caf caf ${GUI_ROOT_DIR}/lib/salome)
+ find_library(CAM CAM ${GUI_ROOT_DIR}/lib/salome)
+ find_library(CASCatch CASCatch ${GUI_ROOT_DIR}/lib/salome)
+ find_library(DDS DDS ${GUI_ROOT_DIR}/lib/salome)
+ find_library(Event Event ${GUI_ROOT_DIR}/lib/salome)
+ find_library(GLViewer GLViewer ${GUI_ROOT_DIR}/lib/salome)
+ find_library(LightApp LightApp ${GUI_ROOT_DIR}/lib/salome)
+ find_library(LogWindow LogWindow ${GUI_ROOT_DIR}/lib/salome)
+ find_library(ObjBrowser ObjBrowser ${GUI_ROOT_DIR}/lib/salome)
+ find_library(OCCViewer OCCViewer ${GUI_ROOT_DIR}/lib/salome)
+ find_library(OpenGLUtils OpenGLUtils ${GUI_ROOT_DIR}/lib/salome)
+ find_library(Plot2d Plot2d ${GUI_ROOT_DIR}/lib/salome)
+ find_library(PyConsole PyConsole ${GUI_ROOT_DIR}/lib/salome)
+ find_library(PyInterp PyInterp ${GUI_ROOT_DIR}/lib/salome)
+ find_library(QDS QDS ${GUI_ROOT_DIR}/lib/salome)
+ find_library(qtx qtx ${GUI_ROOT_DIR}/lib/salome)
+ find_library(QxScene QxScene ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomeApp SalomeApp ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomeIDLGUI SalomeIDLGUI ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomeObject SalomeObject ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomePrs SalomePrs ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomePyQtGUILight SalomePyQtGUILight ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomePyQtGUI SalomePyQtGUI ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomePyQt SalomePyQt ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomePy SalomePy ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomeSession SalomeSession ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomeStyle SalomeStyle ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SOCC SOCC ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SPlot2d SPlot2d ${GUI_ROOT_DIR}/lib/salome)
+ find_library(std std ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SUITApp SUITApp ${GUI_ROOT_DIR}/lib/salome)
+ find_library(suit suit ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SVTK SVTK ${GUI_ROOT_DIR}/lib/salome)
+ find_library(ToolsGUI ToolsGUI ${GUI_ROOT_DIR}/lib/salome)
+ find_library(ViewerTools ViewerTools ${GUI_ROOT_DIR}/lib/salome)
+ find_library(ViewerData ViewerData ${GUI_ROOT_DIR}/lib/salome)
+ find_library(VTKViewer VTKViewer ${GUI_ROOT_DIR}/lib/salome)
+ find_library(vtkEDFOverloads vtkEDFOverloads ${GUI_ROOT_DIR}/lib/paraview)
+ find_library(vtkTools vtkTools ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomeGuiHelpers SalomeGuiHelpers ${GUI_ROOT_DIR}/lib/salome)
+ find_library(SalomeTreeData SalomeTreeData ${GUI_ROOT_DIR}/lib/salome)
+endif()
# Copyright (C) 2013-2023 CEA, EDF, OPEN CASCADE
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
# Author: Roman NIKOLAEV
#
# OpenCascade detection for Salome
#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
+# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
# TODO: RNV: Check different OCCT layouts !!!
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OpenCASCADE OpenCASCADE_INCLUDE_DIR 2)
+salome_find_package_and_detect_conflicts(OpenCASCADE OpenCASCADE_INCLUDE_DIR 2)
-IF(OpenCASCADE_FOUND)
+if(OpenCASCADE_FOUND)
- IF(NOT CAS_FIND_QUIETLY)
- MESSAGE(STATUS "Found OpenCascade version: ${OpenCASCADE_VERSION}")
- ENDIF()
+ if(NOT CAS_FIND_QUIETLY)
+ message(STATUS "Found OpenCascade version: ${OpenCASCADE_VERSION}")
+ endif()
# OPENCASCADE definitions
- SET(OpenCascade_DEFINITIONS ${OpenCASCADE_C_FLAGS} ${OpenCASCADE_CXX_FLAGS})
- SET(OpenCascade_LDFLAGS ${OpenCASCADE_LINKER_FLAGS})
+ set(OpenCascade_DEFINITIONS ${OpenCASCADE_C_FLAGS} ${OpenCASCADE_CXX_FLAGS})
+ set(OpenCascade_LDFLAGS ${OpenCASCADE_LINKER_FLAGS})
- SALOME_ACCUMULATE_HEADERS(OpenCASCADE_INCLUDE_DIR)
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${OpenCASCADE_LIBRARY_DIR})
+ salome_accumulate_headers(OpenCASCADE_INCLUDE_DIR)
+ salome_accumulate_environment(LD_LIBRARY_PATH ${OpenCASCADE_LIBRARY_DIR})
-ELSE()
+else()
# TODO: Detect OpenCASCADE if it is distributed without CMake configuration.
- IF(NOT CAS_FIND_QUIETLY)
- MESSAGE(STATUS "Could not find OpenCASCADE ...")
- ENDIF()
-ENDIF()
+ if(NOT CAS_FIND_QUIETLY)
+ message(STATUS "Could not find OpenCASCADE ...")
+ endif()
+endif()
# Copyright (C) 2013-2023 CEA, EDF, OPEN CASCADE
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
# Author: Adrien Bruneton
#
# Qt5 detection for Salome
#
-# !! Please read the generic detection procedure in SalomeMacros.cmake !!
+# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
-# Qt5_FIND_COMPONENTS variable is set here to prevent ParaView to reset list of Qt5 modules,
-# just to avoid extra dependencies
+# Qt5_FIND_COMPONENTS variable is set here to prevent ParaView to reset list of
+# Qt5 modules, just to avoid extra dependencies
-SET(QT_INCLUDES)
-SET(QT_DEFINITIONS)
-SET(QT_LIBRARIES)
+set(QT_INCLUDES)
+set(QT_DEFINITIONS)
+set(QT_LIBRARIES)
# Find Qt5Core to get Qt version
-SET(Qt5_FIND_COMPONENTS QtCore)
-SET(Qt5_OPTIONAL_COMPONENTS)
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Qt5Core Qt5Core_INCLUDE_DIRS 1 ENVVAR QT5_ROOT_DIR)
-IF(Qt5Core_FOUND)
- LIST(APPEND QT_INCLUDES ${Qt5Core_INCLUDE_DIRS})
- LIST(APPEND QT_DEFINITIONS ${Qt5Core_DEFINITIONS})
- LIST(APPEND QT_LIBRARIES ${Qt5Core_LIBRARIES})
- SET(QT_VERSION "${Qt5Core_VERSION}")
-ENDIF()
+set(Qt5_FIND_COMPONENTS QtCore)
+set(Qt5_OPTIONAL_COMPONENTS)
+salome_find_package_and_detect_conflicts(Qt5Core Qt5Core_INCLUDE_DIRS 1 ENVVAR
+ QT5_ROOT_DIR)
+if(Qt5Core_FOUND)
+ list(APPEND QT_INCLUDES ${Qt5Core_INCLUDE_DIRS})
+ list(APPEND QT_DEFINITIONS ${Qt5Core_DEFINITIONS})
+ list(APPEND QT_LIBRARIES ${Qt5Core_LIBRARIES})
+ set(QT_VERSION "${Qt5Core_VERSION}")
+endif()
# Add mandatory Qt 5 components below
-SET(Qt5_FIND_COMPONENTS Gui Widgets Network Xml OpenGL PrintSupport Help Test)
+set(Qt5_FIND_COMPONENTS
+ Gui
+ Widgets
+ Network
+ Xml
+ OpenGL
+ PrintSupport
+ Help
+ Test)
# Add optional Qt 5 components below
-SET(Qt5_OPTIONAL_COMPONENTS)
+set(Qt5_OPTIONAL_COMPONENTS)
-IF ("${QT_VERSION}" VERSION_LESS "5.6.0")
+if("${QT_VERSION}" VERSION_LESS "5.6.0")
# QtWebKit package is used with Qt < 5.6
- LIST(APPEND Qt5_FIND_COMPONENTS WebKit WebKitWidgets)
-ELSE()
- # QtWebEngine package is (optionally) used with Qt >= 5.6
- # Anyway, not available with Python 3
- LIST(APPEND Qt5_OPTIONAL_COMPONENTS WebEngineCore WebEngine WebEngineWidgets)
-ENDIF()
+ list(APPEND Qt5_FIND_COMPONENTS WebKit WebKitWidgets)
+else()
+ # QtWebEngine package is (optionally) used with Qt >= 5.6 Anyway, not
+ # available with Python 3
+ list(APPEND Qt5_OPTIONAL_COMPONENTS WebEngineCore WebEngine WebEngineWidgets)
+endif()
-IF(NOT WIN32)
- ## QtX11Extras package is used on Linux only
- LIST(APPEND Qt5_FIND_COMPONENTS X11Extras)
-ENDIF()
+if(NOT WIN32)
+ # QtX11Extras package is used on Linux only
+ list(APPEND Qt5_FIND_COMPONENTS X11Extras)
+endif()
-FOREACH(_Qt5_COMPONENT_ ${Qt5_FIND_COMPONENTS} ${Qt5_OPTIONAL_COMPONENTS})
- SET(_Qt5_COMPONENT Qt5${_Qt5_COMPONENT_})
- LIST(FIND Qt5_OPTIONAL_COMPONENTS ${_Qt5_COMPONENT_} idx)
- IF(${idx} GREATER -1)
- SET(Salome${_Qt5_COMPONENT}_FIND_QUIETLY TRUE)
- ENDIF()
- FIND_PACKAGE(${_Qt5_COMPONENT})
- LIST(APPEND QT_INCLUDES ${${_Qt5_COMPONENT}_INCLUDE_DIRS})
- LIST(APPEND QT_DEFINITIONS ${${_Qt5_COMPONENT}_DEFINITIONS})
- LIST(APPEND QT_LIBRARIES ${${_Qt5_COMPONENT}_LIBRARIES})
-ENDFOREACH()
+foreach(_Qt5_COMPONENT_ ${Qt5_FIND_COMPONENTS} ${Qt5_OPTIONAL_COMPONENTS})
+ set(_Qt5_COMPONENT Qt5${_Qt5_COMPONENT_})
+ list(FIND Qt5_OPTIONAL_COMPONENTS ${_Qt5_COMPONENT_} idx)
+ if(${idx} GREATER -1)
+ set(Salome${_Qt5_COMPONENT}_FIND_QUIETLY TRUE)
+ endif()
+ find_package(${_Qt5_COMPONENT})
+ list(APPEND QT_INCLUDES ${${_Qt5_COMPONENT}_INCLUDE_DIRS})
+ list(APPEND QT_DEFINITIONS ${${_Qt5_COMPONENT}_DEFINITIONS})
+ list(APPEND QT_LIBRARIES ${${_Qt5_COMPONENT}_LIBRARIES})
+endforeach()
-FIND_PACKAGE(Qt5LinguistTools)
-GET_TARGET_PROPERTY(QT_LRELEASE_EXECUTABLE Qt5::lrelease LOCATION)
-MARK_AS_ADVANCED(QT_LRELEASE_EXECUTABLE)
+find_package(Qt5LinguistTools)
+get_target_property(QT_LRELEASE_EXECUTABLE Qt5::lrelease LOCATION)
+mark_as_advanced(QT_LRELEASE_EXECUTABLE)
-GET_FILENAME_COMPONENT(QT_BINARY_DIR ${QT_LRELEASE_EXECUTABLE} DIRECTORY)
-MARK_AS_ADVANCED(QT_BINARY_DIR)
+get_filename_component(QT_BINARY_DIR ${QT_LRELEASE_EXECUTABLE} DIRECTORY)
+mark_as_advanced(QT_BINARY_DIR)
-# This is only needed to correctly detect Qt help generator tool, to workaround an error
-# coming from ParaView detection procedure
-FIND_PROGRAM(QT_HELP_GENERATOR
- qhelpgenerator
- PATHS "${QT_BINARY_DIR}"
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
- DOC "qhelpgenerator used to compile Qt help project files")
-MARK_AS_ADVANCED(QT_HELP_GENERATOR)
+# This is only needed to correctly detect Qt help generator tool, to workaround
+# an error coming from ParaView detection procedure
+find_program(
+ QT_HELP_GENERATOR qhelpgenerator
+ PATHS "${QT_BINARY_DIR}"
+ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
+ DOC "qhelpgenerator used to compile Qt help project files")
+mark_as_advanced(QT_HELP_GENERATOR)
-IF(Qt5Core_FOUND)
- SALOME_ACCUMULATE_HEADERS(QT_INCLUDES)
- SALOME_ACCUMULATE_ENVIRONMENT(PATH ${LINGUIST_PATH})
- SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${Qt5Core_LIBRARIES})
- GET_FILENAME_COMPONENT(Qt5_DIR ${Qt5Core_DIR} PATH)
- FILE(TO_NATIVE_PATH "${Qt5_DIR}/Qt5" Qt5_DIR)
- SET(SalomeQt5_COMPONENTS ${Qt5_FIND_COMPONENTS})
- MESSAGE(STATUS "Qt version is ${QT_VERSION}")
-ENDIF()
+if(Qt5Core_FOUND)
+ salome_accumulate_headers(QT_INCLUDES)
+ salome_accumulate_environment(PATH ${LINGUIST_PATH})
+ salome_accumulate_environment(LD_LIBRARY_PATH ${Qt5Core_LIBRARIES})
+ get_filename_component(Qt5_DIR ${Qt5Core_DIR} PATH)
+ file(TO_NATIVE_PATH "${Qt5_DIR}/Qt5" Qt5_DIR)
+ set(SalomeQt5_COMPONENTS ${Qt5_FIND_COMPONENTS})
+ message(STATUS "Qt version is ${QT_VERSION}")
+endif()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-# - Try to find SolveSpace
-# Once done this will define
+# * Try to find SolveSpace Once done this will define
#
-# SOLVESPACE_FOUND - system has SolveSpace
-# SOLVESPACE_INCLUDE_DIRS - the SolveSpace include directory
-# SOLVESPACE_LIBRARIES - Link these to use SolveSpace
+# SOLVESPACE_FOUND - system has SolveSpace SOLVESPACE_INCLUDE_DIRS - the
+# SolveSpace include directory SOLVESPACE_LIBRARIES - Link these to use
+# SolveSpace
-IF(NOT SOLVESPACE_FIND_QUIETLY)
- MESSAGE(STATUS "Try to find SolveSpace at $ENV{SOLVESPACE_ROOT_DIR}...")
-ENDIF()
+if(NOT SOLVESPACE_FIND_QUIETLY)
+ message(STATUS "Try to find SolveSpace at $ENV{SOLVESPACE_ROOT_DIR}...")
+endif()
-FIND_PATH(SOLVESPACE_INCLUDE_DIR NAMES slvs.h
+find_path(
+ SOLVESPACE_INCLUDE_DIR
+ NAMES slvs.h
HINTS ENV SOLVESPACE_ROOT_DIR
- PATH_SUFFIXES include
-)
+ PATH_SUFFIXES include)
-FIND_LIBRARY(SOLVESPACE_LIBRARY NAMES slvs
+find_library(
+ SOLVESPACE_LIBRARY
+ NAMES slvs
HINTS ENV SOLVESPACE_ROOT_DIR
- PATH_SUFFIXES lib
-)
+ PATH_SUFFIXES lib)
-SET(SOLVESPACE_INCLUDE_DIRS ${SOLVESPACE_INCLUDE_DIR})
-SET(SOLVESPACE_LIBRARIES ${SOLVESPACE_LIBRARY})
+set(SOLVESPACE_INCLUDE_DIRS ${SOLVESPACE_INCLUDE_DIR})
+set(SOLVESPACE_LIBRARIES ${SOLVESPACE_LIBRARY})
-# handle the QUIETLY and REQUIRED arguments and set SOLVESPACE_FOUND to TRUE
-# if all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SolveSpace
- REQUIRED_VARS SOLVESPACE_LIBRARY SOLVESPACE_INCLUDE_DIR)
+# handle the QUIETLY and REQUIRED arguments and set SOLVESPACE_FOUND to TRUE if
+# all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(
+ SolveSpace REQUIRED_VARS SOLVESPACE_LIBRARY SOLVESPACE_INCLUDE_DIR)
-MARK_AS_ADVANCED(SOLVESPACE_LIBRARY SOLVESPACE_INCLUDE_DIR)
+mark_as_advanced(SOLVESPACE_LIBRARY SOLVESPACE_INCLUDE_DIR)
-# - Sphinx detection
+# * Sphinx detection
#
-# Output variables:
-# SPHINX_EXECUTABLE - path to the Sphinx executable
-# SPHINX_PYTHONPATH - path to the Sphinx Python modules
+# Output variables: SPHINX_EXECUTABLE - path to the Sphinx executable
+# SPHINX_PYTHONPATH - path to the Sphinx Python modules
#
-###########################################################################
+# ##############################################################################
# Copyright (C) 2013-2023 CEA, EDF, OPEN CASCADE
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-FIND_PROGRAM(SPHINX_EXECUTABLE
- NAMES sphinx-build sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
- PATH_SUFFIXES Scripts)
-FIND_PROGRAM(SPHINX_APIDOC_EXECUTABLE
- NAMES sphinx-apidoc sphinx-apidoc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
- PATH_SUFFIXES Scripts)
+find_program(
+ SPHINX_EXECUTABLE
+ NAMES sphinx-build
+ sphinx-build-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
+ PATH_SUFFIXES Scripts)
+find_program(
+ SPHINX_APIDOC_EXECUTABLE
+ NAMES sphinx-apidoc
+ sphinx-apidoc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
+ PATH_SUFFIXES Scripts)
# Get root dir locally, going up two levels from the exec:
-GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${SPHINX_EXECUTABLE}" PATH)
-GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
-IF(WIN32)
- SET(SPHINX_PYTHONPATH "${_tmp_ROOT_DIR}/lib/site-packages")
-ELSE()
- SET(SPHINX_PYTHONPATH "${_tmp_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages")
-ENDIF()
+get_filename_component(_tmp_ROOT_DIR "${SPHINX_EXECUTABLE}" PATH)
+get_filename_component(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
+if(WIN32)
+ set(SPHINX_PYTHONPATH "${_tmp_ROOT_DIR}/lib/site-packages")
+else()
+ set(SPHINX_PYTHONPATH
+ "${_tmp_ROOT_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages"
+ )
+endif()
# Handle the standard arguments of the find_package() command:
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sphinx REQUIRED_VARS SPHINX_EXECUTABLE SPHINX_APIDOC_EXECUTABLE)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Sphinx REQUIRED_VARS SPHINX_EXECUTABLE
+ SPHINX_APIDOC_EXECUTABLE)
-IF(SPHINX_EXECUTABLE)
- IF(WIN32)
- # Call Sphinx through the Python executable to eliminate the problem related to starting the Sphinx's process.
- GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${SPHINX_EXECUTABLE}" PATH)
- GET_FILENAME_COMPONENT(_tmp_FILENAME "${SPHINX_EXECUTABLE}" NAME_WE)
- SET(SPHINX_EXECUTABLE "${PYTHON_EXECUTABLE}" "${_tmp_ROOT_DIR}/${_tmp_FILENAME}-script.py")
- ENDIF()
+if(SPHINX_EXECUTABLE)
+ if(WIN32)
+ # Call Sphinx through the Python executable to eliminate the problem related
+ # to starting the Sphinx's process.
+ get_filename_component(_tmp_ROOT_DIR "${SPHINX_EXECUTABLE}" PATH)
+ get_filename_component(_tmp_FILENAME "${SPHINX_EXECUTABLE}" NAME_WE)
+ set(SPHINX_EXECUTABLE "${PYTHON_EXECUTABLE}"
+ "${_tmp_ROOT_DIR}/${_tmp_FILENAME}-script.py")
+ endif()
- EXECUTE_PROCESS(COMMAND ${SPHINX_EXECUTABLE} "--version" OUTPUT_VARIABLE SPHINX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
- STRING(REGEX REPLACE ".* ([0-9.]+)$" "\\1" SPHINX_VERSION "${SPHINX_VERSION}" )
- MESSAGE(STATUS "Sphinx version is ${SPHINX_VERSION}")
- IF(SPHINX_VERSION VERSION_LESS "1.3")
- SET(SPHINX_THEME "default")
- ELSE()
- SET(SPHINX_THEME "classic")
- ENDIF()
-ENDIF(SPHINX_EXECUTABLE)
+ execute_process(
+ COMMAND ${SPHINX_EXECUTABLE} "--version"
+ OUTPUT_VARIABLE SPHINX_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REGEX REPLACE ".* ([0-9.]+)$" "\\1" SPHINX_VERSION "${SPHINX_VERSION}")
+ message(STATUS "Sphinx version is ${SPHINX_VERSION}")
+ if(SPHINX_VERSION VERSION_LESS "1.3")
+ set(SPHINX_THEME "default")
+ else()
+ set(SPHINX_THEME "classic")
+ endif()
+endif(SPHINX_EXECUTABLE)
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-# - Try to find TInspector
-# Once done this will define
+# * Try to find TInspector Once done this will define
#
-# TInspector - system has OCCT tool inspector
-# TINSPECTOR_INCLUDE_DIRS - the tool inspector include directory
-# TINSPECTOR_LIBRARIES - Link these to use TInspector
+# TInspector - system has OCCT tool inspector TINSPECTOR_INCLUDE_DIRS - the tool
+# inspector include directory TINSPECTOR_LIBRARIES - Link these to use
+# TInspector
-SET(TINSPECTOR_ROOT_DIR $ENV{TINSPECTOR_ROOT_DIR} CACHE PATH "Path to the TInspector directory")
-IF(EXISTS ${TINSPECTOR_ROOT_DIR})
- SET(TINSPECTOR_INCLUDE_DIR "${TINSPECTOR_ROOT_DIR}/inc")
- SET(TINSPECTOR_LIB_DIR "${TINSPECTOR_ROOT_DIR}/lib")
+set(TINSPECTOR_ROOT_DIR
+ $ENV{TINSPECTOR_ROOT_DIR}
+ CACHE PATH "Path to the TInspector directory")
+if(EXISTS ${TINSPECTOR_ROOT_DIR})
+ set(TINSPECTOR_INCLUDE_DIR "${TINSPECTOR_ROOT_DIR}/inc")
+ set(TINSPECTOR_LIB_DIR "${TINSPECTOR_ROOT_DIR}/lib")
- FIND_LIBRARY(TKTInspector TKTInspector "${TINSPECTOR_LIB_DIR}")
- IF(TKTInspector)
- SET(TKTInspector ${TKTInspector})
- MESSAGE(STATUS "TInspector is found at ${TINSPECTOR_ROOT_DIR}")
- MESSAGE(STATUS "TInspector include dir is ${TINSPECTOR_INCLUDE_DIR}")
- MESSAGE(STATUS "TInspector lib dir is ${TINSPECTOR_LIB_DIR}")
+ find_library(TKTInspector TKTInspector "${TINSPECTOR_LIB_DIR}")
+ if(TKTInspector)
+ set(TKTInspector ${TKTInspector})
+ message(STATUS "TInspector is found at ${TINSPECTOR_ROOT_DIR}")
+ message(STATUS "TInspector include dir is ${TINSPECTOR_INCLUDE_DIR}")
+ message(STATUS "TInspector lib dir is ${TINSPECTOR_LIB_DIR}")
- FIND_LIBRARY(TKVInspector TKVInspector "${TINSPECTOR_LIB_DIR}")
- SET(TKVInspector ${TKVInspector})
+ find_library(TKVInspector TKVInspector "${TINSPECTOR_LIB_DIR}")
+ set(TKVInspector ${TKVInspector})
- FIND_LIBRARY(TKTInspectorAPI TKTInspectorAPI "${TINSPECTOR_LIB_DIR}")
- SET(TKTInspectorAPI ${TKTInspectorAPI})
+ find_library(TKTInspectorAPI TKTInspectorAPI "${TINSPECTOR_LIB_DIR}")
+ set(TKTInspectorAPI ${TKTInspectorAPI})
- FIND_LIBRARY(TKTreeModel TKTreeModel "${TINSPECTOR_LIB_DIR}")
- SET(TKTreeModel ${TKTreeModel})
+ find_library(TKTreeModel TKTreeModel "${TINSPECTOR_LIB_DIR}")
+ set(TKTreeModel ${TKTreeModel})
- FIND_LIBRARY(TKVInspector TKVInspector "${TINSPECTOR_LIB_DIR}")
- SET(TKVInspector ${TKVInspector})
+ find_library(TKVInspector TKVInspector "${TINSPECTOR_LIB_DIR}")
+ set(TKVInspector ${TKVInspector})
- ENDIF(TKTInspector)
+ endif(TKTInspector)
-ENDIF(EXISTS ${TINSPECTOR_ROOT_DIR})
+endif(EXISTS ${TINSPECTOR_ROOT_DIR})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-# /* C++ comment style not allowed */
-
+# /* C++ comment style not allowed */
# if you are building in-source, this is the same as CMAKE_SOURCE_DIR, otherwise
# this is the top level directory of your build tree
-MESSAGE( STATUS "CMAKE_BINARY_DIR: " ${CMAKE_BINARY_DIR} )
+message(STATUS "CMAKE_BINARY_DIR: " ${CMAKE_BINARY_DIR})
-# if you are building in-source, this is the same as CMAKE_CURRENT_SOURCE_DIR, otherwise this
-# is the directory where the compiled or generated files from the current CMakeLists.txt will go to
-MESSAGE( STATUS "CMAKE_CURRENT_BINARY_DIR: " ${CMAKE_CURRENT_BINARY_DIR} )
+# if you are building in-source, this is the same as CMAKE_CURRENT_SOURCE_DIR,
+# otherwise this is the directory where the compiled or generated files from the
+# current CMakeLists.txt will go to
+message(STATUS "CMAKE_CURRENT_BINARY_DIR: " ${CMAKE_CURRENT_BINARY_DIR})
-# this is the directory, from which cmake was started, i.e. the top level source directory
-MESSAGE( STATUS "CMAKE_SOURCE_DIR: " ${CMAKE_SOURCE_DIR} )
+# this is the directory, from which cmake was started, i.e. the top level source
+# directory
+message(STATUS "CMAKE_SOURCE_DIR: " ${CMAKE_SOURCE_DIR})
-# this is the directory where the currently processed CMakeLists.txt is located in
-MESSAGE( STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR} )
+# this is the directory where the currently processed CMakeLists.txt is located
+# in
+message(STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR})
# contains the full path to the top level directory of your build tree
-MESSAGE( STATUS "PROJECT_BINARY_DIR: " ${PROJECT_BINARY_DIR} )
+message(STATUS "PROJECT_BINARY_DIR: " ${PROJECT_BINARY_DIR})
-# contains the full path to the root of your project source directory,
-# i.e. to the nearest directory where CMakeLists.txt contains the PROJECT() command
-MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )
+# contains the full path to the root of your project source directory, i.e. to
+# the nearest directory where CMakeLists.txt contains the PROJECT() command
+message(STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR})
-# set this variable to specify a common place where CMake should put all executable files
-# (instead of CMAKE_CURRENT_BINARY_DIR)
-MESSAGE( STATUS "EXECUTABLE_OUTPUT_PATH: " ${EXECUTABLE_OUTPUT_PATH} )
+# set this variable to specify a common place where CMake should put all
+# executable files (instead of CMAKE_CURRENT_BINARY_DIR)
+message(STATUS "EXECUTABLE_OUTPUT_PATH: " ${EXECUTABLE_OUTPUT_PATH})
-# set this variable to specify a common place where CMake should put all libraries
-# (instead of CMAKE_CURRENT_BINARY_DIR)
-MESSAGE( STATUS "LIBRARY_OUTPUT_PATH: " ${LIBRARY_OUTPUT_PATH} )
+# set this variable to specify a common place where CMake should put all
+# libraries (instead of CMAKE_CURRENT_BINARY_DIR)
+message(STATUS "LIBRARY_OUTPUT_PATH: " ${LIBRARY_OUTPUT_PATH})
-# tell CMake to search first in directories listed in CMAKE_MODULE_PATH
-# when you use FIND_PACKAGE() or INCLUDE()
-MESSAGE( STATUS "CMAKE_MODULE_PATH: " ${CMAKE_MODULE_PATH} )
+# tell CMake to search first in directories listed in CMAKE_MODULE_PATH when you
+# use FIND_PACKAGE() or INCLUDE()
+message(STATUS "CMAKE_MODULE_PATH: " ${CMAKE_MODULE_PATH})
-# this is the complete path of the cmake which runs currently (e.g. /usr/local/bin/cmake)
-MESSAGE( STATUS "CMAKE_COMMAND: " ${CMAKE_COMMAND} )
+# this is the complete path of the cmake which runs currently (e.g.
+# /usr/local/bin/cmake)
+message(STATUS "CMAKE_COMMAND: " ${CMAKE_COMMAND})
# this is the CMake installation directory
-MESSAGE( STATUS "CMAKE_ROOT: " ${CMAKE_ROOT} )
+message(STATUS "CMAKE_ROOT: " ${CMAKE_ROOT})
-# this is the filename including the complete path of the file where this variable is used.
-MESSAGE( STATUS "CMAKE_CURRENT_LIST_FILE: " ${CMAKE_CURRENT_LIST_FILE} )
+# this is the filename including the complete path of the file where this
+# variable is used.
+message(STATUS "CMAKE_CURRENT_LIST_FILE: " ${CMAKE_CURRENT_LIST_FILE})
# this is linenumber where the variable is used
-MESSAGE( STATUS "CMAKE_CURRENT_LIST_LINE: " ${CMAKE_CURRENT_LIST_LINE} )
+message(STATUS "CMAKE_CURRENT_LIST_LINE: " ${CMAKE_CURRENT_LIST_LINE})
-# this is used when searching for include files e.g. using the FIND_PATH() command.
-MESSAGE( STATUS "CMAKE_INCLUDE_PATH: " ${CMAKE_INCLUDE_PATH} )
+# this is used when searching for include files e.g. using the FIND_PATH()
+# command.
+message(STATUS "CMAKE_INCLUDE_PATH: " ${CMAKE_INCLUDE_PATH})
-# this is used when searching for libraries e.g. using the FIND_LIBRARY() command.
-MESSAGE( STATUS "CMAKE_LIBRARY_PATH: " ${CMAKE_LIBRARY_PATH} )
+# this is used when searching for libraries e.g. using the FIND_LIBRARY()
+# command.
+message(STATUS "CMAKE_LIBRARY_PATH: " ${CMAKE_LIBRARY_PATH})
-# the complete system name, e.g. "Linux-2.4.22", "FreeBSD-5.4-RELEASE" or "Windows 5.1"
-MESSAGE( STATUS "CMAKE_SYSTEM: " ${CMAKE_SYSTEM} )
+# the complete system name, e.g. "Linux-2.4.22", "FreeBSD-5.4-RELEASE" or
+# "Windows 5.1"
+message(STATUS "CMAKE_SYSTEM: " ${CMAKE_SYSTEM})
# the short system name, e.g. "Linux", "FreeBSD" or "Windows"
-MESSAGE( STATUS "CMAKE_SYSTEM_NAME: " ${CMAKE_SYSTEM_NAME} )
+message(STATUS "CMAKE_SYSTEM_NAME: " ${CMAKE_SYSTEM_NAME})
# only the version part of CMAKE_SYSTEM
-MESSAGE( STATUS "CMAKE_SYSTEM_VERSION: " ${CMAKE_SYSTEM_VERSION} )
+message(STATUS "CMAKE_SYSTEM_VERSION: " ${CMAKE_SYSTEM_VERSION})
# the processor name (e.g. "Intel(R) Pentium(R) M processor 2.00GHz")
-MESSAGE( STATUS "CMAKE_SYSTEM_PROCESSOR: " ${CMAKE_SYSTEM_PROCESSOR} )
+message(STATUS "CMAKE_SYSTEM_PROCESSOR: " ${CMAKE_SYSTEM_PROCESSOR})
# is TRUE on all UNIX-like OS's, including Apple OS X and CygWin
-MESSAGE( STATUS "UNIX: " ${UNIX} )
+message(STATUS "UNIX: " ${UNIX})
# is TRUE on Windows, including CygWin
-MESSAGE( STATUS "WIN32: " ${WIN32} )
+message(STATUS "WIN32: " ${WIN32})
# is TRUE on Apple OS X
-MESSAGE( STATUS "APPLE: " ${APPLE} )
+message(STATUS "APPLE: " ${APPLE})
# is TRUE when using the MinGW compiler in Windows
-MESSAGE( STATUS "MINGW: " ${MINGW} )
+message(STATUS "MINGW: " ${MINGW})
# is TRUE on Windows when using the CygWin version of cmake
-MESSAGE( STATUS "CYGWIN: " ${CYGWIN} )
+message(STATUS "CYGWIN: " ${CYGWIN})
# is TRUE on Windows when using a Borland compiler
-MESSAGE( STATUS "BORLAND: " ${BORLAND} )
+message(STATUS "BORLAND: " ${BORLAND})
# Microsoft compiler
-MESSAGE( STATUS "MSVC: " ${MSVC} )
-MESSAGE( STATUS "MSVC_IDE: " ${MSVC_IDE} )
-MESSAGE( STATUS "MSVC60: " ${MSVC60} )
-MESSAGE( STATUS "MSVC70: " ${MSVC70} )
-MESSAGE( STATUS "MSVC71: " ${MSVC71} )
-MESSAGE( STATUS "MSVC80: " ${MSVC80} )
-MESSAGE( STATUS "CMAKE_COMPILER_2005: " ${CMAKE_COMPILER_2005} )
-
-
-# set this to true if you don't want to rebuild the object files if the rules have changed,
-# but not the actual source files or headers (e.g. if you changed the some compiler switches)
-MESSAGE( STATUS "CMAKE_SKIP_RULE_DEPENDENCY: " ${CMAKE_SKIP_RULE_DEPENDENCY} )
-
-# since CMake 2.1 the install rule depends on all, i.e. everything will be built before installing.
-# If you don't like this, set this one to true.
-MESSAGE( STATUS "CMAKE_SKIP_INSTALL_ALL_DEPENDENCY: " ${CMAKE_SKIP_INSTALL_ALL_DEPENDENCY} )
-
-# If set, runtime paths are not added when using shared libraries. Default it is set to OFF
-MESSAGE( STATUS "CMAKE_SKIP_RPATH: " ${CMAKE_SKIP_RPATH} )
-
-# set this to true if you are using makefiles and want to see the full compile and link
-# commands instead of only the shortened ones
-MESSAGE( STATUS "CMAKE_VERBOSE_MAKEFILE: " ${CMAKE_VERBOSE_MAKEFILE} )
-
-# this will cause CMake to not put in the rules that re-run CMake. This might be useful if
-# you want to use the generated build files on another machine.
-MESSAGE( STATUS "CMAKE_SUPPRESS_REGENERATION: " ${CMAKE_SUPPRESS_REGENERATION} )
-
-
-# A simple way to get switches to the compiler is to use ADD_DEFINITIONS().
-# But there are also two variables exactly for this purpose:
+message(STATUS "MSVC: " ${MSVC})
+message(STATUS "MSVC_IDE: " ${MSVC_IDE})
+message(STATUS "MSVC60: " ${MSVC60})
+message(STATUS "MSVC70: " ${MSVC70})
+message(STATUS "MSVC71: " ${MSVC71})
+message(STATUS "MSVC80: " ${MSVC80})
+message(STATUS "CMAKE_COMPILER_2005: " ${CMAKE_COMPILER_2005})
+
+# set this to true if you don't want to rebuild the object files if the rules
+# have changed, but not the actual source files or headers (e.g. if you changed
+# the some compiler switches)
+message(STATUS "CMAKE_SKIP_RULE_DEPENDENCY: " ${CMAKE_SKIP_RULE_DEPENDENCY})
+
+# since CMake 2.1 the install rule depends on all, i.e. everything will be built
+# before installing. If you don't like this, set this one to true.
+message(STATUS "CMAKE_SKIP_INSTALL_ALL_DEPENDENCY: "
+ ${CMAKE_SKIP_INSTALL_ALL_DEPENDENCY})
+
+# If set, runtime paths are not added when using shared libraries. Default it is
+# set to OFF
+message(STATUS "CMAKE_SKIP_RPATH: " ${CMAKE_SKIP_RPATH})
+
+# set this to true if you are using makefiles and want to see the full compile
+# and link commands instead of only the shortened ones
+message(STATUS "CMAKE_VERBOSE_MAKEFILE: " ${CMAKE_VERBOSE_MAKEFILE})
+
+# this will cause CMake to not put in the rules that re-run CMake. This might be
+# useful if you want to use the generated build files on another machine.
+message(STATUS "CMAKE_SUPPRESS_REGENERATION: " ${CMAKE_SUPPRESS_REGENERATION})
+
+# A simple way to get switches to the compiler is to use ADD_DEFINITIONS(). But
+# there are also two variables exactly for this purpose:
# the compiler flags for compiling C sources
-MESSAGE( STATUS "CMAKE_C_FLAGS: " ${CMAKE_C_FLAGS} )
+message(STATUS "CMAKE_C_FLAGS: " ${CMAKE_C_FLAGS})
# the compiler flags for compiling C++ sources
-MESSAGE( STATUS "CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS} )
-
+message(STATUS "CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS})
# Choose the type of build. Example: SET(CMAKE_BUILD_TYPE Debug)
-MESSAGE( STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE} )
+message(STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE})
-# if this is set to ON, then all libraries are built as shared libraries by default.
-MESSAGE( STATUS "BUILD_SHARED_LIBS: " ${BUILD_SHARED_LIBS} )
+# if this is set to ON, then all libraries are built as shared libraries by
+# default.
+message(STATUS "BUILD_SHARED_LIBS: " ${BUILD_SHARED_LIBS})
# the compiler used for C files
-MESSAGE( STATUS "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )
+message(STATUS "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER})
# the compiler used for C++ files
-MESSAGE( STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER} )
+message(STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER})
# if the compiler is a variant of gcc, this should be set to 1
-MESSAGE( STATUS "CMAKE_COMPILER_IS_GNUCC: " ${CMAKE_COMPILER_IS_GNUCC} )
+message(STATUS "CMAKE_COMPILER_IS_GNUCC: " ${CMAKE_COMPILER_IS_GNUCC})
# if the compiler is a variant of g++, this should be set to 1
-MESSAGE( STATUS "CMAKE_COMPILER_IS_GNUCXX : " ${CMAKE_COMPILER_IS_GNUCXX} )
+message(STATUS "CMAKE_COMPILER_IS_GNUCXX : " ${CMAKE_COMPILER_IS_GNUCXX})
# the tools for creating libraries
-MESSAGE( STATUS "CMAKE_AR: " ${CMAKE_AR} )
-MESSAGE( STATUS "CMAKE_RANLIB: " ${CMAKE_RANLIB} )
+message(STATUS "CMAKE_AR: " ${CMAKE_AR})
+message(STATUS "CMAKE_RANLIB: " ${CMAKE_RANLIB})
#
-#MESSAGE( STATUS ": " ${} )
+# MESSAGE( STATUS ": " ${} )
-# ------------------------- End of Generic CMake Variable Logging ------------------
+# ------------------------- End of Generic CMake Variable Logging
+# ------------------
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})
-#TODO(spo): is -threads necessary?
+# TODO(spo): is -threads necessary?
set(CMAKE_SWIG_FLAGS -threads -Wall)
-# Using doxy2swig:
-# Add to ModuleName.i before any %inlcude:
-# %include "doxyhelp.i"
-# Add to CMakeLists.txt before SWIG_ADD_MODULE(...):
-# SET(SWIG_MODULE_ModuleName_EXTRA_DEPS ${SWIG_MODULE_ModuleName_EXTRA_DEPS} doxyhelp.i)
+# Using doxy2swig: Add to ModuleName.i before any %inlcude: %include
+# "doxyhelp.i" Add to CMakeLists.txt before SWIG_ADD_MODULE(...):
+# SET(SWIG_MODULE_ModuleName_EXTRA_DEPS ${SWIG_MODULE_ModuleName_EXTRA_DEPS}
+# doxyhelp.i)
-#TODO(spo): why not use FindDoxygen.cmake module?
+# TODO(spo): why not use FindDoxygen.cmake module?
if(WIN32)
find_program(DOXYGEN_EXECUTABLE Doxygen)
else()
set(doc_sources)
foreach(it "*.h;*.cpp;*.hpp;*.cxx")
- file(GLOB doc_source RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${it})
+ file(
+ GLOB doc_source
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ ${it})
list(APPEND doc_sources ${doc_source})
endforeach()
-#message(STATUS "${doc_sources}")
+# message(STATUS "${doc_sources}")
-add_custom_command(OUTPUT doxyhelp.i
+add_custom_command(
+ OUTPUT doxyhelp.i
COMMAND "${DOXYGEN_EXECUTABLE}"
- COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/doxy2swig.py xml/index.xml doxyhelp.i
- DEPENDS ${doc_sources} ${PROJECT_SOURCE_DIR}/doc/swig/doxyfile.in
-)
+ COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/doxy2swig.py
+ xml/index.xml doxyhelp.i
+ DEPENDS ${doc_sources} ${PROJECT_SOURCE_DIR}/doc/swig/doxyfile.in)
# Copyright (C) 2012-2023 CEA, EDF, OPEN CASCADE
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
# Author: A.Geay, V. Sandler, A. Bruneton
#
-#----------------------------------------------------------------------------
+# ----------------------------------------------------------------------------
# LIST_CONTAINS is a macro useful for determining whether a list has a
# particular entry
-#----------------------------------------------------------------------------
-MACRO(LIST_CONTAINS var value)
- SET(${var})
- FOREACH(value2 ${ARGN})
- IF(${value} STREQUAL "${value2}")
- SET(${var} TRUE)
- ENDIF (${value} STREQUAL "${value2}")
- ENDFOREACH (value2)
-ENDMACRO(LIST_CONTAINS)
-
-#----------------------------------------------------------------------------
-# The PARSE_ARGUMENTS macro will take the arguments of another macro and
-# define several variables.
+# ----------------------------------------------------------------------------
+macro(LIST_CONTAINS var value)
+ set(${var})
+ foreach(value2 ${ARGN})
+ if(${value} STREQUAL "${value2}")
+ set(${var} TRUE)
+ endif(${value} STREQUAL "${value2}")
+ endforeach(value2)
+endmacro(LIST_CONTAINS)
+
+# ----------------------------------------------------------------------------
+# The PARSE_ARGUMENTS macro will take the arguments of another macro and define
+# several variables.
#
# USAGE: PARSE_ARGUMENTS(prefix arg_names options arg1 arg2...)
#
#
# prefix: IN: a prefix to put on all variables it creates.
#
-# arg_names: IN: a list of names.
-# For each item in arg_names, PARSE_ARGUMENTS will create a
-# variable with that name, prefixed with prefix_. Each variable will be filled
-# with the arguments that occur after the given arg_name is encountered
-# up to the next arg_name or the end of the arguments. All options are
-# removed from these lists. PARSE_ARGUMENTS also creates a
-# prefix_DEFAULT_ARGS variable containing the list of all arguments up
-# to the first arg_name encountered.
-#
-# options: IN: a list of options.
-# For each item in options, PARSE_ARGUMENTS will create a
-# variable with that name, prefixed with prefix_. So, for example, if prefix is
-# MY_MACRO and options is OPTION1;OPTION2, then PARSE_ARGUMENTS will
-# create the variables MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These
-# variables will be set to true if the option exists in the command line
-# or false otherwise.
-# arg_names and options lists should be quoted.
+# arg_names: IN: a list of names. For each item in arg_names, PARSE_ARGUMENTS
+# will create a variable with that name, prefixed with prefix_. Each variable
+# will be filled with the arguments that occur after the given arg_name is
+# encountered up to the next arg_name or the end of the arguments. All options
+# are removed from these lists. PARSE_ARGUMENTS also creates a
+# prefix_DEFAULT_ARGS variable containing the list of all arguments up to the
+# first arg_name encountered.
+#
+# options: IN: a list of options. For each item in options, PARSE_ARGUMENTS will
+# create a variable with that name, prefixed with prefix_. So, for example, if
+# prefix is MY_MACRO and options is OPTION1;OPTION2, then PARSE_ARGUMENTS will
+# create the variables MY_MACRO_OPTION1 and MY_MACRO_OPTION2. These variables
+# will be set to true if the option exists in the command line or false
+# otherwise. arg_names and options lists should be quoted.
#
# The rest of PARSE_ARGUMENTS are arguments from another macro to be parsed.
-#----------------------------------------------------------------------------
-MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
- SET(DEFAULT_ARGS)
- FOREACH(arg_name ${arg_names})
- SET(${prefix}_${arg_name})
- ENDFOREACH(arg_name)
- FOREACH(option ${option_names})
- SET(${prefix}_${option} FALSE)
- ENDFOREACH(option)
- SET(current_arg_name DEFAULT_ARGS)
- SET(current_arg_list)
- FOREACH(arg ${ARGN})
- LIST_CONTAINS(is_arg_name ${arg} ${arg_names})
- IF (is_arg_name)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
- SET(current_arg_name ${arg})
- SET(current_arg_list)
- ELSE (is_arg_name)
- LIST_CONTAINS(is_option ${arg} ${option_names})
- IF (is_option)
- SET(${prefix}_${arg} TRUE)
- ELSE (is_option)
- SET(current_arg_list ${current_arg_list} ${arg})
- ENDIF (is_option)
- ENDIF (is_arg_name)
- ENDFOREACH(arg)
- SET(${prefix}_${current_arg_name} ${current_arg_list})
-ENDMACRO(PARSE_ARGUMENTS)
-
-#----------------------------------------------------------------------------
+# ----------------------------------------------------------------------------
+macro(PARSE_ARGUMENTS prefix arg_names option_names)
+ set(DEFAULT_ARGS)
+ foreach(arg_name ${arg_names})
+ set(${prefix}_${arg_name})
+ endforeach(arg_name)
+ foreach(option ${option_names})
+ set(${prefix}_${option} FALSE)
+ endforeach(option)
+ set(current_arg_name DEFAULT_ARGS)
+ set(current_arg_list)
+ foreach(arg ${ARGN})
+ list_contains(is_arg_name ${arg} ${arg_names})
+ if(is_arg_name)
+ set(${prefix}_${current_arg_name} ${current_arg_list})
+ set(current_arg_name ${arg})
+ set(current_arg_list)
+ else(is_arg_name)
+ list_contains(is_option ${arg} ${option_names})
+ if(is_option)
+ set(${prefix}_${arg} TRUE)
+ else(is_option)
+ set(current_arg_list ${current_arg_list} ${arg})
+ endif(is_option)
+ endif(is_arg_name)
+ endforeach(arg)
+ set(${prefix}_${current_arg_name} ${current_arg_list})
+endmacro(PARSE_ARGUMENTS)
+
+# ----------------------------------------------------------------------------
# SALOME_INSTALL_SCRIPTS is a macro useful for installing scripts.
#
-# USAGE: SALOME_INSTALL_SCRIPTS(file_list path [WORKING_DIRECTORY dir] [DEF_PERMS] [TARGET_NAME name])
-#
-# ARGUMENTS:
-# file_list: IN : list of files to be installed. This list should be quoted.
-# path: IN : full pathname for installing.
-#
-# By default files to be installed as executable scripts.
-# If DEF_PERMS option is provided, than permissions for installed files are
-# only OWNER_WRITE, OWNER_READ, GROUP_READ, and WORLD_READ.
-# WORKING_DIRECTORY option may be used to specify the relative or absolute
-# path to the directory containing source files listed in file_list argument.
-# If TARGET_NAME option is specified, the name of the target being created
-# with this macro is returned via the given variable.
-#----------------------------------------------------------------------------
-MACRO(SALOME_INSTALL_SCRIPTS file_list path)
- PARSE_ARGUMENTS(SALOME_INSTALL_SCRIPTS "WORKING_DIRECTORY;TARGET_NAME" "DEF_PERMS" ${ARGN})
- SET(PERMS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
- IF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)
- SET(PERMS ${PERMS} OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
- ENDIF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)
- SET(_all_pyc)
- SET(_all_pyo)
- FOREACH(file ${file_list})
- SET(PREFIX "")
- SET(_source_prefix "")
- GET_FILENAME_COMPONENT(file_name ${file} NAME)
- IF(NOT IS_ABSOLUTE ${file})
- IF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
- SET(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")
- ENDIF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
- SET(_source_prefix "${CMAKE_CURRENT_SOURCE_DIR}/")
- ENDIF(NOT IS_ABSOLUTE ${file})
- INSTALL(FILES ${PREFIX}${file} DESTINATION ${path} PERMISSIONS ${PERMS})
- GET_FILENAME_COMPONENT(ext ${file} EXT)
- GET_FILENAME_COMPONENT(we_ext ${file} NAME_WE)
-
- IF(ext STREQUAL .py)
- # Generate and install the pyc and pyo
- # [ABN] Important: we avoid references or usage of CMAKE_INSTALL_PREFIX which is not correctly set
+# USAGE: SALOME_INSTALL_SCRIPTS(file_list path [WORKING_DIRECTORY dir]
+# [DEF_PERMS] [TARGET_NAME name])
+#
+# ARGUMENTS: file_list: IN : list of files to be installed. This list should be
+# quoted. path: IN : full pathname for installing.
+#
+# By default files to be installed as executable scripts. If DEF_PERMS option is
+# provided, than permissions for installed files are only OWNER_WRITE,
+# OWNER_READ, GROUP_READ, and WORLD_READ. WORKING_DIRECTORY option may be used
+# to specify the relative or absolute path to the directory containing source
+# files listed in file_list argument. If TARGET_NAME option is specified, the
+# name of the target being created with this macro is returned via the given
+# variable.
+# ----------------------------------------------------------------------------
+macro(SALOME_INSTALL_SCRIPTS file_list path)
+ parse_arguments(SALOME_INSTALL_SCRIPTS "WORKING_DIRECTORY;TARGET_NAME"
+ "DEF_PERMS" ${ARGN})
+ set(PERMS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+ if(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)
+ set(PERMS ${PERMS} OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
+ endif(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)
+ set(_all_pyc)
+ set(_all_pyo)
+ foreach(file ${file_list})
+ set(PREFIX "")
+ set(_source_prefix "")
+ get_filename_component(file_name ${file} NAME)
+ if(NOT IS_ABSOLUTE ${file})
+ if(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
+ set(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")
+ endif(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
+ set(_source_prefix "${CMAKE_CURRENT_SOURCE_DIR}/")
+ endif(NOT IS_ABSOLUTE ${file})
+ install(
+ FILES ${PREFIX}${file}
+ DESTINATION ${path}
+ PERMISSIONS ${PERMS})
+ get_filename_component(ext ${file} EXT)
+ get_filename_component(we_ext ${file} NAME_WE)
+
+ if(ext STREQUAL .py)
+ # Generate and install the pyc and pyo [ABN] Important: we avoid
+ # references or usage of CMAKE_INSTALL_PREFIX which is not correctly set
# when using CPack.
- SET(_pyc_file "${CMAKE_CURRENT_BINARY_DIR}/${we_ext}.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.pyc")
- SET(_pyo_file "${CMAKE_CURRENT_BINARY_DIR}/${we_ext}.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.opt-1.pyc")
- LIST(APPEND _all_pyc ${_pyc_file})
- LIST(APPEND _all_pyo ${_pyo_file})
- ADD_CUSTOM_COMMAND(
+ set(_pyc_file
+ "${CMAKE_CURRENT_BINARY_DIR}/${we_ext}.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.pyc"
+ )
+ set(_pyo_file
+ "${CMAKE_CURRENT_BINARY_DIR}/${we_ext}.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.opt-1.pyc"
+ )
+ list(APPEND _all_pyc ${_pyc_file})
+ list(APPEND _all_pyo ${_pyo_file})
+ add_custom_command(
OUTPUT ${_pyc_file} ${_pyo_file}
- COMMAND ${PYTHON_EXECUTABLE} -c "from py_compile import compile; compile('${_source_prefix}${file}', '${_pyc_file}', doraise=True, optimize=0); compile('${_source_prefix}${file}', '${_pyo_file}', doraise=True, optimize=1)"
+ COMMAND
+ ${PYTHON_EXECUTABLE} -c
+ "from py_compile import compile; compile('${_source_prefix}${file}', '${_pyc_file}', doraise=True, optimize=0); compile('${_source_prefix}${file}', '${_pyo_file}', doraise=True, optimize=1)"
DEPENDS ${PREFIX}${file}
- VERBATIM
- )
+ VERBATIM)
# Install the .pyo and the .pyc
- INSTALL(FILES ${_pyc_file} DESTINATION ${path}/__pycache__ PERMISSIONS ${PERMS})
- INSTALL(FILES ${_pyo_file} DESTINATION ${path}/__pycache__ PERMISSIONS ${PERMS})
- ENDIF(ext STREQUAL .py)
-
- # get relative path (from CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR)
- STRING(REGEX REPLACE ${CMAKE_SOURCE_DIR} "" rel_dir ${CMAKE_CURRENT_SOURCE_DIR})
- # convert "/" to "_"
- IF(rel_dir)
- STRING(REGEX REPLACE "/" "_" unique_name ${rel_dir})
- ELSE(rel_dir)
- SET(unique_name _)
- ENDIF(rel_dir)
-
- ENDFOREACH(file ${file_list})
- # Generate only one target for all requested Python script compilation.
- # Make sure that the target name is unique too.
- IF(_all_pyc)
- SET(_cnt 0)
- WHILE(TARGET "PYCOMPILE${unique_name}_${_cnt}")
- MATH(EXPR _cnt ${_cnt}+1)
- ENDWHILE()
- SET(_target_name "PYCOMPILE${unique_name}_${_cnt}")
- ADD_CUSTOM_TARGET(${_target_name} ALL DEPENDS ${_all_pyc} ${_all_pyo})
- IF(SALOME_INSTALL_SCRIPTS_TARGET_NAME)
- SET(${SALOME_INSTALL_SCRIPTS_TARGET_NAME} ${_target_name})
- ENDIF(SALOME_INSTALL_SCRIPTS_TARGET_NAME)
- ENDIF()
-ENDMACRO(SALOME_INSTALL_SCRIPTS)
-
-#----------------------------------------------------------------------------
+ install(
+ FILES ${_pyc_file}
+ DESTINATION ${path}/__pycache__
+ PERMISSIONS ${PERMS})
+ install(
+ FILES ${_pyo_file}
+ DESTINATION ${path}/__pycache__
+ PERMISSIONS ${PERMS})
+ endif(ext STREQUAL .py)
+
+ # get relative path (from CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR)
+ string(REGEX REPLACE ${CMAKE_SOURCE_DIR} "" rel_dir
+ ${CMAKE_CURRENT_SOURCE_DIR})
+ # convert "/" to "_"
+ if(rel_dir)
+ string(REGEX REPLACE "/" "_" unique_name ${rel_dir})
+ else(rel_dir)
+ set(unique_name _)
+ endif(rel_dir)
+
+ endforeach(file ${file_list})
+ # Generate only one target for all requested Python script compilation. Make
+ # sure that the target name is unique too.
+ if(_all_pyc)
+ set(_cnt 0)
+ while(TARGET "PYCOMPILE${unique_name}_${_cnt}")
+ math(EXPR _cnt ${_cnt}+1)
+ endwhile()
+ set(_target_name "PYCOMPILE${unique_name}_${_cnt}")
+ add_custom_target(${_target_name} ALL DEPENDS ${_all_pyc} ${_all_pyo})
+ if(SALOME_INSTALL_SCRIPTS_TARGET_NAME)
+ set(${SALOME_INSTALL_SCRIPTS_TARGET_NAME} ${_target_name})
+ endif(SALOME_INSTALL_SCRIPTS_TARGET_NAME)
+ endif()
+endmacro(SALOME_INSTALL_SCRIPTS)
+
+# ----------------------------------------------------------------------------
# SALOME_CONFIGURE_FILE is a macro useful for copying a file to another location
# and modify its contents.
#
# USAGE: SALOME_CONFIGURE_FILE(in_file out_file [INSTALL dir])
#
-# ARGUMENTS:
-# in_file: IN : input file (if relative path is given, full file path is computed from current source dir).
-# out_file: IN : output file (if relative path is given, full file path is computed from current build dir).
-# If INSTALL is specified, then 'out_file' will be installed to the 'dir' directory.
-#----------------------------------------------------------------------------
-MACRO(SALOME_CONFIGURE_FILE IN_FILE OUT_FILE)
- IF(IS_ABSOLUTE ${IN_FILE})
- SET(_in_file ${IN_FILE})
- ELSE()
- SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${IN_FILE})
- ENDIF()
- IF(IS_ABSOLUTE ${OUT_FILE})
- SET(_out_file ${OUT_FILE})
- ELSE()
- SET(_out_file ${CMAKE_CURRENT_BINARY_DIR}/${OUT_FILE})
- ENDIF()
- MESSAGE(STATUS "Creation of ${_out_file}")
- CONFIGURE_FILE(${_in_file} ${_out_file} @ONLY)
- PARSE_ARGUMENTS(SALOME_CONFIGURE_FILE "INSTALL" "" ${ARGN})
- IF(SALOME_CONFIGURE_FILE_INSTALL)
- INSTALL(FILES ${_out_file} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL})
- ENDIF(SALOME_CONFIGURE_FILE_INSTALL)
-ENDMACRO(SALOME_CONFIGURE_FILE)
-
-
-#######################################################################################
+# ARGUMENTS: in_file: IN : input file (if relative path is given, full file path
+# is computed from current source dir). out_file: IN : output file (if relative
+# path is given, full file path is computed from current build dir). If INSTALL
+# is specified, then 'out_file' will be installed to the 'dir' directory.
+# ----------------------------------------------------------------------------
+macro(SALOME_CONFIGURE_FILE IN_FILE OUT_FILE)
+ if(IS_ABSOLUTE ${IN_FILE})
+ set(_in_file ${IN_FILE})
+ else()
+ set(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${IN_FILE})
+ endif()
+ if(IS_ABSOLUTE ${OUT_FILE})
+ set(_out_file ${OUT_FILE})
+ else()
+ set(_out_file ${CMAKE_CURRENT_BINARY_DIR}/${OUT_FILE})
+ endif()
+ message(STATUS "Creation of ${_out_file}")
+ configure_file(${_in_file} ${_out_file} @ONLY)
+ parse_arguments(SALOME_CONFIGURE_FILE "INSTALL" "" ${ARGN})
+ if(SALOME_CONFIGURE_FILE_INSTALL)
+ install(FILES ${_out_file} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL})
+ endif(SALOME_CONFIGURE_FILE_INSTALL)
+endmacro(SALOME_CONFIGURE_FILE)
+
+# ##############################################################################
# Useful macros for SALOME own package detection system
#
-###
-# SALOME_CHECK_EQUAL_PATHS(result path1 path2)
-# Check if two paths are identical, resolving links. If the paths do not exist a simple
-# text comparison is performed.
-# result is a boolean.
-###
-MACRO(SALOME_CHECK_EQUAL_PATHS varRes path1 path2)
- SET("${varRes}" OFF)
- IF(EXISTS "${path1}")
- GET_FILENAME_COMPONENT(_tmp1 "${path1}" REALPATH)
- ELSE()
- SET(_tmp1 "${path1}")
- ENDIF()
-
- IF(EXISTS "${path2}")
- GET_FILENAME_COMPONENT(_tmp2 "${path2}" REALPATH)
- ELSE()
- SET(_tmp2 "${path2}")
- ENDIF()
-
- IF("${_tmp1}" STREQUAL "${_tmp2}")
- SET("${varRes}" ON)
- ENDIF()
-# MESSAGE(${${varRes}})
-ENDMACRO()
-
-####
+#
+# SALOME_CHECK_EQUAL_PATHS(result path1 path2) Check if two paths are identical,
+# resolving links. If the paths do not exist a simple text comparison is
+# performed. result is a boolean.
+#
+macro(SALOME_CHECK_EQUAL_PATHS varRes path1 path2)
+ set("${varRes}" OFF)
+ if(EXISTS "${path1}")
+ get_filename_component(_tmp1 "${path1}" REALPATH)
+ else()
+ set(_tmp1 "${path1}")
+ endif()
+
+ if(EXISTS "${path2}")
+ get_filename_component(_tmp2 "${path2}" REALPATH)
+ else()
+ set(_tmp2 "${path2}")
+ endif()
+
+ if("${_tmp1}" STREQUAL "${_tmp2}")
+ set("${varRes}" ON)
+ endif()
+ # MESSAGE(${${varRes}})
+endmacro()
+
+#
# SALOME_LOG_OPTIONAL_PACKAGE(pkg flag)
#
-# Register in global variables the detection status (found or not) of the optional package 'pkg'
-# and the configuration flag that should be turned off to avoid detection of the package.
-# The global variables are read again by SALOME_PACKAGE_REPORT_AND_CHECK to produce
-# a summary report of the detection status and stops the process if necessary.
-MACRO(SALOME_LOG_OPTIONAL_PACKAGE pkg flag)
+# Register in global variables the detection status (found or not) of the
+# optional package 'pkg' and the configuration flag that should be turned off to
+# avoid detection of the package. The global variables are read again by
+# SALOME_PACKAGE_REPORT_AND_CHECK to produce a summary report of the detection
+# status and stops the process if necessary.
+macro(SALOME_LOG_OPTIONAL_PACKAGE pkg flag)
# Was the package found
- STRING(TOUPPER ${pkg} _pkg_UC)
- IF(${pkg}_FOUND OR ${_pkg_UC}_FOUND)
- SET(_isFound TRUE)
- ELSE()
- SET(_isFound FALSE)
- ENDIF()
+ string(TOUPPER ${pkg} _pkg_UC)
+ if(${pkg}_FOUND OR ${_pkg_UC}_FOUND)
+ set(_isFound TRUE)
+ else()
+ set(_isFound FALSE)
+ endif()
# Is the package already in the list? Then update its status:
- LIST(FIND _SALOME_OPTIONAL_PACKAGES_names ${pkg} _result)
- IF(NOT ${_result} EQUAL -1)
- LIST(REMOVE_AT _SALOME_OPTIONAL_PACKAGES_found ${_result})
- LIST(REMOVE_AT _SALOME_OPTIONAL_PACKAGES_flags ${_result})
- LIST(INSERT _SALOME_OPTIONAL_PACKAGES_found ${_result} ${_isFound})
- LIST(INSERT _SALOME_OPTIONAL_PACKAGES_flags ${_result} ${flag})
- ELSE()
+ list(FIND _SALOME_OPTIONAL_PACKAGES_names ${pkg} _result)
+ if(NOT ${_result} EQUAL -1)
+ list(REMOVE_AT _SALOME_OPTIONAL_PACKAGES_found ${_result})
+ list(REMOVE_AT _SALOME_OPTIONAL_PACKAGES_flags ${_result})
+ list(INSERT _SALOME_OPTIONAL_PACKAGES_found ${_result} ${_isFound})
+ list(INSERT _SALOME_OPTIONAL_PACKAGES_flags ${_result} ${flag})
+ else()
# Otherwise insert it
- LIST(APPEND _SALOME_OPTIONAL_PACKAGES_names ${pkg})
- LIST(APPEND _SALOME_OPTIONAL_PACKAGES_found ${_isFound})
- LIST(APPEND _SALOME_OPTIONAL_PACKAGES_flags ${flag})
- ENDIF()
+ list(APPEND _SALOME_OPTIONAL_PACKAGES_names ${pkg})
+ list(APPEND _SALOME_OPTIONAL_PACKAGES_found ${_isFound})
+ list(APPEND _SALOME_OPTIONAL_PACKAGES_flags ${flag})
+ endif()
-ENDMACRO(SALOME_LOG_OPTIONAL_PACKAGE)
+endmacro(SALOME_LOG_OPTIONAL_PACKAGE)
-####
+#
# SALOME_JUSTIFY_STRING()
#
-# Justifies the string specified as an argument to the given length
-# adding required number of spaces to the end. Does noting if input
-# string is longer as required length.
-# Puts the result to the output variable.
+# Justifies the string specified as an argument to the given length adding
+# required number of spaces to the end. Does noting if input string is longer as
+# required length. Puts the result to the output variable.
#
# USAGE: SALOME_JUSTIFY_STRING(input length result)
#
-# ARGUMENTS:
-# input [in] input string
-# length [in] required length of resulting string
-# result [out] name of variable where the result string is put to
-#
-MACRO(SALOME_JUSTIFY_STRING input length result)
- SET(${result} ${input})
- STRING(LENGTH ${input} _input_length)
- MATH(EXPR _nb_spaces "${length}-${_input_length}-1")
- IF (_nb_spaces GREATER 0)
- FOREACH(_idx RANGE ${_nb_spaces})
- SET(${result} "${${result}} ")
- ENDFOREACH()
- ENDIF()
-ENDMACRO(SALOME_JUSTIFY_STRING)
-
-####
+# ARGUMENTS: input [in] input string length [in] required length of resulting
+# string result [out] name of variable where the result string is put to
+#
+macro(SALOME_JUSTIFY_STRING input length result)
+ set(${result} ${input})
+ string(LENGTH ${input} _input_length)
+ math(EXPR _nb_spaces "${length}-${_input_length}-1")
+ if(_nb_spaces GREATER 0)
+ foreach(_idx RANGE ${_nb_spaces})
+ set(${result} "${${result}} ")
+ endforeach()
+ endif()
+endmacro(SALOME_JUSTIFY_STRING)
+
+#
# SALOME_PACKAGE_REPORT_AND_CHECK()
#
-# Print a quick summary of the detection of optional prerequisites.
-# If a package was not found, the configuration is stopped. The summary also indicates
-# which flag should be turned off to skip the detection of the package.
+# Print a quick summary of the detection of optional prerequisites. If a package
+# was not found, the configuration is stopped. The summary also indicates which
+# flag should be turned off to skip the detection of the package.
#
-# If optional JUSTIFY argument is specified, names of packages
-# are left-justified to the given length; default value is 10.
+# If optional JUSTIFY argument is specified, names of packages are
+# left-justified to the given length; default value is 10.
#
# USAGE: SALOME_PACKAGE_REPORT_AND_CHECK([JUSTIFY length])
#
-MACRO(SALOME_PACKAGE_REPORT_AND_CHECK)
- SET(_will_fail OFF)
- PARSE_ARGUMENTS(SALOME_PACKAGE_REPORT "JUSTIFY" "" ${ARGN})
- IF(SALOME_PACKAGE_REPORT_JUSTIFY)
- SET(_length ${SALOME_PACKAGE_REPORT_JUSTIFY})
- ELSE()
- SET(_length 23)
- ENDIF()
- MESSAGE(STATUS "")
- MESSAGE(STATUS " Optional packages - Detection report ")
- MESSAGE(STATUS " ==================================== ")
- MESSAGE(STATUS "")
- IF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
- LIST(LENGTH _SALOME_OPTIONAL_PACKAGES_names _list_len)
+macro(SALOME_PACKAGE_REPORT_AND_CHECK)
+ set(_will_fail OFF)
+ parse_arguments(SALOME_PACKAGE_REPORT "JUSTIFY" "" ${ARGN})
+ if(SALOME_PACKAGE_REPORT_JUSTIFY)
+ set(_length ${SALOME_PACKAGE_REPORT_JUSTIFY})
+ else()
+ set(_length 23)
+ endif()
+ message(STATUS "")
+ message(STATUS " Optional packages - Detection report ")
+ message(STATUS " ==================================== ")
+ message(STATUS "")
+ if(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
+ list(LENGTH _SALOME_OPTIONAL_PACKAGES_names _list_len)
# Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
- MATH(EXPR _range "${_list_len}-1")
- FOREACH(_idx RANGE ${_range})
- LIST(GET _SALOME_OPTIONAL_PACKAGES_names ${_idx} _pkg_name)
- LIST(GET _SALOME_OPTIONAL_PACKAGES_found ${_idx} _pkg_found)
- LIST(GET _SALOME_OPTIONAL_PACKAGES_flags ${_idx} _pkg_flag)
- SALOME_JUSTIFY_STRING(${_pkg_name} ${_length} _pkg_name)
- IF(_pkg_found)
- SET(_found_msg "Found")
- SET(_flag_msg "")
- ELSE()
- SET(_will_fail ON)
- SET(_found_msg "NOT Found")
- SET(_flag_msg " - ${_pkg_flag} can be switched OFF to skip this prerequisite.")
- ENDIF()
-
- MESSAGE(STATUS " * ${_pkg_name} -> ${_found_msg}${_flag_msg}")
- ENDFOREACH()
- ENDIF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
- MESSAGE(STATUS "")
- MESSAGE(STATUS "")
+ math(EXPR _range "${_list_len}-1")
+ foreach(_idx RANGE ${_range})
+ list(GET _SALOME_OPTIONAL_PACKAGES_names ${_idx} _pkg_name)
+ list(GET _SALOME_OPTIONAL_PACKAGES_found ${_idx} _pkg_found)
+ list(GET _SALOME_OPTIONAL_PACKAGES_flags ${_idx} _pkg_flag)
+ salome_justify_string(${_pkg_name} ${_length} _pkg_name)
+ if(_pkg_found)
+ set(_found_msg "Found")
+ set(_flag_msg "")
+ else()
+ set(_will_fail ON)
+ set(_found_msg "NOT Found")
+ set(_flag_msg
+ " - ${_pkg_flag} can be switched OFF to skip this prerequisite.")
+ endif()
+
+ message(STATUS " * ${_pkg_name} -> ${_found_msg}${_flag_msg}")
+ endforeach()
+ endif(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
+ message(STATUS "")
+ message(STATUS "")
# Failure if some packages were missing:
- IF(_will_fail)
- MESSAGE(FATAL_ERROR "Some required prerequisites have NOT been found. Take a look at the report above to fix this.")
- ENDIF()
-ENDMACRO(SALOME_PACKAGE_REPORT_AND_CHECK)
+ if(_will_fail)
+ message(
+ FATAL_ERROR
+ "Some required prerequisites have NOT been found. Take a look at the report above to fix this."
+ )
+ endif()
+endmacro(SALOME_PACKAGE_REPORT_AND_CHECK)
-####
-# SALOME_FIND_PACKAGE(englobingPackageName standardPackageName modus [onlyTryQuietly])
+#
+# SALOME_FIND_PACKAGE(englobingPackageName standardPackageName modus
+# [onlyTryQuietly])
#
# example: SALOME_FIND_PACKAGE(SalomeVTK VTK CONFIG)
#
-# Encapsulate the call to the standard FIND_PACKAGE(standardPackageName) passing all the options
-# given when calling the command FIND_PACKAGE(SalomeXYZ). Those options are stored implicitly in
-# CMake variables: xyz__FIND_QUIETLY, xyz_FIND_REQUIRED, etc ...
+# Encapsulate the call to the standard FIND_PACKAGE(standardPackageName) passing
+# all the options given when calling the command FIND_PACKAGE(SalomeXYZ). Those
+# options are stored implicitly in CMake variables: xyz__FIND_QUIETLY,
+# xyz_FIND_REQUIRED, etc ...
#
-# If a list of components was specified when invoking the initial FIND_PACKAGE(SalomeXyz ...) this is
-# also handled properly.
+# If a list of components was specified when invoking the initial
+# FIND_PACKAGE(SalomeXyz ...) this is also handled properly.
#
# Modus is either MODULE or CONFIG (cf standard FIND_PACKAGE() documentation).
-# The last argument is optional and if set to TRUE will force the search to be OPTIONAL and QUIET.
-# If the package is looked for in CONFIG mode, the standard system paths are skipped. If you still want a
-# system installation to be found in this mode, you have to set the ROOT_DIR variable explicitly to /usr (for
+# The last argument is optional and if set to TRUE will force the search to be
+# OPTIONAL and QUIET. If the package is looked for in CONFIG mode, the standard
+# system paths are skipped. If you still want a system installation to be found
+# in this mode, you have to set the ROOT_DIR variable explicitly to /usr (for
# example).
#
# This macro is to be called from within the FindSalomeXXXX.cmake file.
#
-####
-MACRO(SALOME_FIND_PACKAGE englobPkg stdPkg mode)
- SET(_OPT_ARG ${ARGV3})
- # Only bother if the package was not already found:
- # Some old packages use the lower case version - standard should be to always use
- # upper case:
- STRING(TOUPPER ${stdPkg} stdPkgUC)
- IF(NOT (${stdPkg}_FOUND OR ${stdPkgUC}_FOUND))
- IF(${englobPkg}_FIND_QUIETLY OR _OPT_ARG)
- SET(_tmp_quiet "QUIET")
- ELSE()
- SET(_tmp_quiet)
- ENDIF()
- IF(${englobPkg}_FIND_REQUIRED AND NOT _OPT_ARG)
- SET(_tmp_req "REQUIRED")
- ELSE()
- SET(_tmp_req)
- ENDIF()
- IF(${englobPkg}_FIND_VERSION_EXACT)
- SET(_tmp_exact "EXACT")
- ELSE()
- SET(_tmp_exact)
- ENDIF()
+macro(SALOME_FIND_PACKAGE englobPkg stdPkg mode)
+ set(_OPT_ARG ${ARGV3})
+ # Only bother if the package was not already found: Some old packages use the
+ # lower case version - standard should be to always use upper case:
+ string(TOUPPER ${stdPkg} stdPkgUC)
+ if(NOT (${stdPkg}_FOUND OR ${stdPkgUC}_FOUND))
+ if(${englobPkg}_FIND_QUIETLY OR _OPT_ARG)
+ set(_tmp_quiet "QUIET")
+ else()
+ set(_tmp_quiet)
+ endif()
+ if(${englobPkg}_FIND_REQUIRED AND NOT _OPT_ARG)
+ set(_tmp_req "REQUIRED")
+ else()
+ set(_tmp_req)
+ endif()
+ if(${englobPkg}_FIND_VERSION_EXACT)
+ set(_tmp_exact "EXACT")
+ else()
+ set(_tmp_exact)
+ endif()
# Call the CMake FIND_PACKAGE() command:
- STRING(TOLOWER ${stdPkg} _pkg_lc)
- IF(("${mode}" STREQUAL "NO_MODULE") OR ("${mode}" STREQUAL "CONFIG"))
- # Hope to find direclty a CMake config file, indicating the SALOME CMake file
- # paths (the command already looks in places like "share/cmake", etc ... by default)
- # Note the options NO_CMAKE_BUILDS_PATH, NO_CMAKE_PACKAGE_REGISTRY to avoid (under Windows)
- # looking into a previous CMake build done via a GUI, or into the Win registry.
- # NO_CMAKE_SYSTEM_PATH and NO_SYSTEM_ENVIRONMENT_PATH ensure any _system_ files like 'xyz-config.cmake'
- # don't get loaded (typically Boost). To force their loading, set the XYZ_ROOT_DIR variable to '/usr'.
- # See documentation of FIND_PACKAGE() for full details.
+ string(TOLOWER ${stdPkg} _pkg_lc)
+ if(("${mode}" STREQUAL "NO_MODULE") OR ("${mode}" STREQUAL "CONFIG"))
+ # Hope to find direclty a CMake config file, indicating the SALOME CMake
+ # file paths (the command already looks in places like "share/cmake", etc
+ # ... by default) Note the options NO_CMAKE_BUILDS_PATH,
+ # NO_CMAKE_PACKAGE_REGISTRY to avoid (under Windows) looking into a
+ # previous CMake build done via a GUI, or into the Win registry.
+ # NO_CMAKE_SYSTEM_PATH and NO_SYSTEM_ENVIRONMENT_PATH ensure any _system_
+ # files like 'xyz-config.cmake' don't get loaded (typically Boost). To
+ # force their loading, set the XYZ_ROOT_DIR variable to '/usr'. See
+ # documentation of FIND_PACKAGE() for full details.
# Do we need to call the signature using components?
- IF(${englobPkg}_FIND_COMPONENTS)
- FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
- NO_MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS}
- PATH_SUFFIXES "salome_adm/cmake_files" "adm_local/cmake_files" "adm/cmake"
- NO_CMAKE_BUILDS_PATH NO_CMAKE_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PATH
- NO_SYSTEM_ENVIRONMENT_PATH)
- ELSE()
- FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
- NO_MODULE ${_tmp_quiet} ${_tmp_req}
- PATH_SUFFIXES "salome_adm/cmake_files" "adm_local/cmake_files" "adm/cmake"
- NO_CMAKE_BUILDS_PATH NO_CMAKE_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PACKAGE_REGISTRY NO_CMAKE_SYSTEM_PATH
- NO_SYSTEM_ENVIRONMENT_PATH)
- ENDIF()
- MARK_AS_ADVANCED(${stdPkg}_DIR)
-
- ELSEIF("${mode}" STREQUAL "MODULE")
+ if(${englobPkg}_FIND_COMPONENTS)
+ find_package(
+ ${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} NO_MODULE
+ ${_tmp_quiet} ${_tmp_req}
+ COMPONENTS ${${englobPkg}_FIND_COMPONENTS}
+ PATH_SUFFIXES
+ "salome_adm/cmake_files"
+ "adm_local/cmake_files"
+ "adm/cmake"
+ NO_CMAKE_BUILDS_PATH
+ NO_CMAKE_PACKAGE_REGISTRY
+ NO_CMAKE_SYSTEM_PACKAGE_REGISTRY
+ NO_CMAKE_SYSTEM_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH)
+ else()
+ find_package(
+ ${stdPkg}
+ ${${englobPkg}_FIND_VERSION}
+ ${_tmp_exact}
+ NO_MODULE
+ ${_tmp_quiet}
+ ${_tmp_req}
+ PATH_SUFFIXES
+ "salome_adm/cmake_files"
+ "adm_local/cmake_files"
+ "adm/cmake"
+ NO_CMAKE_BUILDS_PATH
+ NO_CMAKE_PACKAGE_REGISTRY
+ NO_CMAKE_SYSTEM_PACKAGE_REGISTRY
+ NO_CMAKE_SYSTEM_PATH
+ NO_SYSTEM_ENVIRONMENT_PATH)
+ endif()
+ mark_as_advanced(${stdPkg}_DIR)
+
+ elseif("${mode}" STREQUAL "MODULE")
# Do we need to call the signature using components?
- IF(${englobPkg}_FIND_COMPONENTS)
- FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
- MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS})
- ELSE()
- FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
- MODULE ${_tmp_quiet} ${_tmp_req})
- ENDIF()
-
- ELSE()
-
- MESSAGE(FATAL_ERROR "Invalid mode argument in the call to the macro SALOME_FIND_PACKAGE. Should be CONFIG or MODULE.")
-
- ENDIF()
+ if(${englobPkg}_FIND_COMPONENTS)
+ find_package(
+ ${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact} MODULE
+ ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS})
+ else()
+ find_package(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
+ MODULE ${_tmp_quiet} ${_tmp_req})
+ endif()
+
+ else()
+
+ message(
+ FATAL_ERROR
+ "Invalid mode argument in the call to the macro SALOME_FIND_PACKAGE. Should be CONFIG or MODULE."
+ )
- ENDIF()
-ENDMACRO()
+ endif()
+ endif()
+endmacro()
-####################################################################
-# SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(pkg referenceVariable upCount)
-# pkg : name of the system package to be detected
-# referenceVariable: variable containing a path that can be browsed up to
-# retrieve the package root directory (xxx_ROOT_DIR)
-# upCount : number of times we have to go up from the path <referenceVariable>
-# to obtain the package root directory.
-# If this is a path to a file, going up one time gives the directory containing the file
-# going up 2 times gives the parent directory.
+# ##############################################################################
+# SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(pkg referenceVariable upCount) pkg :
+# name of the system package to be detected referenceVariable: variable
+# containing a path that can be browsed up to retrieve the package root
+# directory (xxx_ROOT_DIR) upCount : number of times we have to go up
+# from the path <referenceVariable> to obtain the package root directory. If
+# this is a path to a file, going up one time gives the directory containing the
+# file going up 2 times gives the parent directory.
#
# For example: SALOME_FIND_PACKAGE_DETECT_CONFLICTS(SWIG SWIG_EXECUTABLE 2)
-# with SWIG_EXECUTABLE set to '/usr/bin/swig'
-# will produce '/usr'
-#
-# Generic detection (and conflict check) procedure for package XYZ:
-# 1. Load a potential env variable XYZ_ROOT_DIR as a default choice for the cache entry XYZ_ROOT_DIR
-# If empty, load a potential XYZ_ROOT_DIR_EXP as default value (path exposed by another package depending
-# directly on XYZ)
-# 2. Invoke FIND_PACKAGE() in this order:
-# * in CONFIG mode first (if possible): priority is given to a potential
-# "XYZ-config.cmake" file
-# * then switch to the standard MODULE mode, appending on CMAKE_PREFIX_PATH
-# the above XYZ_ROOT_DIR variable
-# 3. Extract the path actually found into a temp variable _XYZ_TMP_DIR
-# 4. Warn if XYZ_ROOT_DIR is set and doesn't match what was found (e.g. when CMake found the system installation
-# instead of what is pointed to by XYZ_ROOT_DIR - happens when a typo in the content of XYZ_ROOT_DIR).
-# 5. Conflict detection:
-# * check the temp variable against a potentially existing XYZ_ROOT_DIR_EXP
-# 6. Finally expose what was *actually* found in XYZ_ROOT_DIR.
-# 7. Specific stuff: for example exposing a prerequisite of XYZ to the rest of the world for future
+# with SWIG_EXECUTABLE set to '/usr/bin/swig' will produce '/usr'
+#
+# Generic detection (and conflict check) procedure for package XYZ: 1. Load a
+# potential env variable XYZ_ROOT_DIR as a default choice for the cache entry
+# XYZ_ROOT_DIR If empty, load a potential XYZ_ROOT_DIR_EXP as default value
+# (path exposed by another package depending directly on XYZ) 2. Invoke
+# FIND_PACKAGE() in this order: * in CONFIG mode first (if possible): priority
+# is given to a potential "XYZ-config.cmake" file * then switch to the standard
+# MODULE mode, appending on CMAKE_PREFIX_PATH the above XYZ_ROOT_DIR variable 3.
+# Extract the path actually found into a temp variable _XYZ_TMP_DIR 4. Warn if
+# XYZ_ROOT_DIR is set and doesn't match what was found (e.g. when CMake found
+# the system installation instead of what is pointed to by XYZ_ROOT_DIR -
+# happens when a typo in the content of XYZ_ROOT_DIR). 5. Conflict detection: *
+# check the temp variable against a potentially existing XYZ_ROOT_DIR_EXP 6.
+# Finally expose what was *actually* found in XYZ_ROOT_DIR. 7. Specific stuff:
+# for example exposing a prerequisite of XYZ to the rest of the world for future
# conflict detection. This is added after the call to the macro by the callee.
#
-MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
- ##
- ## 0. Initialization
- ##
- PARSE_ARGUMENTS(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS "ENVVAR" "" ${ARGN})
+macro(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
+ #
+ # 1. Initialization
+ #
+ parse_arguments(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS "ENVVAR" "" ${ARGN})
# Package name, upper case
- STRING(TOUPPER ${pkg} pkg_UC)
-
- ##
- ## 1. Load environment or any previously detected root dir for the package
- ##
- SET(_envvar ${pkg_UC}_ROOT_DIR)
- IF(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_ENVVAR)
- SET(_envvar "${SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_ENVVAR}")
- ENDIF()
- IF(DEFINED ENV{${_envvar}})
- FILE(TO_CMAKE_PATH "$ENV{${_envvar}}" _${pkg_UC}_ROOT_DIR_ENV)
- SET(_dflt_value "${_${pkg_UC}_ROOT_DIR_ENV}")
- ELSE()
+ string(TOUPPER ${pkg} pkg_UC)
+
+ #
+ # 1. Load environment or any previously detected root dir for the package
+ #
+ set(_envvar ${pkg_UC}_ROOT_DIR)
+ if(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_ENVVAR)
+ set(_envvar "${SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_ENVVAR}")
+ endif()
+ if(DEFINED ENV{${_envvar}})
+ file(TO_CMAKE_PATH "$ENV{${_envvar}}" _${pkg_UC}_ROOT_DIR_ENV)
+ set(_dflt_value "${_${pkg_UC}_ROOT_DIR_ENV}")
+ else()
# will be blank if no package was previously loaded:
- SET(_dflt_value "${${pkg_UC}_ROOT_DIR_EXP}")
- ENDIF()
+ set(_dflt_value "${${pkg_UC}_ROOT_DIR_EXP}")
+ endif()
# Detect if the variable has been set on the command line or elsewhere:
- IF(DEFINED ${_envvar})
- SET(_var_already_there TRUE)
- ELSE()
- SET(_var_already_there FALSE)
- ENDIF()
- # Make cache entry
- SET(${_envvar} "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory")
-
- ##
- ## 2. Find package - try CONFIG mode first (i.e. looking for XYZ-config.cmake)
- ##
-
- # Override the variable - don't append to it, as it would give precedence
- # to what was stored there before!
- IF(DEFINED ${_envvar})
- SET(CMAKE_PREFIX_PATH "${${_envvar}}")
- ENDIF()
-
- # Try find_package in config mode. This has the priority, but is
- # performed QUIET and not REQUIRED:
- SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} NO_MODULE TRUE)
-
- IF (${pkg_UC}_FOUND OR ${pkg}_FOUND)
- MESSAGE(STATUS "Found ${pkg} in CONFIG mode!")
- ENDIF()
-
- # Otherwise try the standard way (module mode, with the standard CMake Find*** macro):
- # We do it quietly to produce our own error message, except if we are in debug mode:
- IF(SALOME_CMAKE_DEBUG)
- SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} MODULE FALSE)
- ELSE()
- SALOME_FIND_PACKAGE("Salome${pkg}" ${pkg} MODULE TRUE)
- ENDIF()
+ if(DEFINED ${_envvar})
+ set(_var_already_there TRUE)
+ else()
+ set(_var_already_there FALSE)
+ endif()
+ # Make cache entry
+ set(${_envvar}
+ "${_dflt_value}"
+ CACHE PATH "Path to ${pkg_UC} directory")
+
+ #
+ # 1. Find package - try CONFIG mode first (i.e. looking for XYZ-config.cmake)
+ #
+
+ # Override the variable - don't append to it, as it would give precedence to
+ # what was stored there before!
+ if(DEFINED ${_envvar})
+ set(CMAKE_PREFIX_PATH "${${_envvar}}")
+ endif()
+
+ # Try find_package in config mode. This has the priority, but is performed
+ # QUIET and not REQUIRED:
+ salome_find_package("Salome${pkg}" ${pkg} NO_MODULE TRUE)
+
+ if(${pkg_UC}_FOUND OR ${pkg}_FOUND)
+ message(STATUS "Found ${pkg} in CONFIG mode!")
+ endif()
+
+ # Otherwise try the standard way (module mode, with the standard CMake Find***
+ # macro): We do it quietly to produce our own error message, except if we are
+ # in debug mode:
+ if(SALOME_CMAKE_DEBUG)
+ salome_find_package("Salome${pkg}" ${pkg} MODULE FALSE)
+ else()
+ salome_find_package("Salome${pkg}" ${pkg} MODULE TRUE)
+ endif()
# Set the "FOUND" variable for the SALOME wrapper:
- IF(${pkg_UC}_FOUND OR ${pkg}_FOUND)
- SET(SALOME${pkg_UC}_FOUND TRUE)
- ELSE()
- SET(SALOME${pkg_UC}_FOUND FALSE)
- IF(NOT Salome${pkg}_FIND_QUIETLY)
- IF(Salome${pkg}_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Package ${pkg} couldn't be found - did you set the corresponing root dir correctly? "
- "It currently contains ${_envvar}=${${_envvar}} "
- "Append -DSALOME_CMAKE_DEBUG=ON on the command line if you want to see the original CMake error.")
- ELSE()
- MESSAGE(WARNING "Package ${pkg} couldn't be found - did you set the corresponing root dir correctly? "
- "It currently contains ${_envvar}=${${_envvar}} "
- "Append -DSALOME_CMAKE_DEBUG=ON on the command line if you want to see the original CMake error.")
- ENDIF()
- ENDIF()
- ENDIF()
-
- IF (${pkg_UC}_FOUND OR ${pkg}_FOUND)
- ## 3. Set the root dir which was finally retained by going up "upDir" times
- ## from the given reference path. The variable "referenceVariable" may be a list.
- ## In this case we take its first element.
+ if(${pkg_UC}_FOUND OR ${pkg}_FOUND)
+ set(SALOME${pkg_UC}_FOUND TRUE)
+ else()
+ set(SALOME${pkg_UC}_FOUND FALSE)
+ if(NOT Salome${pkg}_FIND_QUIETLY)
+ if(Salome${pkg}_FIND_REQUIRED)
+ message(
+ FATAL_ERROR
+ "Package ${pkg} couldn't be found - did you set the corresponing root dir correctly? "
+ "It currently contains ${_envvar}=${${_envvar}} "
+ "Append -DSALOME_CMAKE_DEBUG=ON on the command line if you want to see the original CMake error."
+ )
+ else()
+ message(
+ WARNING
+ "Package ${pkg} couldn't be found - did you set the corresponing root dir correctly? "
+ "It currently contains ${_envvar}=${${_envvar}} "
+ "Append -DSALOME_CMAKE_DEBUG=ON on the command line if you want to see the original CMake error."
+ )
+ endif()
+ endif()
+ endif()
+
+ if(${pkg_UC}_FOUND OR ${pkg}_FOUND)
+ # 1. Set the root dir which was finally retained by going up "upDir" times
+ # from the given reference path. The variable "referenceVariable" may be a
+ # list. In this case we take its first element.
# First test if the variable exists, warn otherwise:
- IF(NOT DEFINED ${referenceVariable})
- MESSAGE(WARNING "${pkg}: the reference variable '${referenceVariable}' used when calling the macro "
- "SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS() is not defined.")
- ENDIF()
-
- LIST(LENGTH ${referenceVariable} _tmp_len)
- IF(_tmp_len)
- LIST(GET ${referenceVariable} 0 _tmp_ROOT_DIR)
- ELSE()
- # Note the double de-reference of "referenceVariable":
- SET(_tmp_ROOT_DIR "${${referenceVariable}}")
- ENDIF()
+ if(NOT DEFINED ${referenceVariable})
+ message(
+ WARNING
+ "${pkg}: the reference variable '${referenceVariable}' used when calling the macro "
+ "SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS() is not defined.")
+ endif()
+
+ list(LENGTH ${referenceVariable} _tmp_len)
+ if(_tmp_len)
+ list(GET ${referenceVariable} 0 _tmp_ROOT_DIR)
+ else()
+ # Note the double de-reference of "referenceVariable":
+ set(_tmp_ROOT_DIR "${${referenceVariable}}")
+ endif()
# Up cound can be reset by detection procedure
- SET(_upCount ${upCount})
- IF(DEFINED ${pkg_UC}_UPCOUNT)
- SET(_upCount ${${pkg_UC}_UPCOUNT})
- ENDIF()
- IF(${_upCount})
- FOREACH(_unused RANGE 1 ${_upCount})
- GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
- ENDFOREACH()
- ENDIF()
-
- ##
- ## 4. Warn if CMake found something not located under ENV(XYZ_ROOT_DIR)
- ##
- IF(DEFINED ENV{${_envvar}})
- SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${_${pkg_UC}_ROOT_DIR_ENV}")
- IF(NOT _res)
- MESSAGE(WARNING "${pkg} was found, but not at the path given by the "
+ set(_upCount ${upCount})
+ if(DEFINED ${pkg_UC}_UPCOUNT)
+ set(_upCount ${${pkg_UC}_UPCOUNT})
+ endif()
+ if(${_upCount})
+ foreach(_unused RANGE 1 ${_upCount})
+ get_filename_component(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
+ endforeach()
+ endif()
+
+ #
+ # 1. Warn if CMake found something not located under ENV(XYZ_ROOT_DIR)
+ #
+ if(DEFINED ENV{${_envvar}})
+ salome_check_equal_paths(_res "${_tmp_ROOT_DIR}"
+ "${_${pkg_UC}_ROOT_DIR_ENV}")
+ if(NOT _res)
+ message(
+ WARNING
+ "${pkg} was found, but not at the path given by the "
"environment ${_envvar}! Is the variable correctly set? "
- "The two paths are: ${_tmp_ROOT_DIR} and: ${_${pkg_UC}_ROOT_DIR_ENV}")
-
- ELSE()
- MESSAGE(STATUS "${pkg} found directory matches what was specified in the ${_envvar} variable, all good!")
- ENDIF()
- ELSE()
- IF(NOT _var_already_there)
- MESSAGE(STATUS "Variable ${_envvar} was not explicitly defined. "
- "An installation was found anyway: ${_tmp_ROOT_DIR}")
- ENDIF()
- ENDIF()
-
- ##
- ## 5. Conflict detection
- ## From another prerequisite using the package:
- ##
- IF(${pkg_UC}_ROOT_DIR_EXP)
- SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${${pkg_UC}_ROOT_DIR_EXP}")
- IF(NOT _res)
- MESSAGE(WARNING "Warning: ${pkg}: detected version conflicts with a previously found ${pkg}!"
- " The two paths are " ${_tmp_ROOT_DIR} " vs " ${${pkg_UC}_ROOT_DIR_EXP})
- ELSE()
- MESSAGE(STATUS "${pkg} directory matches what was previously exposed by another prereq, all good!")
- ENDIF()
- ENDIF()
-
- ##
- ## 6. Save the detected installation
- ##
- SET(${_envvar} "${_tmp_ROOT_DIR}")
-
- ELSE()
- MESSAGE(STATUS "${pkg} was not found.")
- ENDIF()
-
- SET(Salome${pkg}_FOUND "${pkg}_FOUND")
-ENDMACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS)
-
-
-####################################################################
+ "The two paths are: ${_tmp_ROOT_DIR} and: ${_${pkg_UC}_ROOT_DIR_ENV}"
+ )
+
+ else()
+ message(
+ STATUS
+ "${pkg} found directory matches what was specified in the ${_envvar} variable, all good!"
+ )
+ endif()
+ else()
+ if(NOT _var_already_there)
+ message(STATUS "Variable ${_envvar} was not explicitly defined. "
+ "An installation was found anyway: ${_tmp_ROOT_DIR}")
+ endif()
+ endif()
+
+ #
+ # 1. Conflict detection From another prerequisite using the package:
+ #
+ if(${pkg_UC}_ROOT_DIR_EXP)
+ salome_check_equal_paths(_res "${_tmp_ROOT_DIR}"
+ "${${pkg_UC}_ROOT_DIR_EXP}")
+ if(NOT _res)
+ message(
+ WARNING
+ "Warning: ${pkg}: detected version conflicts with a previously found ${pkg}!"
+ " The two paths are "
+ ${_tmp_ROOT_DIR}
+ " vs "
+ ${${pkg_UC}_ROOT_DIR_EXP})
+ else()
+ message(
+ STATUS
+ "${pkg} directory matches what was previously exposed by another prereq, all good!"
+ )
+ endif()
+ endif()
+
+ #
+ # 1. Save the detected installation
+ #
+ set(${_envvar} "${_tmp_ROOT_DIR}")
+
+ else()
+ message(STATUS "${pkg} was not found.")
+ endif()
+
+ set(Salome${pkg}_FOUND "${pkg}_FOUND")
+endmacro(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS)
+
+# ##############################################################################
# SALOME_ADD_MPI_TO_HDF5()
#
-# Overload the HDF5 flags so that they also contain MPI references.
-# This is to be used when HDF5 was compiled with MPI support;
-MACRO(SALOME_ADD_MPI_TO_HDF5)
- SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_INCLUDE_DIRS})
- SET(HDF5_DEFINITIONS "${HDF5_DEFINITIONS} ${MPI_DEFINITIONS}")
- SET(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_LIBRARIES})
-ENDMACRO(SALOME_ADD_MPI_TO_HDF5)
-
-####################################################################
-# SALOME_TOHEXA()
-# Convert a number (smaller than 16) into hexadecimal representation
-# with a leading 0.
-MACRO(SALOME_TOHEXA num result)
- SET(_hexa_map a b c d e f)
- IF(${num} LESS 10)
- SET(${result} "0${num}")
- ELSE()
- MATH(EXPR _res "${num}-10" )
- LIST(GET _hexa_map ${_res} _out)
- SET(${result} "0${_out}")
- ENDIF()
-ENDMACRO(SALOME_TOHEXA)
-
-####################################################################
+# Overload the HDF5 flags so that they also contain MPI references. This is to
+# be used when HDF5 was compiled with MPI support;
+macro(SALOME_ADD_MPI_TO_HDF5)
+ set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_INCLUDE_DIRS})
+ set(HDF5_DEFINITIONS "${HDF5_DEFINITIONS} ${MPI_DEFINITIONS}")
+ set(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_LIBRARIES})
+endmacro(SALOME_ADD_MPI_TO_HDF5)
+
+# ##############################################################################
+# SALOME_TOHEXA() Convert a number (smaller than 16) into hexadecimal
+# representation with a leading 0.
+macro(SALOME_TOHEXA num result)
+ set(_hexa_map a b c d e f)
+ if(${num} LESS 10)
+ set(${result} "0${num}")
+ else()
+ math(EXPR _res "${num}-10")
+ list(GET _hexa_map ${_res} _out)
+ set(${result} "0${_out}")
+ endif()
+endmacro(SALOME_TOHEXA)
+
+# ##############################################################################
# SALOME_XVERSION()
#
# Computes hexadecimal version of SALOME package
#
# package: IN: SALOME package name
#
-# The macro reads SALOME package version from PACKAGE_VERSION variable
-# (note package name in uppercase as assumed for SALOME modules);
-# hexadecimal version value in form 0xAABBCC (where AA, BB and CC are
-# major, minor and maintenance components of package version in
-# hexadecimal form) is put to the PACKAGE_XVERSION variable
-MACRO(SALOME_XVERSION pkg)
- STRING(TOUPPER ${pkg} _pkg_UC)
- IF(${_pkg_UC}_VERSION)
- SET(_major)
- SET(_minor)
- SET(_patch)
- SALOME_TOHEXA(${${_pkg_UC}_MAJOR_VERSION} _major)
- SALOME_TOHEXA(${${_pkg_UC}_MINOR_VERSION} _minor)
- SALOME_TOHEXA(${${_pkg_UC}_PATCH_VERSION} _patch)
- SET(${_pkg_UC}_XVERSION "0x${_major}${_minor}${_patch}")
- ENDIF()
-ENDMACRO(SALOME_XVERSION)
-
-
-#########################################################################
+# The macro reads SALOME package version from PACKAGE_VERSION variable (note
+# package name in uppercase as assumed for SALOME modules); hexadecimal version
+# value in form 0xAABBCC (where AA, BB and CC are major, minor and maintenance
+# components of package version in hexadecimal form) is put to the
+# PACKAGE_XVERSION variable
+macro(SALOME_XVERSION pkg)
+ string(TOUPPER ${pkg} _pkg_UC)
+ if(${_pkg_UC}_VERSION)
+ set(_major)
+ set(_minor)
+ set(_patch)
+ salome_tohexa(${${_pkg_UC}_MAJOR_VERSION} _major)
+ salome_tohexa(${${_pkg_UC}_MINOR_VERSION} _minor)
+ salome_tohexa(${${_pkg_UC}_PATCH_VERSION} _patch)
+ set(${_pkg_UC}_XVERSION "0x${_major}${_minor}${_patch}")
+ endif()
+endmacro(SALOME_XVERSION)
+
+# ##############################################################################
# SALOME_ACCUMULATE_HEADERS()
#
# This macro is called in the various FindSalomeXYZ.cmake modules to accumulate
-# internally the list of include headers to be saved for future export.
-# The full set of include is saved in a variable called
-# _${PROJECT_NAME}_EXTRA_HEADERS
-#
-MACRO(SALOME_ACCUMULATE_HEADERS lst)
- FOREACH(l IN LISTS ${lst})
- LIST(FIND _${PROJECT_NAME}_EXTRA_HEADERS "${l}" _res)
- IF(_res EQUAL "-1")
- IF(NOT "${l}" STREQUAL "/usr/include")
- LIST(APPEND _${PROJECT_NAME}_EXTRA_HEADERS "${l}")
- ENDIF()
- ENDIF()
- ENDFOREACH()
-ENDMACRO(SALOME_ACCUMULATE_HEADERS)
-
-#########################################################################
+# internally the list of include headers to be saved for future export. The full
+# set of include is saved in a variable called _${PROJECT_NAME}_EXTRA_HEADERS
+#
+macro(SALOME_ACCUMULATE_HEADERS lst)
+ foreach(l IN LISTS ${lst})
+ list(FIND _${PROJECT_NAME}_EXTRA_HEADERS "${l}" _res)
+ if(_res EQUAL "-1")
+ if(NOT "${l}" STREQUAL "/usr/include")
+ list(APPEND _${PROJECT_NAME}_EXTRA_HEADERS "${l}")
+ endif()
+ endif()
+ endforeach()
+endmacro(SALOME_ACCUMULATE_HEADERS)
+
+# ##############################################################################
# SALOME_ACCUMULATE_ENVIRONMENT()
#
# USAGE: SALOME_ACCUMULATE_ENVIRONMENT(envvar value [value ...])
#
-# ARGUMENTS:
-# envvar [in] environment variable name, e.g. PATH
-# value [in] value(s) to be added to environment variable
+# ARGUMENTS: envvar [in] environment variable name, e.g. PATH value [in]
+# value(s) to be added to environment variable
#
-# This macro is called in the various FindSalomeXYZ.cmake modules to
-# accumulate environment variables, to be used later to run some command
-# in proper environment.
+# This macro is called in the various FindSalomeXYZ.cmake modules to accumulate
+# environment variables, to be used later to run some command in proper
+# environment.
#
# 1. Each envrironment variable is stored in specific CMake variable
# _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable.
# 2. Full list of environment variable names is stored in CMake variable
# _${PROJECT_NAME}_EXTRA_ENV.
#
-# Notes:
-# - The arguments list can include optional CHECK or NOCHECK keywords:
-# * For all arguments following CHECK keyword the macro perform an
-# additional check (see below); this is the default mode, it is suitable
-# for path variables (PATH, LD_LIBRARY_PATH, etc).
-# * For all arguments following NOCHECK keyword, no additional check is
-# performed.
-# Checking an argument means that we check:
-# - That the path actually exists
-# - That this is not a standard system path (starting with "/usr"); this avoids
-# polluting LD_LIBRARY_PATH or PATH with things like "/usr/lib64" ...
-#
-MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar)
- SET(_is_check ON)
- FOREACH(_item ${ARGN})
- IF(${_item} STREQUAL "NOCHECK")
- SET(_is_check OFF)
- ELSEIF(${_item} STREQUAL "CHECK")
- SET(_is_check ON)
- ELSE()
- IF(_is_check)
- IF(NOT IS_DIRECTORY ${_item})
- IF(TARGET ${_item})
- GET_TARGET_PROPERTY(_item ${_item} LOCATION)
- ENDIF()
- GET_FILENAME_COMPONENT(_item ${_item} PATH)
- ENDIF()
- IF(EXISTS ${_item})
- STRING(REGEX MATCH "^(/usr|/lib|/bin)" _usr_find ${_item})
- LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
- IF(NOT _usr_find AND _res EQUAL -1)
- LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
- ENDIF()
- ENDIF()
- ELSE(_is_check)
- LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
- IF( _res EQUAL -1)
- LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
- ENDIF()
- ENDIF(_is_check)
- ENDIF()
- ENDFOREACH()
-
- LIST(FIND _${PROJECT_NAME}_EXTRA_ENV ${envvar} _res)
- IF(_res EQUAL -1)
- LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV ${envvar})
- ENDIF()
- SET(_${PROJECT_NAME}_EXTRA_ENV_FULL "SET\(${PROJECT_NAME}_EXTRA_ENV ${_${PROJECT_NAME}_EXTRA_ENV}\)")
- FOREACH(_res ${_${PROJECT_NAME}_EXTRA_ENV})
- STRING(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}" _res_path "${_${PROJECT_NAME}_EXTRA_ENV_${_res}}")
- SET(_${PROJECT_NAME}_EXTRA_ENV_FULL "${_${PROJECT_NAME}_EXTRA_ENV_FULL}\nSET\(${PROJECT_NAME}_EXTRA_ENV_${_res} ${_res_path}\)")
- ENDFOREACH()
-ENDMACRO(SALOME_ACCUMULATE_ENVIRONMENT)
-
-#########################################################################
+# Notes: - The arguments list can include optional CHECK or NOCHECK keywords: *
+# For all arguments following CHECK keyword the macro perform an additional
+# check (see below); this is the default mode, it is suitable for path variables
+# (PATH, LD_LIBRARY_PATH, etc). * For all arguments following NOCHECK keyword,
+# no additional check is performed. Checking an argument means that we check: -
+# That the path actually exists - That this is not a standard system path
+# (starting with "/usr"); this avoids polluting LD_LIBRARY_PATH or PATH with
+# things like "/usr/lib64" ...
+#
+macro(SALOME_ACCUMULATE_ENVIRONMENT envvar)
+ set(_is_check ON)
+ foreach(_item ${ARGN})
+ if(${_item} STREQUAL "NOCHECK")
+ set(_is_check OFF)
+ elseif(${_item} STREQUAL "CHECK")
+ set(_is_check ON)
+ else()
+ if(_is_check)
+ if(NOT IS_DIRECTORY ${_item})
+ if(TARGET ${_item})
+ get_target_property(_item ${_item} LOCATION)
+ endif()
+ get_filename_component(_item ${_item} PATH)
+ endif()
+ if(EXISTS ${_item})
+ string(REGEX MATCH "^(/usr|/lib|/bin)" _usr_find ${_item})
+ list(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
+ if(NOT _usr_find AND _res EQUAL -1)
+ list(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
+ endif()
+ endif()
+ else(_is_check)
+ list(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
+ if(_res EQUAL -1)
+ list(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
+ endif()
+ endif(_is_check)
+ endif()
+ endforeach()
+
+ list(FIND _${PROJECT_NAME}_EXTRA_ENV ${envvar} _res)
+ if(_res EQUAL -1)
+ list(APPEND _${PROJECT_NAME}_EXTRA_ENV ${envvar})
+ endif()
+ set(_${PROJECT_NAME}_EXTRA_ENV_FULL
+ "SET\(${PROJECT_NAME}_EXTRA_ENV ${_${PROJECT_NAME}_EXTRA_ENV}\)")
+ foreach(_res ${_${PROJECT_NAME}_EXTRA_ENV})
+ string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}" _res_path
+ "${_${PROJECT_NAME}_EXTRA_ENV_${_res}}")
+ set(_${PROJECT_NAME}_EXTRA_ENV_FULL
+ "${_${PROJECT_NAME}_EXTRA_ENV_FULL}\nSET\(${PROJECT_NAME}_EXTRA_ENV_${_res} ${_res_path}\)"
+ )
+ endforeach()
+endmacro(SALOME_ACCUMULATE_ENVIRONMENT)
+
+# ##############################################################################
# SALOME_GENERATE_ENVIRONMENT_SCRIPT()
#
# USAGE: SALOME_GENERATE_ENVIRONMENT_SCRIPT(output script cmd opts)
#
-# ARGUMENTS:
-# output [out] output command, e.g. for creation of target.
-# script [in] output environement script name
-# cmd [in] input command, e.g. sphinx or python command.
-# opts [in] options for input command (cmd).
-#
-# This macro is called when it's necessary to use given environment to run some command.
-# Macro generates environement script using previously created variables
-# _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable and
-# _${PROJECT_NAME}_EXTRA_ENV (see marco SALOME_ACCUMULATE_ENVIRONMENT);
-# and puts generated command in proper environment into <output> argument.
-#
-# Notes:
-# - If <script> is specified as relative path, it is computed from the current build
-# directory.
-#
-MACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)
- IF(IS_ABSOLUTE ${script})
- SET(_script ${script})
- ELSE()
- SET(_script ${CMAKE_CURRENT_BINARY_DIR}/${script})
- ENDIF()
-
- IF(WIN32)
- SET(_ext "bat")
- SET(_call_cmd "call")
- ELSE()
- SET(_ext "sh")
- SET(_call_cmd ".")
- ENDIF()
-
- SET(_env)
- FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
- FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
- IF(WIN32)
- IF(${_item} STREQUAL "LD_LIBRARY_PATH")
- SET(_item PATH)
- ENDIF()
- STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n")
- ELSEIF(APPLE)
- IF(${_item} STREQUAL "LD_LIBRARY_PATH")
- SET(_env "${_env} export DYLD_LIBRARY_PATH=${_val}:\${DYLD_LIBRARY_PATH}\n")
- ELSE()
- SET(_env "${_env} export ${_item}=${_val}:\${${_item}}\n")
- ENDIF()
- ELSE()
- SET(_env "${_env} export ${_item}=${_val}:\${${_item}}\n")
- ENDIF()
- ENDFOREACH()
- ENDFOREACH()
-
- SET(_script ${_script}.${_ext})
- FILE(WRITE ${_script} "${_env}")
-
- SET(${output} ${_call_cmd} ${_script} && ${cmd} ${opts})
-
-ENDMACRO(SALOME_GENERATE_ENVIRONMENT_SCRIPT)
-
-#########################################################################
+# ARGUMENTS: output [out] output command, e.g. for creation of target. script
+# [in] output environement script name cmd [in] input command, e.g. sphinx
+# or python command. opts [in] options for input command (cmd).
+#
+# This macro is called when it's necessary to use given environment to run some
+# command. Macro generates environement script using previously created
+# variables _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable
+# and _${PROJECT_NAME}_EXTRA_ENV (see marco SALOME_ACCUMULATE_ENVIRONMENT); and
+# puts generated command in proper environment into <output> argument.
+#
+# Notes: - If <script> is specified as relative path, it is computed from the
+# current build directory.
+#
+macro(SALOME_GENERATE_ENVIRONMENT_SCRIPT output script cmd opts)
+ if(IS_ABSOLUTE ${script})
+ set(_script ${script})
+ else()
+ set(_script ${CMAKE_CURRENT_BINARY_DIR}/${script})
+ endif()
+
+ if(WIN32)
+ set(_ext "bat")
+ set(_call_cmd "call")
+ else()
+ set(_ext "sh")
+ set(_call_cmd ".")
+ endif()
+
+ set(_env)
+ foreach(_item ${_${PROJECT_NAME}_EXTRA_ENV})
+ foreach(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
+ if(WIN32)
+ if(${_item} STREQUAL "LD_LIBRARY_PATH")
+ set(_item PATH)
+ endif()
+ string(REPLACE "/" "\\" _env
+ "${_env} @SET ${_item}=${_val};%${_item}%\n")
+ elseif(APPLE)
+ if(${_item} STREQUAL "LD_LIBRARY_PATH")
+ set(_env
+ "${_env} export DYLD_LIBRARY_PATH=${_val}:\${DYLD_LIBRARY_PATH}\n"
+ )
+ else()
+ set(_env "${_env} export ${_item}=${_val}:\${${_item}}\n")
+ endif()
+ else()
+ set(_env "${_env} export ${_item}=${_val}:\${${_item}}\n")
+ endif()
+ endforeach()
+ endforeach()
+
+ set(_script ${_script}.${_ext})
+ file(WRITE ${_script} "${_env}")
+
+ set(${output} ${_call_cmd} ${_script} && ${cmd} ${opts})
+
+endmacro(SALOME_GENERATE_ENVIRONMENT_SCRIPT)
+
+# ##############################################################################
# SALOME_GENERATE_TESTS_ENVIRONMENT()
#
# USAGE: SALOME_GENERATE_TESTS_ENVIRONMENT(output)
#
-# ARGUMENTS:
-# output [out] output environement variable.
-#
-# This macro generates <output> variable to use given environment to run some tests.
-# Macro generates environement variable using previously created variables
-# _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable and
-# _${PROJECT_NAME}_EXTRA_ENV (see marco SALOME_ACCUMULATE_ENVIRONMENT);
-# and puts this variable into <output> argument.
-#
-MACRO(SALOME_GENERATE_TESTS_ENVIRONMENT output)
- SET(_env)
- SET(_WIN_LD_LIBRARY OFF)
- FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
- IF(${_item} STREQUAL "LD_LIBRARY_PATH")
- SET(_WIN_LD_LIBRARY ON)
- ENDIF()
- SET(_env_${_item})
- FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
- IF(WIN32)
- STRING(REPLACE "/" "\\" _val "${_val}")
- SET(_env_${_item} "${_val};${_env_${_item}}")
- ELSE()
- SET(_env_${_item} "${_val}:${_env_${_item}}")
- ENDIF()
- ENDFOREACH()
- ENDFOREACH()
-
- IF(_WIN_LD_LIBRARY AND WIN32)
- SET(_env_PATH "${_env_PATH}$ENV{LD_LIBRARY_PATH};${_env_LD_LIBRARY_PATH}")
- ENDIF()
-
- IF(WIN32)
- SET(sep ",")
- ELSE()
- SET(sep ";")
- ENDIF()
-
- FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
- IF(WIN32)
- IF(NOT ${_item} STREQUAL "LD_LIBRARY_PATH")
- SET(_env "${_item}=$ENV{${_item}};${_env_${_item}}${sep}${_env}")
- ENDIF()
- ELSE()
- STRING(REPLACE ";" ":" _iii "$ENV{${_item}}")
- SET(_env "${_item}=${_iii}:${_env_${_item}}${sep}${_env}")
- ENDIF()
- ENDFOREACH()
-
- # Get module name as substring of "Salome<ModuleName>"
- STRING(REGEX MATCH "^Salome" _is_salome_project ${PROJECT_NAME})
- IF(_is_salome_project)
- STRING(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME)
- ELSE()
- SET(PRNAME ${PROJECT_NAME})
- ENDIF()
- SET(_env "${PRNAME}_ROOT_DIR=${CMAKE_INSTALL_PREFIX}${sep}${_env}")
-
- # Creating follow string for Windows environement:
- # "VAR1_ENV=1\;2\;3\;...\;...\;...;VAR2_ENV=1\;2\;3\;...\;...\;...;VAR3_ENV=1\;2\;3\;...\;...\;...;..."
- IF(WIN32)
- STRING(REGEX REPLACE "\\\\*;" "\\\\;" _env "${_env}")
- STRING(REGEX REPLACE "\\\\*;*," ";" _env "${_env}")
- ENDIF()
-
- SET(${output} "${_env}")
-
-ENDMACRO(SALOME_GENERATE_TESTS_ENVIRONMENT)
-
-#########################################################################
+# ARGUMENTS: output [out] output environement variable.
+#
+# This macro generates <output> variable to use given environment to run some
+# tests. Macro generates environement variable using previously created
+# variables _${PROJECT_NAME}_EXTRA_ENV_<var>, where <var> is name of variable
+# and _${PROJECT_NAME}_EXTRA_ENV (see marco SALOME_ACCUMULATE_ENVIRONMENT); and
+# puts this variable into <output> argument.
+#
+macro(SALOME_GENERATE_TESTS_ENVIRONMENT output)
+ set(_env)
+ set(_WIN_LD_LIBRARY OFF)
+ foreach(_item ${_${PROJECT_NAME}_EXTRA_ENV})
+ if(${_item} STREQUAL "LD_LIBRARY_PATH")
+ set(_WIN_LD_LIBRARY ON)
+ endif()
+ set(_env_${_item})
+ foreach(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
+ if(WIN32)
+ string(REPLACE "/" "\\" _val "${_val}")
+ set(_env_${_item} "${_val};${_env_${_item}}")
+ else()
+ set(_env_${_item} "${_val}:${_env_${_item}}")
+ endif()
+ endforeach()
+ endforeach()
+
+ if(_WIN_LD_LIBRARY AND WIN32)
+ set(_env_PATH "${_env_PATH}$ENV{LD_LIBRARY_PATH};${_env_LD_LIBRARY_PATH}")
+ endif()
+
+ if(WIN32)
+ set(sep ",")
+ else()
+ set(sep ";")
+ endif()
+
+ foreach(_item ${_${PROJECT_NAME}_EXTRA_ENV})
+ if(WIN32)
+ if(NOT ${_item} STREQUAL "LD_LIBRARY_PATH")
+ set(_env "${_item}=$ENV{${_item}};${_env_${_item}}${sep}${_env}")
+ endif()
+ else()
+ string(REPLACE ";" ":" _iii "$ENV{${_item}}")
+ set(_env "${_item}=${_iii}:${_env_${_item}}${sep}${_env}")
+ endif()
+ endforeach()
+
+ # Get module name as substring of "Salome<ModuleName>"
+ string(REGEX MATCH "^Salome" _is_salome_project ${PROJECT_NAME})
+ if(_is_salome_project)
+ string(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME)
+ else()
+ set(PRNAME ${PROJECT_NAME})
+ endif()
+ set(_env "${PRNAME}_ROOT_DIR=${CMAKE_INSTALL_PREFIX}${sep}${_env}")
+
+ # Creating follow string for Windows environement:
+ # "VAR1_ENV=1\;2\;3\;...\;...\;...;VAR2_ENV=1\;2\;3\;...\;...\;...;VAR3_ENV=1\;2\;3\;...\;...\;...;..."
+ if(WIN32)
+ string(REGEX REPLACE "\\\\*;" "\\\\;" _env "${_env}")
+ string(REGEX REPLACE "\\\\*;*," ";" _env "${_env}")
+ endif()
+
+ set(${output} "${_env}")
+
+endmacro(SALOME_GENERATE_TESTS_ENVIRONMENT)
+
+# ##############################################################################
# SALOME_APPEND_LIST_OF_LIST()
#
# USAGE: SALOME_APPEND_LIST_OF_LIST(result element_list)
#
-# Build a list of lists. The element_list is first parsed to convert it
-# from
-# a;b;c;d;e
-# to
-# a,b,c,d,e
+# Build a list of lists. The element_list is first parsed to convert it from
+# a;b;c;d;e to a,b,c,d,e
#
# It is then added to the big list 'result'. Hence 'result' looks like:
-# a,b,c,d,e;f,g,h; ...
+# a,b,c,d,e;f,g,h; ...
#
-MACRO(SALOME_APPEND_LIST_OF_LIST result element_list)
- SET(_tmp_res)
- STRING(REPLACE ";" "," _tmp_res "${${element_list}}")
+macro(SALOME_APPEND_LIST_OF_LIST result element_list)
+ set(_tmp_res)
+ string(REPLACE ";" "," _tmp_res "${${element_list}}")
# Yet another CMake stupidity - LIST(LENGTH ";" var) returns 0
- STRING(LENGTH result _list_len)
- IF(NOT _list_len EQUAL 0)
- SET(${result} "${${result}}${_tmp_res};") # LIST(APPEND ...) doesn't handle well empty elements!?
- ELSE()
- SET(${result} "${_tmp_res};") # to avoid redundant ';' at the beginning of the list
- ENDIF()
-
-ENDMACRO(SALOME_APPEND_LIST_OF_LIST)
-
-#########################################################################
+ string(LENGTH result _list_len)
+ if(NOT _list_len EQUAL 0)
+ set(${result} "${${result}}${_tmp_res};") # LIST(APPEND ...) doesn't handle
+ # well empty elements!?
+ else()
+ set(${result} "${_tmp_res};") # to avoid redundant ';' at the beginning of
+ # the list
+ endif()
+
+endmacro(SALOME_APPEND_LIST_OF_LIST)
+
+# ##############################################################################
# SALOME_CONFIGURE_PREPARE()
#
# USAGE: SALOME_CONFIGURE_PREPARE(pkg1 pkg2 ...)
#
-# Prepare the variable that will be used to configure the file Salome<MODULE>Config.cmake,
-# namely:
-# - _PREREQ_LIST : the list of level 1 external prerequisites
-# - _PREREQ_DIR_LIST : their corresponding CMake directories (i.e. where the CMake configuration
-# file for this package can be found, if there is any!)
-# - _PREREQ_COMPO_LIST: the list of components requested when this package was invoked
-#
-# All this information is built from the package_list, the list of level 1 packages for this module.
-# Only the packages found in CONFIG mode are retained.
-#
-MACRO(SALOME_CONFIGURE_PREPARE)
- SET(_tmp_prereq "${ARGV}")
- SET(_PREREQ_LIST)
- SET(_PREREQ_DIR_LIST)
- SET(_PREREQ_COMPO_LIST)
- FOREACH(_prereq IN LISTS _tmp_prereq)
- IF(${_prereq}_DIR)
- SET(_PREREQ_LIST "${_PREREQ_LIST} ${_prereq}")
- FILE(TO_CMAKE_PATH ${${_prereq}_DIR} CURR_DIR)
- SET(_PREREQ_DIR_LIST "${_PREREQ_DIR_LIST} \"${CURR_DIR}\"")
- SALOME_APPEND_LIST_OF_LIST(_PREREQ_COMPO_LIST Salome${_prereq}_COMPONENTS)
- ENDIF()
- ENDFOREACH()
-ENDMACRO(SALOME_CONFIGURE_PREPARE)
-
-#######################################################################
+# Prepare the variable that will be used to configure the file
+# Salome<MODULE>Config.cmake, namely: - _PREREQ_LIST : the list of level 1
+# external prerequisites - _PREREQ_DIR_LIST : their corresponding CMake
+# directories (i.e. where the CMake configuration file for this package can be
+# found, if there is any!) - _PREREQ_COMPO_LIST: the list of components
+# requested when this package was invoked
+#
+# All this information is built from the package_list, the list of level 1
+# packages for this module. Only the packages found in CONFIG mode are retained.
+#
+macro(SALOME_CONFIGURE_PREPARE)
+ set(_tmp_prereq "${ARGV}")
+ set(_PREREQ_LIST)
+ set(_PREREQ_DIR_LIST)
+ set(_PREREQ_COMPO_LIST)
+ foreach(_prereq IN LISTS _tmp_prereq)
+ if(${_prereq}_DIR)
+ set(_PREREQ_LIST "${_PREREQ_LIST} ${_prereq}")
+ file(TO_CMAKE_PATH ${${_prereq}_DIR} CURR_DIR)
+ set(_PREREQ_DIR_LIST "${_PREREQ_DIR_LIST} \"${CURR_DIR}\"")
+ salome_append_list_of_list(_PREREQ_COMPO_LIST Salome${_prereq}_COMPONENTS)
+ endif()
+ endforeach()
+endmacro(SALOME_CONFIGURE_PREPARE)
+
+# ##############################################################################
#
# From a version string like "2.7.12+" extract the major, minor and patch number
-# taking ONLY the numerical part.
-# This macro was created to treat Ubuntu Python version number where the libs are
-# version 2.7.12+ and the interp is 2.7.12 ...
-#
-MACRO(SALOME_EXTRACT_VERSION version_string major minor patch)
- IF(${version_string} MATCHES "[0-9]+[^0-9]*\\.[0-9]+[^0-9]*\\.*[0-9]*[^0-9]*")
- STRING(REGEX REPLACE "^([0-9]+)[^0-9]*\\.[0-9]+[^0-9]*\\.*[0-9]*[^0-9]*" "\\1" ${major} "${version_string}")
- STRING(REGEX REPLACE "^[0-9]+[^0-9]*\\.([0-9]+)[^0-9]*\\.*[0-9]*[^0-9]*" "\\1" ${minor} "${version_string}")
-
- IF(${version_string} MATCHES "[0-9]+[^0-9]*\\.[0-9]+[^0-9]*\\.[0-9]+[^0-9]*")
- # X.Y.Z format (python 3.5.2 ...)
- STRING(REGEX REPLACE "^[0-9]+[^0-9]*\\.[0-9]+[^0-9]*\\.([0-9]+)[^0-9]*" "\\1" ${patch} "${version_string}")
- ELSE()
- # X.Y format (python 3.5 ...)
- SET(${patch} "0")
- ENDIF()
- ELSE()
- MESSAGE("MACRO(SALOME_EXTRACT_VERSION ${version_string} ${major} ${minor} ${patch}")
- MESSAGE(FATAL_ERROR "Problem parsing version string, I can't parse it properly.")
- ENDIF()
-ENDMACRO(SALOME_EXTRACT_VERSION)
-
-#######################################################################
-#
-# This macro checks that swig files were generated.
-# It is requared under Windows platform, because sometimes under Windows platform
-# the genetarion of the swig wrappings tooks long time. And seems swig opens
-# file at the begining of generation process and after that swig
-# begins the generation of the content. In its turn Microsoft Visual Studio
-# tryes to compile file immediately after creation and as a result compilation breaks.
-MACRO(SWIG_CHECK_GENERATION swig_module)
- IF(WIN32)
- SET(SCRIPT
-"@echo off
+# taking ONLY the numerical part. This macro was created to treat Ubuntu Python
+# version number where the libs are version 2.7.12+ and the interp is 2.7.12 ...
+#
+macro(SALOME_EXTRACT_VERSION version_string major minor patch)
+ if(${version_string} MATCHES "[0-9]+[^0-9]*\\.[0-9]+[^0-9]*\\.*[0-9]*[^0-9]*")
+ string(REGEX REPLACE "^([0-9]+)[^0-9]*\\.[0-9]+[^0-9]*\\.*[0-9]*[^0-9]*"
+ "\\1" ${major} "${version_string}")
+ string(REGEX REPLACE "^[0-9]+[^0-9]*\\.([0-9]+)[^0-9]*\\.*[0-9]*[^0-9]*"
+ "\\1" ${minor} "${version_string}")
+
+ if(${version_string} MATCHES
+ "[0-9]+[^0-9]*\\.[0-9]+[^0-9]*\\.[0-9]+[^0-9]*")
+ # X.Y.Z format (python 3.5.2 ...)
+ string(REGEX REPLACE "^[0-9]+[^0-9]*\\.[0-9]+[^0-9]*\\.([0-9]+)[^0-9]*"
+ "\\1" ${patch} "${version_string}")
+ else()
+ # X.Y format (python 3.5 ...)
+ set(${patch} "0")
+ endif()
+ else()
+ message(
+ "MACRO(SALOME_EXTRACT_VERSION ${version_string} ${major} ${minor} ${patch}"
+ )
+ message(
+ FATAL_ERROR "Problem parsing version string, I can't parse it properly.")
+ endif()
+endmacro(SALOME_EXTRACT_VERSION)
+
+# ##############################################################################
+#
+# This macro checks that swig files were generated. It is requared under Windows
+# platform, because sometimes under Windows platform the genetarion of the swig
+# wrappings tooks long time. And seems swig opens file at the begining of
+# generation process and after that swig begins the generation of the content.
+# In its turn Microsoft Visual Studio tryes to compile file immediately after
+# creation and as a result compilation breaks.
+macro(SWIG_CHECK_GENERATION swig_module)
+ if(WIN32)
+ set(SCRIPT
+ "@echo off
:check
( (call ) >> @SWIG_GEN_FILE_NAME@ ) 2>null && (
echo The file @SWIG_GEN_FILE_NAME@ was created. & goto :eof
echo The file @SWIG_GEN_FILE_NAME@ is still being created !!! & goto :check
)
:eof")
- LIST(LENGTH swig_generated_sources NB_GEN_FILES)
- IF(${NB_GEN_FILES})
- LIST(GET swig_generated_sources 0 SWIG_GEN_FILE_NAME)
- STRING(CONFIGURE ${SCRIPT} SCRIPT)
- GET_FILENAME_COMPONENT(SWIG_GEN_FILE_NAME_DIR ${SWIG_GEN_FILE_NAME} DIRECTORY)
- GET_FILENAME_COMPONENT(SWIG_GEN_FILE_NAME_WE ${SWIG_GEN_FILE_NAME} NAME_WE)
- SET(SCRIPT_FILE_NAME ${SWIG_GEN_FILE_NAME_DIR}/${SWIG_GEN_FILE_NAME_WE}.bat)
- FILE(WRITE ${SCRIPT_FILE_NAME} ${SCRIPT})
- ADD_CUSTOM_TARGET(${SWIG_MODULE_${swig_module}_REAL_NAME}_ready
- DEPENDS ${SWIG_GEN_FILE_NAME}
- COMMAND ${SCRIPT_FILE_NAME}
- COMMENT "Waiting for swig wrappings !!!")
- ADD_DEPENDENCIES(${SWIG_MODULE_${swig_module}_REAL_NAME} ${SWIG_MODULE_${swig_module}_REAL_NAME}_ready)
- ELSE()
- MESSAGE(FATAL "swig sources for targer ${swig_module} are not found !!!")
- ENDIF()
- ENDIF()
-ENDMACRO(SWIG_CHECK_GENERATION)
-
-#########################################################################
+ list(LENGTH swig_generated_sources NB_GEN_FILES)
+ if(${NB_GEN_FILES})
+ list(GET swig_generated_sources 0 SWIG_GEN_FILE_NAME)
+ string(CONFIGURE ${SCRIPT} SCRIPT)
+ get_filename_component(SWIG_GEN_FILE_NAME_DIR ${SWIG_GEN_FILE_NAME}
+ DIRECTORY)
+ get_filename_component(SWIG_GEN_FILE_NAME_WE ${SWIG_GEN_FILE_NAME}
+ NAME_WE)
+ set(SCRIPT_FILE_NAME
+ ${SWIG_GEN_FILE_NAME_DIR}/${SWIG_GEN_FILE_NAME_WE}.bat)
+ file(WRITE ${SCRIPT_FILE_NAME} ${SCRIPT})
+ add_custom_target(
+ ${SWIG_MODULE_${swig_module}_REAL_NAME}_ready
+ DEPENDS ${SWIG_GEN_FILE_NAME}
+ COMMAND ${SCRIPT_FILE_NAME}
+ COMMENT "Waiting for swig wrappings !!!")
+ add_dependencies(${SWIG_MODULE_${swig_module}_REAL_NAME}
+ ${SWIG_MODULE_${swig_module}_REAL_NAME}_ready)
+ else()
+ message(FATAL "swig sources for targer ${swig_module} are not found !!!")
+ endif()
+ endif()
+endmacro(SWIG_CHECK_GENERATION)
+
+# ##############################################################################
# SALOME_SETUP_VERSION()
#
# USAGE: SALOME_SETUP_VERSION(version [DEVELOPMENT])
#
-# ARGUMENTS:
-# version [in] Version decriptor (string).
+# ARGUMENTS: version [in] Version decriptor (string).
#
-# OPTIONS:
-# DEVELOPMENT Forces setting development flag.
+# OPTIONS: DEVELOPMENT Forces setting development flag.
#
-# The macro sets the following variables:
-# - PROJECTNAME_MAJOR_VERSION - major version number
-# - PROJECTNAME_MINOR_VERSION - minor version number
-# - PROJECTNAME_PATCH_VERSION - release version number
-# - PROJECTNAME_VERSION - full qualified version
-# - PROJECTNAME_VERSION_DEV - development flag (0 value for released version)
-# - PROJECTNAME_XVERSION - hexadecimal representation of version
-# - PROJECTNAME_GIT_SHA1 - git commit's sha1
+# The macro sets the following variables: - PROJECTNAME_MAJOR_VERSION - major
+# version number - PROJECTNAME_MINOR_VERSION - minor version number -
+# PROJECTNAME_PATCH_VERSION - release version number - PROJECTNAME_VERSION -
+# full qualified version - PROJECTNAME_VERSION_DEV - development flag (0 value
+# for released version) - PROJECTNAME_XVERSION - hexadecimal representation
+# of version - PROJECTNAME_GIT_SHA1 - git commit's sha1
#
-FUNCTION(SALOME_SETUP_VERSION version)
+function(SALOME_SETUP_VERSION version)
# parse arguments
- PARSE_ARGUMENTS(SALOME_SETUP_VERSION "" "DEVELOPMENT" ${ARGN})
+ parse_arguments(SALOME_SETUP_VERSION "" "DEVELOPMENT" ${ARGN})
# project name in upper case (if not set in master CMakeLists.txt)
- STRING(TOUPPER ${PROJECT_NAME} _pkg_uc)
+ string(TOUPPER ${PROJECT_NAME} _pkg_uc)
# parse version component
- STRING(REGEX MATCHALL "[^.]" _components "${version}")
- LIST(LENGTH _components _length)
- IF(${_length} GREATER 0)
- LIST(GET _components 0 _major)
- LIST(REMOVE_AT _components 0)
- ELSE()
- SET(_major 0)
- ENDIF()
- LIST(LENGTH _components _length)
- IF(${_length} GREATER 0)
- LIST(GET _components 0 _minor)
- LIST(REMOVE_AT _components 0)
- ELSE()
- SET(_minor 0)
- ENDIF()
- LIST(LENGTH _components _length)
- IF(${_length} GREATER 0)
- LIST(GET _components 0 _patch)
- LIST(REMOVE_AT _components 0)
- ELSE()
- SET(_patch 0)
- ENDIF()
+ string(REGEX MATCHALL "[^.]" _components "${version}")
+ list(LENGTH _components _length)
+ if(${_length} GREATER 0)
+ list(GET _components 0 _major)
+ list(REMOVE_AT _components 0)
+ else()
+ set(_major 0)
+ endif()
+ list(LENGTH _components _length)
+ if(${_length} GREATER 0)
+ list(GET _components 0 _minor)
+ list(REMOVE_AT _components 0)
+ else()
+ set(_minor 0)
+ endif()
+ list(LENGTH _components _length)
+ if(${_length} GREATER 0)
+ list(GET _components 0 _patch)
+ list(REMOVE_AT _components 0)
+ else()
+ set(_patch 0)
+ endif()
# set project version: 'major', 'minor' and 'patch' components
- SET(${_pkg_uc}_MAJOR_VERSION ${_major} PARENT_SCOPE)
- SET(${_pkg_uc}_MINOR_VERSION ${_minor} PARENT_SCOPE)
- SET(${_pkg_uc}_PATCH_VERSION ${_patch} PARENT_SCOPE)
- SET(${_pkg_uc}_VERSION ${_major}.${_minor}.${_patch} PARENT_SCOPE)
+ set(${_pkg_uc}_MAJOR_VERSION
+ ${_major}
+ PARENT_SCOPE)
+ set(${_pkg_uc}_MINOR_VERSION
+ ${_minor}
+ PARENT_SCOPE)
+ set(${_pkg_uc}_PATCH_VERSION
+ ${_patch}
+ PARENT_SCOPE)
+ set(${_pkg_uc}_VERSION
+ ${_major}.${_minor}.${_patch}
+ PARENT_SCOPE)
# set 'development' flag
- IF(SALOME_SETUP_VERSION_DEVELOPMENT)
- SET(${_pkg_uc}_VERSION_DEV 1 PARENT_SCOPE)
- ELSE()
- SET(${_pkg_uc}_VERSION_DEV 0 PARENT_SCOPE)
- ENDIF()
+ if(SALOME_SETUP_VERSION_DEVELOPMENT)
+ set(${_pkg_uc}_VERSION_DEV
+ 1
+ PARENT_SCOPE)
+ else()
+ set(${_pkg_uc}_VERSION_DEV
+ 0
+ PARENT_SCOPE)
+ endif()
# set hexa representation of version
- SALOME_TOHEXA(${_major} _major_h)
- SALOME_TOHEXA(${_minor} _minor_h)
- SALOME_TOHEXA(${_patch} _patch_h)
- SET(${_pkg_uc}_XVERSION "0x${_major_h}${_minor_h}${_patch_h}" PARENT_SCOPE)
+ salome_tohexa(${_major} _major_h)
+ salome_tohexa(${_minor} _minor_h)
+ salome_tohexa(${_patch} _patch_h)
+ set(${_pkg_uc}_XVERSION
+ "0x${_major_h}${_minor_h}${_patch_h}"
+ PARENT_SCOPE)
# detect git sha1
- EXECUTE_PROCESS(COMMAND git describe --dirty --tags --match=V* --always
+ execute_process(
+ COMMAND git describe --dirty --tags --match=V* --always
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE _git_version
- ERROR_QUIET
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- IF(_git_version)
- SET(${_pkg_uc}_GIT_SHA1 "${_git_version}" PARENT_SCOPE)
- ELSE(_)
- SET(${_pkg_uc}_GIT_SHA1 "unknown" PARENT_SCOPE)
- ENDIF()
-ENDFUNCTION()
+ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(_git_version)
+ set(${_pkg_uc}_GIT_SHA1
+ "${_git_version}"
+ PARENT_SCOPE)
+ else(_)
+ set(${_pkg_uc}_GIT_SHA1
+ "unknown"
+ PARENT_SCOPE)
+ endif()
+endfunction()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
#
-# SHAPER unit test system
-# How to use:
-# INCLUDE(UnitTest)
-# ...
-# ADD_UNIT_TESTS(TestUndoRedo.py
-# TestResultBody.py)
-# or
-# SET(PROJECT_UNIT_TESTS
-# TestUndoRedo.py
-# TestWhatever.py
-# )
-# ADD_UNIT_TESTS(${PROJECT_UNIT_TESTS})
+# SHAPER unit test system How to use: INCLUDE(UnitTest) ...
+# ADD_UNIT_TESTS(TestUndoRedo.py TestResultBody.py) or SET(PROJECT_UNIT_TESTS
+# TestUndoRedo.py TestWhatever.py ) ADD_UNIT_TESTS(${PROJECT_UNIT_TESTS})
#
-# Where "TestUndoRedo.py" and "TestResultBody.py" are names
-# of python test scripts in the "./Test" directory.
-# This macro will add "Subproject_" as prefix and
-# remove ".py" for the test name automaticaly.
+# Where "TestUndoRedo.py" and "TestResultBody.py" are names of python test
+# scripts in the "./Test" directory. This macro will add "Subproject_" as prefix
+# and remove ".py" for the test name automaticaly.
#
-# Start building of the "RUN_TESTS" project in the Visual studio
-# or run "make test" on linux stations to start the testing procedure.
+# Start building of the "RUN_TESTS" project in the Visual studio or run "make
+# test" on linux stations to start the testing procedure.
#
-ENABLE_TESTING()
+enable_testing()
function(GENERATE_TESTS PATH testdir TESTS)
- SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+ salome_generate_tests_environment(tests_env)
foreach(eachFileName ${ARGN})
# Strip the ".py" suffix
- GET_FILENAME_COMPONENT(aTestName ${eachFileName} NAME_WE)
+ get_filename_component(aTestName ${eachFileName} NAME_WE)
# Add "SubprojectName_" prefix
- GET_FILENAME_COMPONENT(aSubprojectName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
- SET(aTestName "${aSubprojectName}_${aTestName}")
+ get_filename_component(aSubprojectName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+ set(aTestName "${aSubprojectName}_${aTestName}")
# Full path to the python test file beeing executed
- SET(aTestFileName "${testdir}/${eachFileName}")
- IF(NOT EXISTS ${aTestFileName})
- SET(aTestFileName "${testdir}/Test/${eachFileName}")
- ENDIF(NOT EXISTS ${aTestFileName})
- IF(EXISTS ${aTestFileName})
- ADD_TEST(NAME ${aTestName}
- COMMAND ${PYTHON_EXECUTABLE} ${aTestFileName})
- SET_TESTS_PROPERTIES(${aTestName} PROPERTIES
- ENVIRONMENT "${tests_env};SHAPER_UNIT_TEST_IN_PROGRESS=1"
- LABELS "${aSubprojectName}")
- # Debug output...
- #MESSAGE(STATUS "Test added: ${aTestName} file: ${aTestFileName}")
- ELSE(EXISTS ${aTestFileName})
- MESSAGE(WARNING "Can not find the test file: ${eachFileName}")
- MESSAGE(STATUS "Search paths are: ${testdir}")
- MESSAGE(STATUS " ${testdir}/Test")
- ENDIF(EXISTS ${aTestFileName})
+ set(aTestFileName "${testdir}/${eachFileName}")
+ if(NOT EXISTS ${aTestFileName})
+ set(aTestFileName "${testdir}/Test/${eachFileName}")
+ endif(NOT EXISTS ${aTestFileName})
+ if(EXISTS ${aTestFileName})
+ add_test(NAME ${aTestName} COMMAND ${PYTHON_EXECUTABLE} ${aTestFileName})
+ set_tests_properties(
+ ${aTestName}
+ PROPERTIES ENVIRONMENT "${tests_env};SHAPER_UNIT_TEST_IN_PROGRESS=1"
+ LABELS "${aSubprojectName}")
+ # Debug output... MESSAGE(STATUS "Test added: ${aTestName} file:
+ # ${aTestFileName}")
+ else(EXISTS ${aTestFileName})
+ message(WARNING "Can not find the test file: ${eachFileName}")
+ message(STATUS "Search paths are: ${testdir}")
+ message(STATUS " ${testdir}/Test")
+ endif(EXISTS ${aTestFileName})
endforeach(eachFileName ${ARGN})
endfunction(GENERATE_TESTS)
function(ADD_UNIT_TESTS)
- GENERATE_TESTS(PATH "${CMAKE_CURRENT_SOURCE_DIR}" TESTS ${ARGN})
+ generate_tests(PATH "${CMAKE_CURRENT_SOURCE_DIR}" TESTS ${ARGN})
endfunction(ADD_UNIT_TESTS)
function(ADD_UNIT_TESTS_API)
- GENERATE_TESTS(PATH "${CMAKE_CURRENT_SOURCE_DIR}" TESTS ${ARGN})
+ generate_tests(PATH "${CMAKE_CURRENT_SOURCE_DIR}" TESTS ${ARGN})
endfunction(ADD_UNIT_TESTS_API)
-
function(ADD_RESTRICTED_TESTS)
- SET(RESTRICTED_ROOT_DIR $ENV{RESTRICTED_ROOT_DIR} CACHE PATH "Path to the restricted repository")
+ set(RESTRICTED_ROOT_DIR
+ $ENV{RESTRICTED_ROOT_DIR}
+ CACHE PATH "Path to the restricted repository")
- if (EXISTS ${RESTRICTED_ROOT_DIR})
- GENERATE_TESTS(PATH "${RESTRICTED_ROOT_DIR}/SHAPER/bugs" TESTS ${ARGN})
+ if(EXISTS ${RESTRICTED_ROOT_DIR})
+ generate_tests(PATH "${RESTRICTED_ROOT_DIR}/SHAPER/bugs" TESTS ${ARGN})
else()
- message(WARNING "RESTRICTED_ROOT_DIR is not specified to run restricted tests")
+ message(
+ WARNING "RESTRICTED_ROOT_DIR is not specified to run restricted tests")
endif()
endfunction(ADD_RESTRICTED_TESTS)
# Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-IF (QT_VERSION VERSION_LESS "5.0")
- INCLUDE(${QT_USE_FILE})
-ENDIF()
+if(QT_VERSION VERSION_LESS "5.0")
+ include(${QT_USE_FILE})
+endif()
-# This MACRO uses the following vars
-# - QT_LRELEASE_EXECUTABLE : (given by default by FindQT.cmake)
+# This MACRO uses the following vars - QT_LRELEASE_EXECUTABLE : (given by
+# default by FindQT.cmake)
#
-# tsfiles containing all ts files to be compiled.
-# installdir contains directory (relative to install_prefix) where to install files after compilation of ts files too qm.
-MACRO(QT_INSTALL_TS_RESOURCES tsfiles installdir)
- FOREACH(_input ${tsfiles})
- GET_FILENAME_COMPONENT(_name ${_input} NAME_WE)
- SET(_output ${CMAKE_CURRENT_BINARY_DIR}/${_name}.qm)
- SET(_cmd_${_name} ${QT_LRELEASE_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${_input} -qm ${_output})
- ADD_CUSTOM_TARGET(QT_INSTALL_TS_RESOURCES_${_name} ALL COMMAND ${_cmd_${_name}} DEPENDS ${_input})
- INSTALL(FILES ${_output} DESTINATION ${installdir})
- ENDFOREACH()
-ENDMACRO(QT_INSTALL_TS_RESOURCES)
+# tsfiles containing all ts files to be compiled. installdir contains directory
+# (relative to install_prefix) where to install files after compilation of ts
+# files too qm.
+macro(QT_INSTALL_TS_RESOURCES tsfiles installdir)
+ foreach(_input ${tsfiles})
+ get_filename_component(_name ${_input} NAME_WE)
+ set(_output ${CMAKE_CURRENT_BINARY_DIR}/${_name}.qm)
+ set(_cmd_${_name} ${QT_LRELEASE_EXECUTABLE}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${_input} -qm ${_output})
+ add_custom_target(
+ QT_INSTALL_TS_RESOURCES_${_name} ALL
+ COMMAND ${_cmd_${_name}}
+ DEPENDS ${_input})
+ install(FILES ${_output} DESTINATION ${installdir})
+ endforeach()
+endmacro(QT_INSTALL_TS_RESOURCES)
-MACRO(QT_WRAP_MOC)
-IF (QT_VERSION VERSION_LESS "5.0")
- QT4_WRAP_CPP(${ARGN})
-ELSE()
- QT5_WRAP_CPP(${ARGN})
- # Workaround to avoid problem with bug in moc preprocessor:
- # The problem is reproduced on Linux in case if native system Qt is installed
- # and "-I/usr/include" parameter is presented in the moc command line before
- # custom Qt includes. This bug takes place in Qt-5.6.0 and newer. To avoid this
- # bug move "-I/usr/include" parameter in the "moc parameters" file to the end
- # of the "include section".
- IF (NOT WIN32)
- FOREACH(IT ${ARGN})
- GET_FILENAME_COMPONENT(IT ${IT} ABSOLUTE)
- GET_FILENAME_COMPONENT(PFILE ${IT} NAME_WE)
- SET(OUTFILE ${CMAKE_CURRENT_BINARY_DIR}/moc_${PFILE}.cpp_parameters)
- IF(EXISTS ${OUTFILE})
- SET(NEW_CONTENT)
- SET(IS_INCLUDE_SECTION TRUE)
- SET(HAS_SYSTEM_INC FALSE)
- FILE(READ ${OUTFILE} CONTENT)
- STRING(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}")
- list(REMOVE_DUPLICATES CONTENT)
- FOREACH(S ${CONTENT})
- IF("${S}" MATCHES "^-I")
- IF("${S}" STREQUAL "-I/usr/include")
- SET(HAS_SYSTEM_INC TRUE)
- ELSE()
- SET(NEW_CONTENT ${NEW_CONTENT} "${S}\n")
- ENDIF()
- ELSE()
- SET(IS_INCLUDE_SECTION FALSE)
- ENDIF()
- IF(NOT IS_INCLUDE_SECTION)
- IF(HAS_SYSTEM_INC)
- SET(NEW_CONTENT ${NEW_CONTENT} "-I/usr/include\n")
- SET(HAS_SYSTEM_INC FALSE)
- ENDIF()
- SET(NEW_CONTENT ${NEW_CONTENT} "${S}\n")
- ENDIF()
- ENDFOREACH()
- FILE(WRITE ${OUTFILE} ${NEW_CONTENT})
- ENDIF()
- ENDFOREACH()
- ENDIF()
-ENDIF()
-ENDMACRO(QT_WRAP_MOC)
+macro(QT_WRAP_MOC)
+ if(QT_VERSION VERSION_LESS "5.0")
+ qt4_wrap_cpp(${ARGN})
+ else()
+ qt5_wrap_cpp(${ARGN})
+ # Workaround to avoid problem with bug in moc preprocessor: The problem is
+ # reproduced on Linux in case if native system Qt is installed and
+ # "-I/usr/include" parameter is presented in the moc command line before
+ # custom Qt includes. This bug takes place in Qt-5.6.0 and newer. To avoid
+ # this bug move "-I/usr/include" parameter in the "moc parameters" file to
+ # the end of the "include section".
+ if(NOT WIN32)
+ foreach(IT ${ARGN})
+ get_filename_component(IT ${IT} ABSOLUTE)
+ get_filename_component(PFILE ${IT} NAME_WE)
+ set(OUTFILE ${CMAKE_CURRENT_BINARY_DIR}/moc_${PFILE}.cpp_parameters)
+ if(EXISTS ${OUTFILE})
+ set(NEW_CONTENT)
+ set(IS_INCLUDE_SECTION TRUE)
+ set(HAS_SYSTEM_INC FALSE)
+ file(READ ${OUTFILE} CONTENT)
+ string(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}")
+ list(REMOVE_DUPLICATES CONTENT)
+ foreach(S ${CONTENT})
+ if("${S}" MATCHES "^-I")
+ if("${S}" STREQUAL "-I/usr/include")
+ set(HAS_SYSTEM_INC TRUE)
+ else()
+ set(NEW_CONTENT ${NEW_CONTENT} "${S}\n")
+ endif()
+ else()
+ set(IS_INCLUDE_SECTION FALSE)
+ endif()
+ if(NOT IS_INCLUDE_SECTION)
+ if(HAS_SYSTEM_INC)
+ set(NEW_CONTENT ${NEW_CONTENT} "-I/usr/include\n")
+ set(HAS_SYSTEM_INC FALSE)
+ endif()
+ set(NEW_CONTENT ${NEW_CONTENT} "${S}\n")
+ endif()
+ endforeach()
+ file(WRITE ${OUTFILE} ${NEW_CONTENT})
+ endif()
+ endforeach()
+ endif()
+ endif()
+endmacro(QT_WRAP_MOC)
-MACRO(QT_WRAP_UIC)
-IF (QT_VERSION VERSION_LESS "5.0")
- QT4_WRAP_UI(${ARGN})
-ELSE()
- QT5_WRAP_UI(${ARGN})
-ENDIF()
-ENDMACRO(QT_WRAP_UIC)
+macro(QT_WRAP_UIC)
+ if(QT_VERSION VERSION_LESS "5.0")
+ qt4_wrap_ui(${ARGN})
+ else()
+ qt5_wrap_ui(${ARGN})
+ endif()
+endmacro(QT_WRAP_UIC)
-MACRO(QT_ADD_RESOURCES)
-IF (QT_VERSION VERSION_LESS "5.0")
- QT4_ADD_RESOURCES(${ARGN})
-ELSE()
- QT5_ADD_RESOURCES(${ARGN})
-ENDIF()
-ENDMACRO(QT_ADD_RESOURCES)
+macro(QT_ADD_RESOURCES)
+ if(QT_VERSION VERSION_LESS "5.0")
+ qt4_add_resources(${ARGN})
+ else()
+ qt5_add_resources(${ARGN})
+ endif()
+endmacro(QT_ADD_RESOURCES)
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
-INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
-LINK_DIRECTORIES (${LIBXML2_LIBRARIES})
+add_definitions(${LIBXML2_DEFINITIONS})
+include_directories(${LIBXML2_INCLUDE_DIR})
+link_directories(${LIBXML2_LIBRARIES})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
+cmake_minimum_required(VERSION 2.8.10)
# Project name
# ============
-PROJECT(SHAPER)
+project(SHAPER)
# Ensure a proper linker behavior
# ===============================
-CMAKE_POLICY(SET CMP0003 NEW)
-IF(WIN32)
- CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib
-ENDIF(WIN32)
+cmake_policy(SET CMP0003 NEW)
+if(WIN32)
+ cmake_policy(SET CMP0020 OLD) # disable automatic linking to qtmain.lib
+endif(WIN32)
# Append path to common macros
# ===========================
-SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
# Detect SALOME mode; append path to SALOME macros
# ================================================
-SET(HAVE_SALOME NO)
-SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
-IF(EXISTS ${CONFIGURATION_ROOT_DIR})
- SET(HAVE_SALOME YES)
- MESSAGE(STATUS "SALOME found; building with SALOME!")
- SET(CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
- INCLUDE(SalomeMacros)
-ELSE()
- MESSAGE(STATUS "SALOME is not found; building without it!")
- INCLUDE(SalomeMacros)
-ENDIF()
+set(HAVE_SALOME NO)
+set(CONFIGURATION_ROOT_DIR
+ $ENV{CONFIGURATION_ROOT_DIR}
+ CACHE PATH "Path to the Salome CMake configuration files")
+if(EXISTS ${CONFIGURATION_ROOT_DIR})
+ set(HAVE_SALOME YES)
+ message(STATUS "SALOME found; building with SALOME!")
+ set(CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
+ include(SalomeMacros)
+else()
+ message(STATUS "SALOME is not found; building without it!")
+ include(SalomeMacros)
+endif()
# Versioning
# ===========
-SALOME_SETUP_VERSION(9.11.0)
-MESSAGE(STATUS "Building ${PROJECT_NAME} ${${PROJECT_NAME}_VERSION} from \"${${PROJECT_NAME}_GIT_SHA1}\"")
-SET(COMPONENT_NAME SHAPER)
+salome_setup_version(9.11.0)
+message(
+ STATUS
+ "Building ${PROJECT_NAME} ${${PROJECT_NAME}_VERSION} from \"${${PROJECT_NAME}_GIT_SHA1}\""
+)
+set(COMPONENT_NAME SHAPER)
# Options
# =======
-IF (NOT CADBUILDER_BUILD_DOC)
- OPTION(SHAPER_BUILD_DOC "Generate SHAPER documentation" ON)
-ENDIF(NOT CADBUILDER_BUILD_DOC)
-
-INCLUDE(FindEclipse)
-INCLUDE(Common)
-INCLUDE(FindTInspector)
-INCLUDE(FindSalomeQt5)
-
-IF(HAVE_SALOME)
- INCLUDE(SalomeSetupPlatform) # From CONFIGURATION
-
- ADD_DEFINITIONS(-DHAVE_SALOME)
-
- SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
- IF(EXISTS ${KERNEL_ROOT_DIR})
- FIND_PACKAGE(SalomeKERNEL REQUIRED)
- ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
- INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
- SET(SALOME_KERNEL_LIBDIR ${KERNEL_ROOT_DIR}/lib/salome)
- ELSE(EXISTS ${KERNEL_ROOT_DIR})
- MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
- ENDIF(EXISTS ${KERNEL_ROOT_DIR})
-
- SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
- IF(EXISTS ${GUI_ROOT_DIR})
- FIND_PACKAGE(SalomeGUI REQUIRED)
- ELSE(EXISTS ${GUI_ROOT_DIR})
- MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
- ENDIF(EXISTS ${GUI_ROOT_DIR})
-
- FIND_PACKAGE(SalomePythonInterp REQUIRED)
- FIND_PACKAGE(SalomePythonLibs REQUIRED)
- FIND_PACKAGE(SalomeOpenCASCADE REQUIRED)
- INCLUDE(FindSalome)
-ELSE()
- INCLUDE(FindPython)
- INCLUDE(FindSalomeOpenCASCADE)
-ENDIF()
-
-INCLUDE(FindSUIT)
+if(NOT CADBUILDER_BUILD_DOC)
+ option(SHAPER_BUILD_DOC "Generate SHAPER documentation" ON)
+endif(NOT CADBUILDER_BUILD_DOC)
+
+include(FindEclipse)
+include(Common)
+include(FindTInspector)
+include(FindSalomeQt5)
+
+if(HAVE_SALOME)
+ include(SalomeSetupPlatform) # From CONFIGURATION
+
+ add_definitions(-DHAVE_SALOME)
+
+ set(KERNEL_ROOT_DIR
+ $ENV{KERNEL_ROOT_DIR}
+ CACHE PATH "Path to the Salome KERNEL")
+ if(EXISTS ${KERNEL_ROOT_DIR})
+ find_package(SalomeKERNEL REQUIRED)
+ add_definitions(${KERNEL_DEFINITIONS})
+ include_directories(${KERNEL_INCLUDE_DIRS})
+ set(SALOME_KERNEL_LIBDIR ${KERNEL_ROOT_DIR}/lib/salome)
+ else(EXISTS ${KERNEL_ROOT_DIR})
+ message(
+ FATAL_ERROR
+ "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR")
+ endif(EXISTS ${KERNEL_ROOT_DIR})
+
+ set(GUI_ROOT_DIR
+ $ENV{GUI_ROOT_DIR}
+ CACHE PATH "Path to the Salome GUI")
+ if(EXISTS ${GUI_ROOT_DIR})
+ find_package(SalomeGUI REQUIRED)
+ else(EXISTS ${GUI_ROOT_DIR})
+ message(
+ FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR")
+ endif(EXISTS ${GUI_ROOT_DIR})
+
+ find_package(SalomePythonInterp REQUIRED)
+ find_package(SalomePythonLibs REQUIRED)
+ find_package(SalomeOpenCASCADE REQUIRED)
+ include(FindSalome)
+else()
+ include(FindPython)
+ include(FindSalomeOpenCASCADE)
+endif()
+
+include(FindSUIT)
# Find LibXml2
-IF(DEFINED ENV{LIBXML2_ROOT_DIR})
- IF(WIN32)
- FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.lib LIBXML2_LIBRARIES)
- FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include LIBXML2_INCLUDE_DIR)
- ELSEIF(NOT "$ENV{LIBXML2_ROOT_DIR}" STREQUAL "/usr")
- FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.so LIBXML2_LIBRARIES)
- FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include/libxml2 LIBXML2_INCLUDE_DIR)
- ENDIF()
-ENDIF()
+if(DEFINED ENV{LIBXML2_ROOT_DIR})
+ if(WIN32)
+ file(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.lib LIBXML2_LIBRARIES)
+ file(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include LIBXML2_INCLUDE_DIR)
+ elseif(NOT "$ENV{LIBXML2_ROOT_DIR}" STREQUAL "/usr")
+ file(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.so LIBXML2_LIBRARIES)
+ file(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include/libxml2
+ LIBXML2_INCLUDE_DIR)
+ endif()
+endif()
# It could be called only once
-FIND_PACKAGE(LibXml2 REQUIRED)
-
-SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/salome)
-SET(SHAPER_INSTALL_PYTHON_API ${_pydir}/salome/shaper CACHE INTERNAL "" FORCE)
-SET(SHAPER_INSTALL_SWIG ${_pydir} CACHE INTERNAL "" FORCE)
-IF(${HAVE_SALOME})
- SET(SHAPER_INSTALL_EXE bin/salome CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_ADDONS bin/salome CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_BIN lib/salome CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_PLUGIN_FILES lib/salome CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_PYTHON_FILES bin/salome CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_HEADERS include/salome CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_QM_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_XML_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_GUI_DOC share/doc/salome/gui/SHAPER CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_TUI_DOC share/doc/salome/tui/SHAPER CACHE INTERNAL "" FORCE)
- # without SALOME there is another kind of documentation, separated one
-
- SALOME_INSTALL_SCRIPTS("shaper_test.py" ${SHAPER_INSTALL_PYTHON_FILES})
-ELSE(${HAVE_SALOME})
- SET(SHAPER_INSTALL_EXE bin CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_ADDONS addons CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_BIN bin CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_HEADERS include CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_PLUGIN_FILES plugins CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_PYTHON_FILES plugins CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_RESOURCES resources CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_QM_RESOURCES bin CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_XML_RESOURCES plugins CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_GUI_DOC doc CACHE INTERNAL "" FORCE)
- SET(SHAPER_INSTALL_TUI_DOC doc CACHE INTERNAL "" FORCE)
-ENDIF(${HAVE_SALOME})
-
-# Test environment
+find_package(LibXml2 REQUIRED)
+
+set(_pydir
+ lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/salome
+)
+set(SHAPER_INSTALL_PYTHON_API
+ ${_pydir}/salome/shaper
+ CACHE INTERNAL "" FORCE)
+set(SHAPER_INSTALL_SWIG
+ ${_pydir}
+ CACHE INTERNAL "" FORCE)
+if(${HAVE_SALOME})
+ set(SHAPER_INSTALL_EXE
+ bin/salome
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_ADDONS
+ bin/salome
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_BIN
+ lib/salome
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_PLUGIN_FILES
+ lib/salome
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_PYTHON_FILES
+ bin/salome
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_HEADERS
+ include/salome
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_RESOURCES
+ share/salome/resources/shaper
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_QM_RESOURCES
+ share/salome/resources/shaper
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_XML_RESOURCES
+ share/salome/resources/shaper
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_GUI_DOC
+ share/doc/salome/gui/SHAPER
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_TUI_DOC
+ share/doc/salome/tui/SHAPER
+ CACHE INTERNAL "" FORCE)
+ # without SALOME there is another kind of documentation, separated one
+
+ salome_install_scripts("shaper_test.py" ${SHAPER_INSTALL_PYTHON_FILES})
+else(${HAVE_SALOME})
+ set(SHAPER_INSTALL_EXE
+ bin
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_ADDONS
+ addons
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_BIN
+ bin
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_HEADERS
+ include
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_PLUGIN_FILES
+ plugins
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_PYTHON_FILES
+ plugins
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_RESOURCES
+ resources
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_QM_RESOURCES
+ bin
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_XML_RESOURCES
+ plugins
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_GUI_DOC
+ doc
+ CACHE INTERNAL "" FORCE)
+ set(SHAPER_INSTALL_TUI_DOC
+ doc
+ CACHE INTERNAL "" FORCE)
+endif(${HAVE_SALOME})
+
+# Test environment
# ===================
-SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN}")
-SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}")
-SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}")
-SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK "${SUIT_LIB_DIR}")
-SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK "${SALOME_KERNEL_LIBDIR}")
-
-SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}")
-SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}")
-SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}")
-
-SET(SALOME_SHAPER_INSTALL_TESTS "${SHAPER_INSTALL_PYTHON_FILES}/test" CACHE PATH "Path to tests directory")
+salome_accumulate_environment(LD_LIBRARY_PATH NOCHECK
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN}")
+salome_accumulate_environment(LD_LIBRARY_PATH NOCHECK
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}")
+salome_accumulate_environment(
+ LD_LIBRARY_PATH NOCHECK
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}")
+salome_accumulate_environment(LD_LIBRARY_PATH NOCHECK "${SUIT_LIB_DIR}")
+salome_accumulate_environment(LD_LIBRARY_PATH NOCHECK "${SALOME_KERNEL_LIBDIR}")
+
+salome_accumulate_environment(PYTHONPATH NOCHECK
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}")
+salome_accumulate_environment(
+ PYTHONPATH NOCHECK "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}")
+salome_accumulate_environment(
+ PYTHONPATH NOCHECK "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}")
+
+set(SALOME_SHAPER_INSTALL_TESTS
+ "${SHAPER_INSTALL_PYTHON_FILES}/test"
+ CACHE PATH "Path to tests directory")
# Sketcher: Change radius of circular edges while dragging a point on the edge
-SET(SKETCHER_CHANGE_RADIUS_WHEN_MOVE TRUE)
-
-SET(MAKE_TRANSLATION YES)
-ADD_DEFINITIONS( -DMAKE_TRANSLATION )
-
-ADD_SUBDIRECTORY (src/Config)
-ADD_SUBDIRECTORY (src/Locale)
-ADD_SUBDIRECTORY (src/Events)
-ADD_SUBDIRECTORY (src/Selector)
-ADD_SUBDIRECTORY (src/Model)
-ADD_SUBDIRECTORY (src/XAO)
-ADD_SUBDIRECTORY (src/GeomAPI)
-ADD_SUBDIRECTORY (src/ModelAPI)
-ADD_SUBDIRECTORY (src/ModelGeomAlgo)
-ADD_SUBDIRECTORY (src/GeomAlgoAPI)
-ADD_SUBDIRECTORY (src/GeomAlgoImpl)
-ADD_SUBDIRECTORY (src/GeomData)
-ADD_SUBDIRECTORY (src/GeomDataAPI)
-ADD_SUBDIRECTORY (src/PartSetPlugin)
-ADD_SUBDIRECTORY (src/ConstructionPlugin)
-ADD_SUBDIRECTORY (src/BuildPlugin)
-ADD_SUBDIRECTORY (src/PrimitivesPlugin)
-ADD_SUBDIRECTORY (src/GDMLPlugin)
-ADD_SUBDIRECTORY (src/FeaturesPlugin)
-ADD_SUBDIRECTORY (src/CollectionPlugin)
-ADD_SUBDIRECTORY (src/SamplePanelPlugin)
-ADD_SUBDIRECTORY (src/SketcherPrs)
-ADD_SUBDIRECTORY (src/SketchPlugin)
-ADD_SUBDIRECTORY (src/SketchSolver)
-ADD_SUBDIRECTORY (src/ModuleBase)
-ADD_SUBDIRECTORY (src/PartSet)
-
-ADD_SUBDIRECTORY (src/XGUI)
-ADD_SUBDIRECTORY (src/ExchangePlugin)
-ADD_SUBDIRECTORY (src/GeomValidators)
-ADD_SUBDIRECTORY (src/FiltersPlugin)
-ADD_SUBDIRECTORY (src/InitializationPlugin)
-ADD_SUBDIRECTORY (src/ParametersPlugin)
-ADD_SUBDIRECTORY (src/PythonAddons)
-ADD_SUBDIRECTORY (src/PythonAPI)
+set(SKETCHER_CHANGE_RADIUS_WHEN_MOVE TRUE)
+
+set(MAKE_TRANSLATION YES)
+add_definitions(-DMAKE_TRANSLATION)
+
+add_subdirectory(src/Config)
+add_subdirectory(src/Locale)
+add_subdirectory(src/Events)
+add_subdirectory(src/Selector)
+add_subdirectory(src/Model)
+add_subdirectory(src/XAO)
+add_subdirectory(src/GeomAPI)
+add_subdirectory(src/ModelAPI)
+add_subdirectory(src/ModelGeomAlgo)
+add_subdirectory(src/GeomAlgoAPI)
+add_subdirectory(src/GeomAlgoImpl)
+add_subdirectory(src/GeomData)
+add_subdirectory(src/GeomDataAPI)
+add_subdirectory(src/PartSetPlugin)
+add_subdirectory(src/ConstructionPlugin)
+add_subdirectory(src/BuildPlugin)
+add_subdirectory(src/PrimitivesPlugin)
+add_subdirectory(src/GDMLPlugin)
+add_subdirectory(src/FeaturesPlugin)
+add_subdirectory(src/CollectionPlugin)
+add_subdirectory(src/SamplePanelPlugin)
+add_subdirectory(src/SketcherPrs)
+add_subdirectory(src/SketchPlugin)
+add_subdirectory(src/SketchSolver)
+add_subdirectory(src/ModuleBase)
+add_subdirectory(src/PartSet)
+
+add_subdirectory(src/XGUI)
+add_subdirectory(src/ExchangePlugin)
+add_subdirectory(src/GeomValidators)
+add_subdirectory(src/FiltersPlugin)
+add_subdirectory(src/InitializationPlugin)
+add_subdirectory(src/ParametersPlugin)
+add_subdirectory(src/PythonAddons)
+add_subdirectory(src/PythonAPI)
# High Level C++/Python API
-ADD_SUBDIRECTORY (src/ModelHighAPI)
-ADD_SUBDIRECTORY (src/BuildAPI)
-ADD_SUBDIRECTORY (src/ConstructionAPI)
-ADD_SUBDIRECTORY (src/ExchangeAPI)
-ADD_SUBDIRECTORY (src/FeaturesAPI)
-ADD_SUBDIRECTORY (src/CollectionAPI)
-ADD_SUBDIRECTORY (src/ParametersAPI)
-ADD_SUBDIRECTORY (src/PartSetAPI)
-ADD_SUBDIRECTORY (src/PrimitivesAPI)
-ADD_SUBDIRECTORY (src/SketchAPI)
-ADD_SUBDIRECTORY (src/GDMLAPI)
-ADD_SUBDIRECTORY (src/ConnectorAPI)
-ADD_SUBDIRECTORY (src/FiltersAPI)
+add_subdirectory(src/ModelHighAPI)
+add_subdirectory(src/BuildAPI)
+add_subdirectory(src/ConstructionAPI)
+add_subdirectory(src/ExchangeAPI)
+add_subdirectory(src/FeaturesAPI)
+add_subdirectory(src/CollectionAPI)
+add_subdirectory(src/ParametersAPI)
+add_subdirectory(src/PartSetAPI)
+add_subdirectory(src/PrimitivesAPI)
+add_subdirectory(src/SketchAPI)
+add_subdirectory(src/GDMLAPI)
+add_subdirectory(src/ConnectorAPI)
+add_subdirectory(src/FiltersAPI)
# Tests
-ADD_SUBDIRECTORY (test.API/SHAPER)
-
-IF(${HAVE_SALOME})
- ADD_SUBDIRECTORY (src/SHAPERGUI)
- ADD_SUBDIRECTORY (src/ConnectorPlugin)
-ENDIF(${HAVE_SALOME})
-
-ENABLE_TESTING()
-
-IF(ADD_MODELS_TESTS)
- ADD_SUBDIRECTORY (test.models)
- ADD_CUSTOM_TARGET(run_model_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -LE "models_tests")
-ENDIF(ADD_MODELS_TESTS)
-
-IF(ADD_COMPATIBILITY_TESTS)
- ADD_SUBDIRECTORY (test.compatibility)
- ADD_CUSTOM_TARGET(run_compatibility_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -LE "tests_compatibility")
-ENDIF(ADD_COMPATIBILITY_TESTS)
-
-IF(${HAVE_SALOME})
- IF(ADD_HDF_TESTS)
- ADD_SUBDIRECTORY (test.hdfs)
- ENDIF(ADD_HDF_TESTS)
-
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/CTestTestfileInstall.cmake
- DESTINATION ${SALOME_SHAPER_INSTALL_TESTS}
- RENAME CTestTestfile.cmake)
-ENDIF(${HAVE_SALOME})
-
-
-IF(SHAPER_BUILD_DOC)
- INCLUDE(FindSphinx)
- ADD_SUBDIRECTORY (doc)
-ENDIF(SHAPER_BUILD_DOC)
-
-
+add_subdirectory(test.API/SHAPER)
+
+if(${HAVE_SALOME})
+ add_subdirectory(src/SHAPERGUI)
+ add_subdirectory(src/ConnectorPlugin)
+endif(${HAVE_SALOME})
+
+enable_testing()
+
+if(ADD_MODELS_TESTS)
+ add_subdirectory(test.models)
+ add_custom_target(
+ run_model_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -LE
+ "models_tests")
+endif(ADD_MODELS_TESTS)
+
+if(ADD_COMPATIBILITY_TESTS)
+ add_subdirectory(test.compatibility)
+ add_custom_target(
+ run_compatibility_tests
+ COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -LE
+ "tests_compatibility")
+endif(ADD_COMPATIBILITY_TESTS)
+
+if(${HAVE_SALOME})
+ if(ADD_HDF_TESTS)
+ add_subdirectory(test.hdfs)
+ endif(ADD_HDF_TESTS)
+
+ install(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/CTestTestfileInstall.cmake
+ DESTINATION ${SALOME_SHAPER_INSTALL_TESTS}
+ RENAME CTestTestfile.cmake)
+endif(${HAVE_SALOME})
+
+if(SHAPER_BUILD_DOC)
+ include(FindSphinx)
+ add_subdirectory(doc)
+endif(SHAPER_BUILD_DOC)
# Add the uninstall target for eclipse IDE
-if (CMAKE_GENERATOR MATCHES "NMake Makefiles")
-configure_file("${CMAKE_SOURCE_DIR}/CMakeCommon/cmake_uninstall.cmake.in"
- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
- IMMEDIATE @ONLY)
-add_custom_target(uninstall
- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-endif (CMAKE_GENERATOR MATCHES "NMake Makefiles")
+if(CMAKE_GENERATOR MATCHES "NMake Makefiles")
+ configure_file(
+ "${CMAKE_SOURCE_DIR}/CMakeCommon/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
+ add_custom_target(
+ uninstall COMMAND ${CMAKE_COMMAND} -P
+ ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+endif(CMAKE_GENERATOR MATCHES "NMake Makefiles")
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-ADD_SUBDIRECTORY(gui)
-ADD_SUBDIRECTORY(tui)
+add_subdirectory(gui)
+add_subdirectory(tui)
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-SET(input ${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in)
+set(input ${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in)
-SET(output ${CMAKE_CURRENT_BINARY_DIR}/conf.py)
+set(output ${CMAKE_CURRENT_BINARY_DIR}/conf.py)
-SET(DOC_FILES
- Introduction.rst
- Tutorial.rst
- TUI_tutorial.rst
- tutorial.py
- )
+set(DOC_FILES Introduction.rst Tutorial.rst TUI_tutorial.rst tutorial.py)
-CONFIGURE_FILE(${input} ${output})
+configure_file(${input} ${output})
-#sphinx-build -b html -c doc -D latex_paper_size=a4 -d doc/doctree /dn23/PPGP/vsv/SALOME730/SOURCES/PPGP_SRC/doc doc/html
+# sphinx-build -b html -c doc -D latex_paper_size=a4 -d doc/doctree
+# /dn23/PPGP/vsv/SALOME730/SOURCES/PPGP_SRC/doc doc/html
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/General DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/General
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images
+ DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-INSTALL(CODE "
+install(
+ CODE "
EXECUTE_PROCESS(
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build_index.py ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
)
")
-
-INSTALL(CODE "
+install(
+ CODE "
EXECUTE_PROCESS(
COMMAND ${SPHINX_EXECUTABLE} -b html -c ${CMAKE_CURRENT_BINARY_DIR} -d doctree ${CMAKE_CURRENT_BINARY_DIR} html
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)"
-)
+)")
-IF(${HAVE_SALOME})
- INSTALL(CODE "
+if(${HAVE_SALOME})
+ install(
+ CODE "
EXECUTE_PROCESS(
COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil;shutil.rmtree('${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SHAPER', True);shutil.copytree('${CMAKE_CURRENT_BINARY_DIR}/html', '${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/SHAPER')\"
)
")
-ELSE(${HAVE_SALOME})
- INSTALL(CODE "
+else(${HAVE_SALOME})
+ install(
+ CODE "
EXECUTE_PROCESS(
COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil;shutil.rmtree('${CMAKE_INSTALL_PREFIX}/doc/gui', True);shutil.copytree('${CMAKE_CURRENT_BINARY_DIR}/html', '${CMAKE_INSTALL_PREFIX}/doc/gui')\"
)
")
-ENDIF(${HAVE_SALOME})
+endif(${HAVE_SALOME})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-IF (WIN32)
- FIND_PROGRAM(DOXYGEN_EXECUTABLE Doxygen)
-ELSE (WIN32)
- FIND_PROGRAM(DOXYGEN_EXECUTABLE doxygen)
-ENDIF(WIN32)
+if(WIN32)
+ find_program(DOXYGEN_EXECUTABLE Doxygen)
+else(WIN32)
+ find_program(DOXYGEN_EXECUTABLE doxygen)
+endif(WIN32)
-IF(HAVE_SALOME)
- SET(EXCLUDE_DOC_DIR "*/AppElements/* */CADBuilder/*")
-ELSE(HAVE_SALOME)
- SET(EXCLUDE_DOC_DIR "*/Shaper/*")
-ENDIF(HAVE_SALOME)
+if(HAVE_SALOME)
+ set(EXCLUDE_DOC_DIR "*/AppElements/* */CADBuilder/*")
+else(HAVE_SALOME)
+ set(EXCLUDE_DOC_DIR "*/Shaper/*")
+endif(HAVE_SALOME)
-CONFIGURE_FILE(doxyfile.in
- "${CMAKE_CURRENT_BINARY_DIR}/doxyfile"
- IMMEDIATE @ONLY)
+configure_file(doxyfile.in "${CMAKE_CURRENT_BINARY_DIR}/doxyfile" IMMEDIATE
+ @ONLY)
-ADD_CUSTOM_TARGET(dev_docs
- COMMAND "${DOXYGEN_EXECUTABLE}"
- COMMAND "${CMAKE_COMMAND}" --build "${PROJECT_BINARY_DIR}" --target install --config ${CMAKE_BUILD_TYPE}
- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/doc/tui"
-)
+add_custom_target(
+ dev_docs
+ COMMAND "${DOXYGEN_EXECUTABLE}"
+ COMMAND "${CMAKE_COMMAND}" --build "${PROJECT_BINARY_DIR}" --target install
+ --config ${CMAKE_BUILD_TYPE}
+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/doc/tui")
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tui/ DESTINATION ${SHAPER_INSTALL_TUI_DOC} OPTIONAL)
+install(
+ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tui/
+ DESTINATION ${SHAPER_INSTALL_TUI_DOC}
+ OPTIONAL)
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-
-SET(PROJECT_HEADERS
- BuildAPI.h
- BuildAPI_Compound.h
- BuildAPI_CompSolid.h
- BuildAPI_Edge.h
- BuildAPI_Face.h
- BuildAPI_Filling.h
- BuildAPI_Shell.h
- BuildAPI_Solid.h
- BuildAPI_SubShapes.h
- BuildAPI_Vertex.h
- BuildAPI_Wire.h
- BuildAPI_Polyline.h
- BuildAPI_Interpolation.h
-)
-
-SET(PROJECT_SOURCES
- BuildAPI_Compound.cpp
- BuildAPI_CompSolid.cpp
- BuildAPI_Edge.cpp
- BuildAPI_Face.cpp
- BuildAPI_Filling.cpp
- BuildAPI_Shell.cpp
- BuildAPI_Solid.cpp
- BuildAPI_SubShapes.cpp
- BuildAPI_Vertex.cpp
- BuildAPI_Wire.cpp
- BuildAPI_Polyline.cpp
- BuildAPI_Interpolation.cpp
-)
-
-SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
-)
-
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-)
+include(Common)
+
+set(PROJECT_HEADERS
+ BuildAPI.h
+ BuildAPI_Compound.h
+ BuildAPI_CompSolid.h
+ BuildAPI_Edge.h
+ BuildAPI_Face.h
+ BuildAPI_Filling.h
+ BuildAPI_Shell.h
+ BuildAPI_Solid.h
+ BuildAPI_SubShapes.h
+ BuildAPI_Vertex.h
+ BuildAPI_Wire.h
+ BuildAPI_Polyline.h
+ BuildAPI_Interpolation.h)
+
+set(PROJECT_SOURCES
+ BuildAPI_Compound.cpp
+ BuildAPI_CompSolid.cpp
+ BuildAPI_Edge.cpp
+ BuildAPI_Face.cpp
+ BuildAPI_Filling.cpp
+ BuildAPI_Shell.cpp
+ BuildAPI_Solid.cpp
+ BuildAPI_SubShapes.cpp
+ BuildAPI_Vertex.cpp
+ BuildAPI_Wire.cpp
+ BuildAPI_Polyline.cpp
+ BuildAPI_Interpolation.cpp)
+
+set(PROJECT_LIBRARIES ModelAPI ModelHighAPI)
+
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/BuildPlugin
-)
-
-#TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
-ADD_DEFINITIONS(-DBUILDAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(BuildAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(BuildAPI ${PROJECT_LIBRARIES})
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI ${PROJECT_SOURCE_DIR}/src/BuildPlugin)
+
+# TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
+add_definitions(-DBUILDAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(BuildAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(BuildAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
-
-SET_SOURCE_FILES_PROPERTIES(BuildAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(BuildAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-
-#TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may require modern CMake)?
-SET(SWIG_LINK_LIBRARIES
- BuildAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-
-SET(SWIG_MODULE_BuildAPI_EXTRA_DEPS ${SWIG_MODULE_BuildAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
-
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(BuildAPI LANGUAGE python SOURCES BuildAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(BuildAPI python BuildAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(BuildAPI ${SWIG_LINK_LIBRARIES})
-
-IF(WIN32)
- SET_TARGET_PROPERTIES(_BuildAPI PROPERTIES DEBUG_OUTPUT_NAME _BuildAPI_d)
-ENDIF(WIN32)
-
-INSTALL(TARGETS _BuildAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS BuildAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/BuildAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+include(PythonAPI)
+
+set_source_files_properties(BuildAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(BuildAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+
+# TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may
+# require modern CMake)?
+set(SWIG_LINK_LIBRARIES BuildAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+
+set(SWIG_MODULE_BuildAPI_EXTRA_DEPS
+ ${SWIG_MODULE_BuildAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
+
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ BuildAPI
+ LANGUAGE python
+ SOURCES BuildAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(BuildAPI python BuildAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(BuildAPI ${SWIG_LINK_LIBRARIES})
+
+if(WIN32)
+ set_target_properties(_BuildAPI PROPERTIES DEBUG_OUTPUT_NAME _BuildAPI_d)
+endif(WIN32)
+
+install(TARGETS _BuildAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS BuildAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/BuildAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Tests
-INCLUDE(UnitTest)
+include(UnitTest)
-ADD_UNIT_TESTS(
-)
+add_unit_tests()
# ADD_SUBDIRECTORY (Test)
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-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/Locale
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/GeomValidators
- ${PROJECT_SOURCE_DIR}/src/SketchPlugin
- ${PROJECT_SOURCE_DIR}/src/InitializationPlugin
- ${SUIT_INCLUDE}
- ${PYTHON_INCLUDE_DIR}
-)
-
-SET(PROJECT_HEADERS
+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/Locale
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomValidators
+ ${PROJECT_SOURCE_DIR}/src/SketchPlugin
+ ${PROJECT_SOURCE_DIR}/src/InitializationPlugin
+ ${SUIT_INCLUDE}
+ ${PYTHON_INCLUDE_DIR})
+
+set(PROJECT_HEADERS
BuildPlugin.h
BuildPlugin_Plugin.h
BuildPlugin_Shape.h
BuildPlugin_Compound.h
BuildPlugin_SubShapes.h
BuildPlugin_Filling.h
- BuildPlugin_Validators.h
-)
+ BuildPlugin_Validators.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
BuildPlugin_Plugin.cpp
BuildPlugin_Shape.cpp
BuildPlugin_Vertex.cpp
BuildPlugin_Compound.cpp
BuildPlugin_SubShapes.cpp
BuildPlugin_Filling.cpp
- BuildPlugin_Validators.cpp
-)
+ BuildPlugin_Validators.cpp)
-SET(XML_RESOURCES
+set(XML_RESOURCES
plugin-Build.xml
vertex_widget.xml
edge_widget.xml
compsolid_widget.xml
compound_widget.xml
subshapes_widget.xml
- filling_widget.xml
-)
+ filling_widget.xml)
-SET(TEXT_RESOURCES
- BuildPlugin_msg_en.ts
- BuildPlugin_msg_fr.ts
-)
+set(TEXT_RESOURCES BuildPlugin_msg_en.ts BuildPlugin_msg_fr.ts)
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
+source_group("XML Files" FILES ${XML_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
Events
Config
ModelAPI
GeomAlgoAPI
GeomValidators
${PyInterp}
- ${PYTHON_LIBRARIES}
-)
+ ${PYTHON_LIBRARIES})
-ADD_DEFINITIONS(-DBUILDPLUGIN_EXPORTS)
-ADD_LIBRARY(BuildPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
+add_definitions(-DBUILDPLUGIN_EXPORTS)
+add_library(BuildPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES} ${TEXT_RESOURCES})
-TARGET_LINK_LIBRARIES(BuildPlugin ${PROJECT_LIBRARIES})
+target_link_libraries(BuildPlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS BuildPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Build)
+install(TARGETS BuildPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} ${TEXT_RESOURCES}
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Build)
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/BuildPlugin")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2020-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-SET(COMPONENT_NAME SHAPER)
+set(COMPONENT_NAME SHAPER)
set(SALOME_TEST_LABEL_ADV SHAPR_ADV)
set(SALOME_TEST_LABEL_SEQ SHAPR_SEQ)
# Add all test subdirs
-SUBDIRS(ConnectorAPI
- HDFs
- FeaturesPlugin
- ConstructionPlugin
- SketchPlugin
- ModelAPI
- FiltersPlugin
- CollectionPlugin
- BuildPlugin
- ExchangePlugin
- PythonAPI
- GeomAPI
- ModelHighAPI
- ParametersPlugin
- PythonAddons
- SketchAPI
- ConstructionAPI
- PartSetAPI
- GeomDataAPI
- Config
- ExchangeAPI
- ModelGeomAlgo
- Locale
- test_API
-)
+subdirs(
+ ConnectorAPI
+ HDFs
+ FeaturesPlugin
+ ConstructionPlugin
+ SketchPlugin
+ ModelAPI
+ FiltersPlugin
+ CollectionPlugin
+ BuildPlugin
+ ExchangePlugin
+ PythonAPI
+ GeomAPI
+ ModelHighAPI
+ ParametersPlugin
+ PythonAddons
+ SketchAPI
+ ConstructionAPI
+ PartSetAPI
+ GeomDataAPI
+ Config
+ ExchangeAPI
+ ModelGeomAlgo
+ Locale
+ test_API)
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-
-SET(PROJECT_HEADERS
- CollectionAPI.h
- CollectionAPI_Group.h
- CollectionAPI_GroupAddition.h
- CollectionAPI_GroupShape.h
- CollectionAPI_GroupIntersection.h
- CollectionAPI_GroupSubstraction.h
- CollectionAPI_Field.h
-)
-
-SET(PROJECT_SOURCES
- CollectionAPI_Group.cpp
- CollectionAPI_GroupAddition.cpp
- CollectionAPI_GroupShape.cpp
- CollectionAPI_GroupIntersection.cpp
- CollectionAPI_GroupSubstraction.cpp
- CollectionAPI_Field.cpp
-)
-
-SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
-)
-
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-)
+include(Common)
+
+set(PROJECT_HEADERS
+ CollectionAPI.h
+ CollectionAPI_Group.h
+ CollectionAPI_GroupAddition.h
+ CollectionAPI_GroupShape.h
+ CollectionAPI_GroupIntersection.h
+ CollectionAPI_GroupSubstraction.h
+ CollectionAPI_Field.h)
+
+set(PROJECT_SOURCES
+ CollectionAPI_Group.cpp CollectionAPI_GroupAddition.cpp
+ CollectionAPI_GroupShape.cpp CollectionAPI_GroupIntersection.cpp
+ CollectionAPI_GroupSubstraction.cpp CollectionAPI_Field.cpp)
+
+set(PROJECT_LIBRARIES ModelAPI ModelHighAPI)
+
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/CollectionPlugin
-)
+ ${PROJECT_SOURCE_DIR}/src/CollectionPlugin)
-ADD_DEFINITIONS(-DCOLLECTIONAPI_EXPORTS)
-ADD_LIBRARY(CollectionAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(CollectionAPI ${PROJECT_LIBRARIES})
+add_definitions(-DCOLLECTIONAPI_EXPORTS)
+add_library(CollectionAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(CollectionAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
+include(PythonAPI)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403,509)
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403,509)
-SET_SOURCE_FILES_PROPERTIES(CollectionAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(CollectionAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(CollectionAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(CollectionAPI.i PROPERTIES SWIG_DEFINITIONS
+ "-shadow")
-SET(SWIG_LINK_LIBRARIES
- CollectionAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
+set(SWIG_LINK_LIBRARIES CollectionAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
-SET(SWIG_MODULE_CollectionAPI_EXTRA_DEPS ${SWIG_MODULE_CollectionAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
+set(SWIG_MODULE_CollectionAPI_EXTRA_DEPS
+ ${SWIG_MODULE_CollectionAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(CollectionAPI LANGUAGE python SOURCES CollectionAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(CollectionAPI python CollectionAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(CollectionAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ CollectionAPI
+ LANGUAGE python
+ SOURCES CollectionAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(CollectionAPI python CollectionAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(CollectionAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_CollectionAPI PROPERTIES DEBUG_OUTPUT_NAME _CollectionAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_CollectionAPI PROPERTIES DEBUG_OUTPUT_NAME
+ _CollectionAPI_d)
+endif(WIN32)
-INSTALL(TARGETS _CollectionAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS CollectionAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CollectionAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _CollectionAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS CollectionAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CollectionAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UnitTest)
-INCLUDE(UseQtExt)
+include(Common)
+include(UnitTest)
+include(UseQtExt)
# additional include directories
-INCLUDE_DIRECTORIES(${QT_INCLUDES})
+include_directories(${QT_INCLUDES})
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS})
+add_definitions(${QT_DEFINITIONS})
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
CollectionPlugin.h
CollectionPlugin_Plugin.h
CollectionPlugin_Group.h
CollectionPlugin_Field.h
CollectionPlugin_WidgetCreator.h
CollectionPlugin_WidgetField.h
- CollectionPlugin_Validators.h
-)
+ CollectionPlugin_Validators.h)
-SET(PROJECT_MOC_HEADERS
- CollectionPlugin_WidgetField.h
-)
+set(PROJECT_MOC_HEADERS CollectionPlugin_WidgetField.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
CollectionPlugin_Plugin.cpp
CollectionPlugin_Group.cpp
CollectionPlugin_GroupAddition.cpp
CollectionPlugin_Field.cpp
CollectionPlugin_WidgetCreator.cpp
CollectionPlugin_WidgetField.cpp
- CollectionPlugin_Validators.cpp
-)
-
-SET(XML_RESOURCES
- plugin-Collection.xml
- group_widget.xml
- group_addition_widget.xml
- group_intersection_widget.xml
- group_substraction_widget.xml
-)
-
-SET(TEXT_RESOURCES
- CollectionPlugin_msg_en.ts
- CollectionPlugin_msg_fr.ts
-)
+ CollectionPlugin_Validators.cpp)
-# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
+set(XML_RESOURCES
+ plugin-Collection.xml group_widget.xml group_addition_widget.xml
+ group_intersection_widget.xml group_substraction_widget.xml)
-#QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+set(TEXT_RESOURCES CollectionPlugin_msg_en.ts CollectionPlugin_msg_fr.ts)
+
+# sources / moc wrappings
+qt_wrap_moc(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
+# QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
+source_group(
+ "Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES}
+ ${QM_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
+source_group("XML Files" FILES ${XML_RESOURCES})
-INCLUDE_DIRECTORIES(
+include_directories(
../ModelAPI
../GeomAPI
../GeomAlgoAPI
../Events
../ModuleBase
../Config
- ${OpenCASCADE_INCLUDE_DIR}
-)
-
-SET(PROJECT_LIBRARIES
- Events
- ModelAPI
- GeomAPI
- GeomAlgoAPI
- GeomValidators
- ModuleBase
-)
-
-ADD_DEFINITIONS(-DCOLLECTIONPLUGIN_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(CollectionPlugin MODULE
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${XML_RESOURCES}
- ${TEXT_RESOURCES}
- ${PROJECT_AUTOMOC})
-TARGET_LINK_LIBRARIES(CollectionPlugin ${PROJECT_LIBRARIES})
-
-INSTALL(TARGETS CollectionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Collection)
-INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+ ${OpenCASCADE_INCLUDE_DIR})
+
+set(PROJECT_LIBRARIES Events ModelAPI GeomAPI GeomAlgoAPI GeomValidators
+ ModuleBase)
+
+add_definitions(-DCOLLECTIONPLUGIN_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(
+ CollectionPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES} ${TEXT_RESOURCES} ${PROJECT_AUTOMOC})
+target_link_libraries(CollectionPlugin ${PROJECT_LIBRARIES})
+
+install(TARGETS CollectionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Collection)
+install(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/CollectionPlugin")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UnitTest)
-INCLUDE(XMLProcessing)
-FIND_PACKAGE(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-
-INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/Events
- ${PYTHON_INCLUDE_DIR})
-
-SET(PROJECT_HEADERS
- Config_def.h
- Config_FeatureMessage.h
- Config_PluginMessage.h
- Config_XMLReader.h
- Config_ModuleReader.h
- Config_FeatureReader.h
- Config_Keywords.h
- Config_WidgetAPI.h
- Config_WidgetReader.h
- Config_PointerMessage.h
- Config_Common.h
- Config_ValidatorMessage.h
- Config_Prop.h
- Config_PropManager.h
- Config_AttributeMessage.h
- Config_ValidatorReader.h
- Config_DataModelReader.h
- Config_Translator.h
- )
-
-SET(PROJECT_SOURCES
- Config_FeatureMessage.cpp
- Config_PluginMessage.cpp
- Config_XMLReader.cpp
- Config_ModuleReader.cpp
- Config_FeatureReader.cpp
- Config_WidgetAPI.cpp
- Config_WidgetReader.cpp
- Config_PointerMessage.cpp
- Config_Common.cpp
- Config_ValidatorMessage.cpp
- Config_Prop.cpp
- Config_PropManager.cpp
- Config_AttributeMessage.cpp
- Config_ValidatorReader.cpp
- Config_DataModelReader.cpp
- Config_Translator.cpp
-)
-
-SET(CMAKE_SWIG_FLAGS -threads -w321,401)
-SET_SOURCE_FILES_PROPERTIES(ConfigAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(ConfigAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET(SWIG_SCRIPTS
- ${CMAKE_CURRENT_BINARY_DIR}/ConfigAPI.py
-)
-SET(SWIG_LINK_LIBRARIES
- Config
- ${PYTHON_LIBRARIES}
-)
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(ConfigAPI LANGUAGE python SOURCES ConfigAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(ConfigAPI python ConfigAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(ConfigAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_ConfigAPI PROPERTIES DEBUG_OUTPUT_NAME _ConfigAPI_d)
-ENDIF(WIN32)
-
-
-SET(XML_RESOURCES
- ${CMAKE_CURRENT_BINARY_DIR}/plugins.xml
- dataModel.xml
-)
-
-SET(PROJECT_LIBRARIES
- Events
- ${LIBXML2_LIBRARIES}
- ${PYTHON_LIBRARIES}
-)
-
-SOURCE_GROUP ("Resource Files" FILES ${XML_RESOURCES})
-
-ADD_DEFINITIONS(-DCONFIG_EXPORTS -D_SCL_SECURE_NO_WARNINGS)
+include(Common)
+include(UnitTest)
+include(XMLProcessing)
+find_package(SWIG REQUIRED)
+include(${SWIG_USE_FILE})
+
+include_directories(${PROJECT_SOURCE_DIR}/src/Events ${PYTHON_INCLUDE_DIR})
+
+set(PROJECT_HEADERS
+ Config_def.h
+ Config_FeatureMessage.h
+ Config_PluginMessage.h
+ Config_XMLReader.h
+ Config_ModuleReader.h
+ Config_FeatureReader.h
+ Config_Keywords.h
+ Config_WidgetAPI.h
+ Config_WidgetReader.h
+ Config_PointerMessage.h
+ Config_Common.h
+ Config_ValidatorMessage.h
+ Config_Prop.h
+ Config_PropManager.h
+ Config_AttributeMessage.h
+ Config_ValidatorReader.h
+ Config_DataModelReader.h
+ Config_Translator.h)
+
+set(PROJECT_SOURCES
+ Config_FeatureMessage.cpp
+ Config_PluginMessage.cpp
+ Config_XMLReader.cpp
+ Config_ModuleReader.cpp
+ Config_FeatureReader.cpp
+ Config_WidgetAPI.cpp
+ Config_WidgetReader.cpp
+ Config_PointerMessage.cpp
+ Config_Common.cpp
+ Config_ValidatorMessage.cpp
+ Config_Prop.cpp
+ Config_PropManager.cpp
+ Config_AttributeMessage.cpp
+ Config_ValidatorReader.cpp
+ Config_DataModelReader.cpp
+ Config_Translator.cpp)
+
+set(CMAKE_SWIG_FLAGS -threads -w321,401)
+set_source_files_properties(ConfigAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(ConfigAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set(SWIG_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/ConfigAPI.py)
+set(SWIG_LINK_LIBRARIES Config ${PYTHON_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ ConfigAPI
+ LANGUAGE python
+ SOURCES ConfigAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(ConfigAPI python ConfigAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(ConfigAPI ${SWIG_LINK_LIBRARIES})
+if(WIN32)
+ set_target_properties(_ConfigAPI PROPERTIES DEBUG_OUTPUT_NAME _ConfigAPI_d)
+endif(WIN32)
+
+set(XML_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/plugins.xml dataModel.xml)
+
+set(PROJECT_LIBRARIES Events ${LIBXML2_LIBRARIES} ${PYTHON_LIBRARIES})
+
+source_group("Resource Files" FILES ${XML_RESOURCES})
+
+add_definitions(-DCONFIG_EXPORTS -D_SCL_SECURE_NO_WARNINGS)
# -D_SCL_SECURE_NO_WARNINGS - to disable warnings 4996
-ADD_LIBRARY(Config SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
+add_library(Config SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES})
-TARGET_LINK_LIBRARIES(Config ${PROJECT_LIBRARIES})
+target_link_libraries(Config ${PROJECT_LIBRARIES})
# Prepare plugins.xml
# the solver to activate after installation
-SET(DEFAULT_SOLVER "PlaneGCS")
+set(DEFAULT_SOLVER "PlaneGCS")
# the list of all solvers
-SET(SOLVERS "SolveSpace" "PlaneGCS")
+set(SOLVERS "SolveSpace" "PlaneGCS")
# apply NO_<solver> variables
-FOREACH(solver IN LISTS SOLVERS)
- IF(NO_${solver})
- LIST(REMOVE_ITEM SOLVERS ${solver})
- ENDIF()
-ENDFOREACH()
+foreach(solver IN LISTS SOLVERS)
+ if(NO_${solver})
+ list(REMOVE_ITEM SOLVERS ${solver})
+ endif()
+endforeach()
# check default solver in the list of solvers
-LIST(FIND SOLVERS ${DEFAULT_SOLVER} INDEX)
-IF(${INDEX} GREATER -1)
- MESSAGE(STATUS "Default solver: ${DEFAULT_SOLVER}")
-ELSE()
- MESSAGE(FATAL_ERROR "Default solver: ${DEFAULT_SOLVER} is switched off.\nUnset NO_${DEFAULT_SOLVER} variable or define another default solver DEFAULT_SOLVER=<SOLVER> from the list: ${SOLVERS}.")
-ENDIF()
+list(FIND SOLVERS ${DEFAULT_SOLVER} INDEX)
+if(${INDEX} GREATER -1)
+ message(STATUS "Default solver: ${DEFAULT_SOLVER}")
+else()
+ message(
+ FATAL_ERROR
+ "Default solver: ${DEFAULT_SOLVER} is switched off.\nUnset NO_${DEFAULT_SOLVER} variable or define another default solver DEFAULT_SOLVER=<SOLVER> from the list: ${SOLVERS}."
+ )
+endif()
# prepare variables for configuration
-SET(DEFAULT_SOLVER " <plugin library=\"${DEFAULT_SOLVER}Solver\"/>")
-FOREACH(solver IN LISTS SOLVERS)
- IF(DEFINED ALL_SOLVERS)
- SET(ALL_SOLVERS "${ALL_SOLVERS}\n")
- ENDIF()
- SET(ALL_SOLVERS "${ALL_SOLVERS} <plugin library=\"${solver}Solver\"/>")
-ENDFOREACH()
+set(DEFAULT_SOLVER " <plugin library=\"${DEFAULT_SOLVER}Solver\"/>")
+foreach(solver IN LISTS SOLVERS)
+ if(DEFINED ALL_SOLVERS)
+ set(ALL_SOLVERS "${ALL_SOLVERS}\n")
+ endif()
+ set(ALL_SOLVERS "${ALL_SOLVERS} <plugin library=\"${solver}Solver\"/>")
+endforeach()
# configuration
-CONFIGURE_FILE(
- "${CMAKE_CURRENT_SOURCE_DIR}/plugins.xml.in"
- "${CMAKE_CURRENT_BINARY_DIR}/plugins.xml"
- )
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/plugins.xml.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/plugins.xml")
-INSTALL(TARGETS Config DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(TARGETS Config DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(TARGETS _ConfigAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _ConfigAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/Config")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
- ConnectorAPI.h
- ConnectorAPI_Connector.h
-)
+set(PROJECT_HEADERS ConnectorAPI.h ConnectorAPI_Connector.h)
-SET(PROJECT_SOURCES
- ConnectorAPI_Connector.cpp
-)
+set(PROJECT_SOURCES ConnectorAPI_Connector.cpp)
-SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
-)
+set(PROJECT_LIBRARIES ModelAPI ModelHighAPI)
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- # TODO(spo): modify ConnectorPlugin headers to remove dependency on GeomAPI headers
+include_directories(
+ # TODO(spo): modify ConnectorPlugin headers to remove dependency on GeomAPI
+ # headers
${PROJECT_SOURCE_DIR}/src/GeomAPI
# TODO(spo): it is for *_swig.h files. Can we eliminate it?
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/ConnectorPlugin
-)
+ ${PROJECT_SOURCE_DIR}/src/ConnectorPlugin)
-#TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
-ADD_DEFINITIONS(-DCONNECTORAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(ConnectorAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(ConnectorAPI ${PROJECT_LIBRARIES})
+# TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
+add_definitions(-DCONNECTORAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(ConnectorAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(ConnectorAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
-
-SET_SOURCE_FILES_PROPERTIES(ConnectorAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(ConnectorAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-
-#TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may require modern CMake)?
-SET(SWIG_LINK_LIBRARIES
- ConnectorAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
-
-SET(SWIG_MODULE_ConnectorAPI_EXTRA_DEPS ${SWIG_MODULE_ConnectorAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(ConnectorAPI LANGUAGE python SOURCES ConnectorAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(ConnectorAPI python ConnectorAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(ConnectorAPI ${SWIG_LINK_LIBRARIES})
-
-IF(WIN32)
- SET_TARGET_PROPERTIES(_ConnectorAPI PROPERTIES DEBUG_OUTPUT_NAME _ConnectorAPI_d)
-ENDIF(WIN32)
-
-INSTALL(TARGETS _ConnectorAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS ConnectorAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ConnectorAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+include(PythonAPI)
+
+set_source_files_properties(ConnectorAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(ConnectorAPI.i PROPERTIES SWIG_DEFINITIONS
+ "-shadow")
+
+# TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may
+# require modern CMake)?
+set(SWIG_LINK_LIBRARIES ConnectorAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
+
+set(SWIG_MODULE_ConnectorAPI_EXTRA_DEPS
+ ${SWIG_MODULE_ConnectorAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ ConnectorAPI
+ LANGUAGE python
+ SOURCES ConnectorAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(ConnectorAPI python ConnectorAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(ConnectorAPI ${SWIG_LINK_LIBRARIES})
+
+if(WIN32)
+ set_target_properties(_ConnectorAPI PROPERTIES DEBUG_OUTPUT_NAME
+ _ConnectorAPI_d)
+endif(WIN32)
+
+install(TARGETS _ConnectorAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS ConnectorAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ConnectorAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Tests
-IF(${HAVE_SALOME})
- ENABLE_TESTING()
- ADD_SUBDIRECTORY(Test)
-ENDIF(${HAVE_SALOME})
+if(${HAVE_SALOME})
+ enable_testing()
+ add_subdirectory(Test)
+endif(${HAVE_SALOME})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(tests.set)
+include(tests.set)
-SET(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ConnectorAPI")
-
-SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ConnectorAPI")
+salome_generate_tests_environment(tests_env)
# -B ${CMAKE_SOURCE_DIR}/doc/salome/examples/testme.py
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
- ADD_TEST(NAME ${TEST_NAME}
- COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_CURRENT_SOURCE_DIR}/testme.py ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env};SHAPER_UNIT_TEST_IN_PROGRESS=1")
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
-ENDFOREACH()
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(
+ NAME ${TEST_NAME}
+ COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_CURRENT_SOURCE_DIR}/testme.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
+ set_tests_properties(
+ ${TEST_NAME} PROPERTIES ENVIRONMENT
+ "${tests_env};SHAPER_UNIT_TEST_IN_PROGRESS=1")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+endforeach()
# salome test
-FOREACH(tfile ${TEST_NAMES})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
+foreach(tfile ${TEST_NAMES})
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
+endforeach()
-INSTALL(FILES CTestTestfileInstall.cmake
+install(
+ FILES CTestTestfileInstall.cmake
DESTINATION ${TEST_INSTALL_DIRECTORY}
RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
-INSTALL(DIRECTORY data DESTINATION ${TEST_INSTALL_DIRECTORY})
+install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+install(DIRECTORY data DESTINATION ${TEST_INSTALL_DIRECTORY})
# Copyright (C) 2016-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(tests.set)
+include(tests.set)
-SET(COMPONENT_NAME SHAPER)
-SET(PYTHON_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/python_test_driver.py")
-SET(TIMEOUT 300)
+set(COMPONENT_NAME SHAPER)
+set(PYTHON_TEST_DRIVER
+ "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/python_test_driver.py")
+set(TIMEOUT 300)
+foreach(tfile ${TEST_NAMES_SPR})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${PYTHON_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+endforeach()
-FOREACH(tfile ${TEST_NAMES_SPR})
- SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
- ADD_TEST(${TEST_NAME} python ${PYTHON_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
-ENDFOREACH()
-
-FOREACH(tfile ${TEST_NAMES_ADV})
- SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
- ADD_TEST(${TEST_NAME} python ${PYTHON_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
-ENDFOREACH()
+foreach(tfile ${TEST_NAMES_ADV})
+ set(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ add_test(${TEST_NAME} python ${PYTHON_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
+endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PYTHON_FILES
- ConnectorPlugin.py
- ConnectorPlugin_ExportFeature.py
- ConnectorPlugin_PublishToStudyFeature.py
-)
+set(PYTHON_FILES ConnectorPlugin.py ConnectorPlugin_ExportFeature.py
+ ConnectorPlugin_PublishToStudyFeature.py)
-SET(XML_RESOURCES
- plugin-Connector.xml
-)
+set(XML_RESOURCES plugin-Connector.xml)
-SET(TEXT_RESOURCES
- ConnectorPlugin_msg_fr.ts
-)
+set(TEXT_RESOURCES ConnectorPlugin_msg_fr.ts)
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
-ADD_CUSTOM_TARGET(ConnectorPlugin SOURCES ${PYTHON_FILES} ${XML_RESOURCES} ${TEXT_RESOURCES})
+add_custom_target(ConnectorPlugin SOURCES ${PYTHON_FILES} ${XML_RESOURCES}
+ ${TEXT_RESOURCES})
-INSTALL(FILES ${PYTHON_FILES} DESTINATION ${SHAPER_INSTALL_PYTHON_FILES})
-INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Connector)
+install(FILES ${PYTHON_FILES} DESTINATION ${SHAPER_INSTALL_PYTHON_FILES})
+install(FILES ${XML_RESOURCES} ${TEXT_RESOURCES}
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Connector)
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
- ConstructionAPI.h
- ConstructionAPI_Axis.h
- ConstructionAPI_Plane.h
- ConstructionAPI_Point.h
-)
+set(PROJECT_HEADERS ConstructionAPI.h ConstructionAPI_Axis.h
+ ConstructionAPI_Plane.h ConstructionAPI_Point.h)
-SET(PROJECT_SOURCES
- ConstructionAPI_Axis.cpp
- ConstructionAPI_Plane.cpp
- ConstructionAPI_Point.cpp
-)
+set(PROJECT_SOURCES ConstructionAPI_Axis.cpp ConstructionAPI_Plane.cpp
+ ConstructionAPI_Point.cpp)
-SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
-)
+set(PROJECT_LIBRARIES ModelAPI ModelHighAPI)
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- # TODO(spo): modify ConstructionPlugin headers to remove dependency on GeomAPI headers
+include_directories(
+ # TODO(spo): modify ConstructionPlugin headers to remove dependency on GeomAPI
+ # headers
${PROJECT_SOURCE_DIR}/src/GeomAPI
# TODO(spo): it is for *_swig.h files. Can we eliminate it?
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/ConstructionPlugin
-)
+ ${PROJECT_SOURCE_DIR}/src/ConstructionPlugin)
-#TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
-ADD_DEFINITIONS(-DCONSTRUCTIONAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(ConstructionAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(ConstructionAPI ${PROJECT_LIBRARIES})
+# TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
+add_definitions(-DCONSTRUCTIONAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(ConstructionAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(ConstructionAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
+include(PythonAPI)
-SET_SOURCE_FILES_PROPERTIES(ConstructionAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(ConstructionAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(ConstructionAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(ConstructionAPI.i PROPERTIES SWIG_DEFINITIONS
+ "-shadow")
-#TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may require modern CMake)?
-SET(SWIG_LINK_LIBRARIES
- ConstructionAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
+# TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may
+# require modern CMake)?
+set(SWIG_LINK_LIBRARIES ConstructionAPI ModelHighAPI ModelAPI
+ ${PYTHON_LIBRARIES})
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-SET(SWIG_MODULE_ConstructionAPI_EXTRA_DEPS ${SWIG_MODULE_ConstructionAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
+set(SWIG_MODULE_ConstructionAPI_EXTRA_DEPS
+ ${SWIG_MODULE_ConstructionAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(ConstructionAPI LANGUAGE python SOURCES ConstructionAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(ConstructionAPI python ConstructionAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(ConstructionAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ ConstructionAPI
+ LANGUAGE python
+ SOURCES ConstructionAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(ConstructionAPI python ConstructionAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(ConstructionAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_ConstructionAPI PROPERTIES DEBUG_OUTPUT_NAME _ConstructionAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_ConstructionAPI PROPERTIES DEBUG_OUTPUT_NAME
+ _ConstructionAPI_d)
+endif(WIN32)
-INSTALL(TARGETS _ConstructionAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS ConstructionAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ConstructionAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _ConstructionAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS ConstructionAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ConstructionAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Tests
-INCLUDE(UnitTest)
+include(UnitTest)
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ConstructionAPI")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UnitTest)
-
-SET(PROJECT_HEADERS
- ConstructionPlugin.h
- ConstructionPlugin_Plugin.h
- ConstructionPlugin_Point.h
- ConstructionPlugin_Axis.h
- ConstructionPlugin_Plane.h
- ConstructionPlugin_Validators.h
-)
-
-SET(PROJECT_SOURCES
- ConstructionPlugin_Plugin.cpp
- ConstructionPlugin_Point.cpp
- ConstructionPlugin_Axis.cpp
- ConstructionPlugin_Plane.cpp
- ConstructionPlugin_Validators.cpp
-)
-
-SET(XML_RESOURCES
- plugin-Construction.xml
- point_widget.xml
- axis_widget.xml
- plane_widget.xml
-)
-
-SET(TEXT_RESOURCES
- ConstructionPlugin_msg_en.ts
- ConstructionPlugin_msg_fr.ts
-)
-
-SET(PROJECT_LIBRARIES
- Config
- ModelAPI
- GeomAPI
- GeomAlgoAPI
- GeomDataAPI
-)
-
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
-
-ADD_DEFINITIONS(-DCONSTRUCTIONPLUGIN_EXPORTS)
-ADD_LIBRARY(ConstructionPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
-TARGET_LINK_LIBRARIES(ConstructionPlugin ${PROJECT_LIBRARIES})
-
-INSTALL(TARGETS ConstructionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Construction)
-
-INCLUDE_DIRECTORIES(
- ../Config
- ../ModelAPI
- ../GeomAPI
- ../GeomAlgoAPI
- ../Events
- ../GeomDataAPI
-)
+include(Common)
+include(UnitTest)
+
+set(PROJECT_HEADERS
+ ConstructionPlugin.h ConstructionPlugin_Plugin.h ConstructionPlugin_Point.h
+ ConstructionPlugin_Axis.h ConstructionPlugin_Plane.h
+ ConstructionPlugin_Validators.h)
+
+set(PROJECT_SOURCES
+ ConstructionPlugin_Plugin.cpp ConstructionPlugin_Point.cpp
+ ConstructionPlugin_Axis.cpp ConstructionPlugin_Plane.cpp
+ ConstructionPlugin_Validators.cpp)
+
+set(XML_RESOURCES plugin-Construction.xml point_widget.xml axis_widget.xml
+ plane_widget.xml)
+
+set(TEXT_RESOURCES ConstructionPlugin_msg_en.ts ConstructionPlugin_msg_fr.ts)
+
+set(PROJECT_LIBRARIES Config ModelAPI GeomAPI GeomAlgoAPI GeomDataAPI)
+
+source_group("XML Files" FILES ${XML_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
+
+add_definitions(-DCONSTRUCTIONPLUGIN_EXPORTS)
+add_library(ConstructionPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES} ${TEXT_RESOURCES})
+target_link_libraries(ConstructionPlugin ${PROJECT_LIBRARIES})
+
+install(TARGETS ConstructionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} ${TEXT_RESOURCES}
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Construction)
+
+include_directories(../Config ../ModelAPI ../GeomAPI ../GeomAlgoAPI ../Events
+ ../GeomDataAPI)
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
- set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ConstructionPlugin")
+ set(TEST_INSTALL_DIRECTORY
+ "${SALOME_SHAPER_INSTALL_TESTS}/ConstructionPlugin")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-FIND_PACKAGE(SWIG REQUIRED)
+include(Common)
+find_package(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
+include(${SWIG_USE_FILE})
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
Events.h
Events_Message.h
Events_MessageGroup.h
Events_Loop.h
Events_LongOp.h
Events_InfoMessage.h
- Events_MessageBool.h
-)
+ Events_MessageBool.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
Events_Message.cpp
Events_MessageGroup.cpp
Events_Listener.cpp
Events_Loop.cpp
Events_LongOp.cpp
Events_InfoMessage.cpp
- Events_MessageBool.cpp
-)
+ Events_MessageBool.cpp)
-SET(PROJECT_LIBRARIES
- Locale
-)
+set(PROJECT_LIBRARIES Locale)
-ADD_DEFINITIONS(-DEVENTS_EXPORTS)
-ADD_LIBRARY(Events SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+add_definitions(-DEVENTS_EXPORTS)
+add_library(Events SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-SET(CMAKE_SWIG_FLAGS -threads -w362)
+set(CMAKE_SWIG_FLAGS -threads -w362)
-SET_SOURCE_FILES_PROPERTIES(Events.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(Events.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(Events.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(Events.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-INCLUDE_DIRECTORIES(
- ../Locale
-)
+include_directories(../Locale)
-TARGET_LINK_LIBRARIES(Events ${PROJECT_LIBRARIES})
+target_link_libraries(Events ${PROJECT_LIBRARIES})
-SET(SWIG_SCRIPTS
- ${CMAKE_CURRENT_BINARY_DIR}/EventsAPI.py
-)
+set(SWIG_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/EventsAPI.py)
-SET(SWIG_LINK_LIBRARIES
- Events
- ${PYTHON_LIBRARIES}
-)
+set(SWIG_LINK_LIBRARIES Events ${PYTHON_LIBRARIES})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(EventsAPI LANGUAGE python SOURCES Events.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(EventsAPI python Events.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(EventsAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ EventsAPI
+ LANGUAGE python
+ SOURCES Events.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(EventsAPI python Events.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(EventsAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_EventsAPI PROPERTIES DEBUG_OUTPUT_NAME _EventsAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_EventsAPI PROPERTIES DEBUG_OUTPUT_NAME _EventsAPI_d)
+endif(WIN32)
-INSTALL(TARGETS Events DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(TARGETS _EventsAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS Events DESTINATION ${SHAPER_INSTALL_BIN})
+install(TARGETS _EventsAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UseQtExt)
-
-SET(PROJECT_HEADERS
- ExchangeAPI.h
- ExchangeAPI_Export.h
- ExchangeAPI_Import.h
-)
-
-SET(PROJECT_SOURCES
- ExchangeAPI_Export.cpp
- ExchangeAPI_Import.cpp
-)
-
-SET(PROJECT_LIBRARIES
- Locale
- ModelAPI
- ModelHighAPI
- GeomAlgoAPI
- ${QT_LIBRARIES}
-)
-
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/Locale
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${QT_INCLUDES}
-)
+include(Common)
+include(UseQtExt)
+
+set(PROJECT_HEADERS ExchangeAPI.h ExchangeAPI_Export.h ExchangeAPI_Import.h)
+
+set(PROJECT_SOURCES ExchangeAPI_Export.cpp ExchangeAPI_Import.cpp)
+
+set(PROJECT_LIBRARIES Locale ModelAPI ModelHighAPI GeomAlgoAPI ${QT_LIBRARIES})
+
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/Locale
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI ${QT_INCLUDES})
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- # TODO(spo): modify ExchangePlugin headers to remove dependency on GeomAPI headers
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/ExchangePlugin
-)
+include_directories(
+ # TODO(spo): modify ExchangePlugin headers to remove dependency on GeomAPI
+ # headers
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/ExchangePlugin)
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS})
+add_definitions(${QT_DEFINITIONS})
-#TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
-ADD_DEFINITIONS(-DEXCHANGEAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(ExchangeAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(ExchangeAPI ${PROJECT_LIBRARIES})
+# TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
+add_definitions(-DEXCHANGEAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(ExchangeAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(ExchangeAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
+include(PythonAPI)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-SET_SOURCE_FILES_PROPERTIES(ExchangeAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(ExchangeAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(ExchangeAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(ExchangeAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-#TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may require modern CMake)?
-SET(SWIG_LINK_LIBRARIES
- ExchangeAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
+# TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may
+# require modern CMake)?
+set(SWIG_LINK_LIBRARIES ExchangeAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
-SET(SWIG_MODULE_ExchangeAPI_EXTRA_DEPS ${SWIG_MODULE_ExchangeAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
+set(SWIG_MODULE_ExchangeAPI_EXTRA_DEPS
+ ${SWIG_MODULE_ExchangeAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(ExchangeAPI LANGUAGE python SOURCES ExchangeAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(ExchangeAPI python ExchangeAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(ExchangeAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ ExchangeAPI
+ LANGUAGE python
+ SOURCES ExchangeAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(ExchangeAPI python ExchangeAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(ExchangeAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_ExchangeAPI PROPERTIES DEBUG_OUTPUT_NAME _ExchangeAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_ExchangeAPI PROPERTIES DEBUG_OUTPUT_NAME
+ _ExchangeAPI_d)
+endif(WIN32)
-INSTALL(TARGETS _ExchangeAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS ExchangeAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ExchangeAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _ExchangeAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS ExchangeAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ExchangeAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Tests
-INCLUDE(UnitTest)
+include(UnitTest)
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ExchangeAPI")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UnitTest)
-INCLUDE(UseQtExt)
+include(Common)
+include(UnitTest)
+include(UseQtExt)
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/Config
- ${PROJECT_SOURCE_DIR}/src/Locale
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${PROJECT_SOURCE_DIR}/src/GeomValidators
- ${PROJECT_SOURCE_DIR}/src/XAO
- ${PROJECT_SOURCE_DIR}/src/ConstructionPlugin
- ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
- ${QT_INCLUDES}
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events
+ ${PROJECT_SOURCE_DIR}/src/Config
+ ${PROJECT_SOURCE_DIR}/src/Locale
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomValidators
+ ${PROJECT_SOURCE_DIR}/src/XAO
+ ${PROJECT_SOURCE_DIR}/src/ConstructionPlugin
+ ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
+ ${QT_INCLUDES})
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS})
+add_definitions(${QT_DEFINITIONS})
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
ExchangePlugin.h
ExchangePlugin_Plugin.h
ExchangePlugin_ImportFeature.h
ExchangePlugin_Dump.h
ExchangePlugin_ImportPart.h
ExchangePlugin_ExportPart.h
- ExchangePlugin_Import.h
-)
+ ExchangePlugin_Import.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
ExchangePlugin_Plugin.cpp
ExchangePlugin_ImportFeature.cpp
ExchangePlugin_ExportFeature.cpp
ExchangePlugin_Dump.cpp
ExchangePlugin_ImportPart.cpp
ExchangePlugin_ExportPart.cpp
- ExchangePlugin_Import.cpp
-)
+ ExchangePlugin_Import.cpp)
-SET(XML_RESOURCES
- export_widget.xml
- plugin-Exchange.xml
-)
+set(XML_RESOURCES export_widget.xml plugin-Exchange.xml)
-SET(TEXT_RESOURCES
- ExchangePlugin_msg_en.ts
- ExchangePlugin_msg_fr.ts
-)
+set(TEXT_RESOURCES ExchangePlugin_msg_en.ts ExchangePlugin_msg_fr.ts)
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
+source_group("XML Files" FILES ${XML_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
Events
Config
Locale
GeomAlgoAPI
GeomValidators
XAOShaper
- ${QT_LIBRARIES}
-)
+ ${QT_LIBRARIES})
# default dump approaches (will be set if not initialized)
-SET(PYTHONDUMP_NAMING ON CACHE BOOL "Dump named references to shapes")
-SET(PYTHONDUMP_GEO OFF CACHE BOOL "Dump references to shapes by the geometric properties")
-SET(PYTHONDUMP_WEAK OFF CACHE BOOL "Dump weak named references to shapes")
+set(PYTHONDUMP_NAMING
+ ON
+ CACHE BOOL "Dump named references to shapes")
+set(PYTHONDUMP_GEO
+ OFF
+ CACHE BOOL "Dump references to shapes by the geometric properties")
+set(PYTHONDUMP_WEAK
+ OFF
+ CACHE BOOL "Dump weak named references to shapes")
-ADD_DEFINITIONS(-DEXCHANGEPLUGIN_EXPORTS)
-IF(${PYTHONDUMP_NAMING})
- ADD_DEFINITIONS(-DEXCHANGEPLUGIN_DUMP_NAMING)
-ENDIF()
-IF(${PYTHONDUMP_GEO})
- ADD_DEFINITIONS(-DEXCHANGEPLUGIN_DUMP_GEO)
-ENDIF()
-IF(${PYTHONDUMP_WEAK})
- ADD_DEFINITIONS(-DEXCHANGEPLUGIN_DUMP_WEAK)
-ENDIF()
-ADD_LIBRARY(ExchangePlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
+add_definitions(-DEXCHANGEPLUGIN_EXPORTS)
+if(${PYTHONDUMP_NAMING})
+ add_definitions(-DEXCHANGEPLUGIN_DUMP_NAMING)
+endif()
+if(${PYTHONDUMP_GEO})
+ add_definitions(-DEXCHANGEPLUGIN_DUMP_GEO)
+endif()
+if(${PYTHONDUMP_WEAK})
+ add_definitions(-DEXCHANGEPLUGIN_DUMP_WEAK)
+endif()
+add_library(ExchangePlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES} ${TEXT_RESOURCES})
-TARGET_LINK_LIBRARIES(ExchangePlugin ${PROJECT_LIBRARIES})
+target_link_libraries(ExchangePlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS ExchangePlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Exchange)
-INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(TARGETS ExchangePlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Exchange)
+install(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-ADD_SUBDIRECTORY(Test)
+add_subdirectory(Test)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ExchangePlugin")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# tests which require SALOME GUI
include(tests_gui.set)
- SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+ salome_generate_tests_environment(tests_env)
set(COMPONENT_NAME "ExchangePlugin")
foreach(tfile ${TEST_WITH_GUI_NAMES})
# Strip the ".py" suffix
get_filename_component(TEST_NAME ${tfile} NAME_WE)
# -B ${CMAKE_SOURCE_DIR}/doc/salome/examples/testme.py
set(TEST_NAME ${COMPONENT_NAME}_${TEST_NAME})
- add_test(NAME ${TEST_NAME}
- COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_CURRENT_SOURCE_DIR}/testme.py ${CMAKE_CURRENT_SOURCE_DIR}/${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env};SHAPER_UNIT_TEST_IN_PROGRESS=1")
+ add_test(
+ NAME ${TEST_NAME}
+ COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_CURRENT_SOURCE_DIR}/testme.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/${tfile})
+ set_tests_properties(
+ ${TEST_NAME} PROPERTIES ENVIRONMENT
+ "${tests_env};SHAPER_UNIT_TEST_IN_PROGRESS=1")
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
# salome test
install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
- install(FILES testme.py DESTINATION ${TEST_INSTALL_DIRECTORY}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE)
+ install(
+ FILES testme.py
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ PERMISSIONS
+ OWNER_READ
+ OWNER_WRITE
+ OWNER_EXECUTE
+ GROUP_READ
+ GROUP_EXECUTE
+ WORLD_READ
+ WORLD_EXECUTE)
install(FILES tests_gui.set DESTINATION ${TEST_INSTALL_DIRECTORY})
install(DIRECTORY data DESTINATION ${TEST_INSTALL_DIRECTORY})
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
- FeaturesAPI.h
- FeaturesAPI_BooleanCut.h
- FeaturesAPI_BooleanFuse.h
- FeaturesAPI_BooleanCommon.h
- FeaturesAPI_BooleanSmash.h
- FeaturesAPI_BooleanFill.h
- FeaturesAPI_Chamfer.h
- FeaturesAPI_Extrusion.h
- FeaturesAPI_ExtrusionBoolean.h
- FeaturesAPI_Fillet.h
- FeaturesAPI_GlueFaces.h
- FeaturesAPI_Intersection.h
- FeaturesAPI_Measurement.h
- FeaturesAPI_NormalToFace.h
- FeaturesAPI_MultiRotation.h
- FeaturesAPI_MultiTranslation.h
- FeaturesAPI_Partition.h
- FeaturesAPI_Pipe.h
- FeaturesAPI_Loft.h
- FeaturesAPI_Placement.h
- FeaturesAPI_PointCloudOnFace.h
- FeaturesAPI_Recover.h
- FeaturesAPI_RemoveResults.h
- FeaturesAPI_RemoveSubShapes.h
- FeaturesAPI_Revolution.h
- FeaturesAPI_RevolutionBoolean.h
- FeaturesAPI_Rotation.h
- FeaturesAPI_Scale.h
- FeaturesAPI_Sewing.h
- FeaturesAPI_Symmetry.h
- FeaturesAPI_Translation.h
- FeaturesAPI_Union.h
- FeaturesAPI_FusionFaces.h
- FeaturesAPI_Copy.h
- FeaturesAPI_ImportResult.h
- FeaturesAPI_Defeaturing.h
- FeaturesAPI_PointCoordinates.h
- FeaturesAPI_GeometryCalculation.h
- FeaturesAPI_BoundingBox.h
- FeaturesAPI_LimitTolerance.h
- FeaturesAPI_SharedFaces.h
-)
+set(PROJECT_HEADERS
+ FeaturesAPI.h
+ FeaturesAPI_BooleanCut.h
+ FeaturesAPI_BooleanFuse.h
+ FeaturesAPI_BooleanCommon.h
+ FeaturesAPI_BooleanSmash.h
+ FeaturesAPI_BooleanFill.h
+ FeaturesAPI_Chamfer.h
+ FeaturesAPI_Extrusion.h
+ FeaturesAPI_ExtrusionBoolean.h
+ FeaturesAPI_Fillet.h
+ FeaturesAPI_GlueFaces.h
+ FeaturesAPI_Intersection.h
+ FeaturesAPI_Measurement.h
+ FeaturesAPI_NormalToFace.h
+ FeaturesAPI_MultiRotation.h
+ FeaturesAPI_MultiTranslation.h
+ FeaturesAPI_Partition.h
+ FeaturesAPI_Pipe.h
+ FeaturesAPI_Loft.h
+ FeaturesAPI_Placement.h
+ FeaturesAPI_PointCloudOnFace.h
+ FeaturesAPI_Recover.h
+ FeaturesAPI_RemoveResults.h
+ FeaturesAPI_RemoveSubShapes.h
+ FeaturesAPI_Revolution.h
+ FeaturesAPI_RevolutionBoolean.h
+ FeaturesAPI_Rotation.h
+ FeaturesAPI_Scale.h
+ FeaturesAPI_Sewing.h
+ FeaturesAPI_Symmetry.h
+ FeaturesAPI_Translation.h
+ FeaturesAPI_Union.h
+ FeaturesAPI_FusionFaces.h
+ FeaturesAPI_Copy.h
+ FeaturesAPI_ImportResult.h
+ FeaturesAPI_Defeaturing.h
+ FeaturesAPI_PointCoordinates.h
+ FeaturesAPI_GeometryCalculation.h
+ FeaturesAPI_BoundingBox.h
+ FeaturesAPI_LimitTolerance.h
+ FeaturesAPI_SharedFaces.h)
-SET(PROJECT_SOURCES
- FeaturesAPI_BooleanCut.cpp
- FeaturesAPI_BooleanFuse.cpp
- FeaturesAPI_BooleanCommon.cpp
- FeaturesAPI_BooleanSmash.cpp
- FeaturesAPI_BooleanFill.cpp
- FeaturesAPI_Chamfer.cpp
- FeaturesAPI_Extrusion.cpp
- FeaturesAPI_ExtrusionBoolean.cpp
- FeaturesAPI_Fillet.cpp
- FeaturesAPI_GlueFaces.cpp
- FeaturesAPI_Intersection.cpp
- FeaturesAPI_Measurement.cpp
- FeaturesAPI_NormalToFace.cpp
- FeaturesAPI_MultiRotation.cpp
- FeaturesAPI_MultiTranslation.cpp
- FeaturesAPI_Partition.cpp
- FeaturesAPI_Pipe.cpp
- FeaturesAPI_Loft.cpp
- FeaturesAPI_Placement.cpp
- FeaturesAPI_PointCloudOnFace.cpp
- FeaturesAPI_Recover.cpp
- FeaturesAPI_RemoveResults.cpp
- FeaturesAPI_RemoveSubShapes.cpp
- FeaturesAPI_Revolution.cpp
- FeaturesAPI_RevolutionBoolean.cpp
- FeaturesAPI_Rotation.cpp
- FeaturesAPI_Scale.cpp
- FeaturesAPI_Sewing.cpp
- FeaturesAPI_Symmetry.cpp
- FeaturesAPI_Translation.cpp
- FeaturesAPI_Union.cpp
- FeaturesAPI_FusionFaces.cpp
- FeaturesAPI_Copy.cpp
- FeaturesAPI_ImportResult.cpp
- FeaturesAPI_Defeaturing.cpp
- FeaturesAPI_PointCoordinates.cpp
- FeaturesAPI_GeometryCalculation.cpp
- FeaturesAPI_BoundingBox.cpp
- FeaturesAPI_LimitTolerance.cpp
- FeaturesAPI_SharedFaces.cpp
-)
+set(PROJECT_SOURCES
+ FeaturesAPI_BooleanCut.cpp
+ FeaturesAPI_BooleanFuse.cpp
+ FeaturesAPI_BooleanCommon.cpp
+ FeaturesAPI_BooleanSmash.cpp
+ FeaturesAPI_BooleanFill.cpp
+ FeaturesAPI_Chamfer.cpp
+ FeaturesAPI_Extrusion.cpp
+ FeaturesAPI_ExtrusionBoolean.cpp
+ FeaturesAPI_Fillet.cpp
+ FeaturesAPI_GlueFaces.cpp
+ FeaturesAPI_Intersection.cpp
+ FeaturesAPI_Measurement.cpp
+ FeaturesAPI_NormalToFace.cpp
+ FeaturesAPI_MultiRotation.cpp
+ FeaturesAPI_MultiTranslation.cpp
+ FeaturesAPI_Partition.cpp
+ FeaturesAPI_Pipe.cpp
+ FeaturesAPI_Loft.cpp
+ FeaturesAPI_Placement.cpp
+ FeaturesAPI_PointCloudOnFace.cpp
+ FeaturesAPI_Recover.cpp
+ FeaturesAPI_RemoveResults.cpp
+ FeaturesAPI_RemoveSubShapes.cpp
+ FeaturesAPI_Revolution.cpp
+ FeaturesAPI_RevolutionBoolean.cpp
+ FeaturesAPI_Rotation.cpp
+ FeaturesAPI_Scale.cpp
+ FeaturesAPI_Sewing.cpp
+ FeaturesAPI_Symmetry.cpp
+ FeaturesAPI_Translation.cpp
+ FeaturesAPI_Union.cpp
+ FeaturesAPI_FusionFaces.cpp
+ FeaturesAPI_Copy.cpp
+ FeaturesAPI_ImportResult.cpp
+ FeaturesAPI_Defeaturing.cpp
+ FeaturesAPI_PointCoordinates.cpp
+ FeaturesAPI_GeometryCalculation.cpp
+ FeaturesAPI_BoundingBox.cpp
+ FeaturesAPI_LimitTolerance.cpp
+ FeaturesAPI_SharedFaces.cpp)
-SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
-)
+set(PROJECT_LIBRARIES ModelAPI ModelHighAPI)
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/FeaturesPlugin
-)
+ ${PROJECT_SOURCE_DIR}/src/FeaturesPlugin)
-ADD_DEFINITIONS(-DFEATURESAPI_EXPORTS)
-ADD_LIBRARY(FeaturesAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(FeaturesAPI ${PROJECT_LIBRARIES})
+add_definitions(-DFEATURESAPI_EXPORTS)
+add_library(FeaturesAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(FeaturesAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
+include(PythonAPI)
-SET_SOURCE_FILES_PROPERTIES(FeaturesAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(FeaturesAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(FeaturesAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(FeaturesAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET(SWIG_LINK_LIBRARIES
- FeaturesAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+set(SWIG_LINK_LIBRARIES FeaturesAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-SET(SWIG_MODULE_FeaturesAPI_EXTRA_DEPS ${SWIG_MODULE_FeaturesAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
+set(SWIG_MODULE_FeaturesAPI_EXTRA_DEPS
+ ${SWIG_MODULE_FeaturesAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(FeaturesAPI LANGUAGE python SOURCES FeaturesAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(FeaturesAPI python FeaturesAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(FeaturesAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ FeaturesAPI
+ LANGUAGE python
+ SOURCES FeaturesAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(FeaturesAPI python FeaturesAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(FeaturesAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_FeaturesAPI PROPERTIES DEBUG_OUTPUT_NAME _FeaturesAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_FeaturesAPI PROPERTIES DEBUG_OUTPUT_NAME
+ _FeaturesAPI_d)
+endif(WIN32)
-INSTALL(TARGETS _FeaturesAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS FeaturesAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/FeaturesAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _FeaturesAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS FeaturesAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FeaturesAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UnitTest)
+include(Common)
+include(UnitTest)
-
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
FeaturesPlugin.h
FeaturesPlugin_Plugin.h
FeaturesPlugin_Extrusion.h
FeaturesPlugin_LimitTolerance.h
FeaturesPlugin_CommonSharedFaces.h
FeaturesPlugin_GroupSharedFaces.h
- FeaturesPlugin_SharedFaces.h
-)
+ FeaturesPlugin_SharedFaces.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
FeaturesPlugin_Plugin.cpp
FeaturesPlugin_Extrusion.cpp
FeaturesPlugin_Recover.cpp
FeaturesPlugin_LimitTolerance.cpp
FeaturesPlugin_CommonSharedFaces.cpp
FeaturesPlugin_GroupSharedFaces.cpp
- FeaturesPlugin_SharedFaces.cpp
-)
-
-SET(XML_RESOURCES
- plugin-Features.xml
- extrusion_widget.xml
- extrusioncut_widget.xml
- extrusionfuse_widget.xml
- revolution_widget.xml
- revolutioncut_widget.xml
- revolutionfuse_widget.xml
- rotation_widget.xml
- translation_widget.xml
- boolean_widget.xml
- boolean_fuse_widget.xml
- boolean_common_widget.xml
- boolean_split_widget.xml
- boolean_smash_widget.xml
- recover_widget.xml
- partition_widget.xml
- placement_widget.xml
- intersection_widget.xml
- pipe_widget.xml
- loft_widget.xml
- remove_subshapes_widget.xml
- union_widget.xml
- symmetry_widget.xml
- scale_widget.xml
- sewing_widget.xml
- multitranslation_widget.xml
- multirotation_widget.xml
- fillet_widget.xml
- fillet1d_widget.xml
- measurement_widget.xml
- fusion_faces_widget.xml
- glue_faces_widget.xml
- chamfer_widget.xml
- copy_widget.xml
- import_result_widget.xml
- defeaturing_widget.xml
- point_coordinates_widget.xml
- geometry_calculation_widget.xml
- bounding_box_widget.xml
- create_bounding_box_widget.xml
- normal_to_face_widget.xml
- create_normal_to_face_widget.xml
- limit_tolerance_widget.xml
- shared_faces_macro_widget.xml
- shared_faces_widget.xml
-)
-
-SET(TEXT_RESOURCES
- FeaturesPlugin_msg_en.ts
- FeaturesPlugin_msg_fr.ts
- FeaturesPlugin_msg_ru.ts
-)
-
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
-
-
-INCLUDE_DIRECTORIES(
+ FeaturesPlugin_SharedFaces.cpp)
+
+set(XML_RESOURCES
+ plugin-Features.xml
+ extrusion_widget.xml
+ extrusioncut_widget.xml
+ extrusionfuse_widget.xml
+ revolution_widget.xml
+ revolutioncut_widget.xml
+ revolutionfuse_widget.xml
+ rotation_widget.xml
+ translation_widget.xml
+ boolean_widget.xml
+ boolean_fuse_widget.xml
+ boolean_common_widget.xml
+ boolean_split_widget.xml
+ boolean_smash_widget.xml
+ recover_widget.xml
+ partition_widget.xml
+ placement_widget.xml
+ intersection_widget.xml
+ pipe_widget.xml
+ loft_widget.xml
+ remove_subshapes_widget.xml
+ union_widget.xml
+ symmetry_widget.xml
+ scale_widget.xml
+ sewing_widget.xml
+ multitranslation_widget.xml
+ multirotation_widget.xml
+ fillet_widget.xml
+ fillet1d_widget.xml
+ measurement_widget.xml
+ fusion_faces_widget.xml
+ glue_faces_widget.xml
+ chamfer_widget.xml
+ copy_widget.xml
+ import_result_widget.xml
+ defeaturing_widget.xml
+ point_coordinates_widget.xml
+ geometry_calculation_widget.xml
+ bounding_box_widget.xml
+ create_bounding_box_widget.xml
+ normal_to_face_widget.xml
+ create_normal_to_face_widget.xml
+ limit_tolerance_widget.xml
+ shared_faces_macro_widget.xml
+ shared_faces_widget.xml)
+
+set(TEXT_RESOURCES FeaturesPlugin_msg_en.ts FeaturesPlugin_msg_fr.ts
+ FeaturesPlugin_msg_ru.ts)
+
+source_group("XML Files" FILES ${XML_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
+
+include_directories(
../ModelAPI
../GeomAPI
../GeomAlgoAPI
../Events
../Config
../Locale
- ${OpenCASCADE_INCLUDE_DIR}
-)
+ ${OpenCASCADE_INCLUDE_DIR})
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
Events
ModelAPI
GeomAPI
GeomAlgoAPI
GeomValidators
Config
- ${OpenCASCADE_Visualization_LIBRARIES}
-)
+ ${OpenCASCADE_Visualization_LIBRARIES})
-ADD_DEFINITIONS(-DFEATURESPLUGIN_EXPORTS)
-ADD_LIBRARY(FeaturesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
-TARGET_LINK_LIBRARIES(FeaturesPlugin ${PROJECT_LIBRARIES})
+add_definitions(-DFEATURESPLUGIN_EXPORTS)
+add_library(FeaturesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES} ${TEXT_RESOURCES})
+target_link_libraries(FeaturesPlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS FeaturesPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Features)
-INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(TARGETS FeaturesPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Features)
+install(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INCLUDE(tests.set)
+include(tests.set)
-ADD_UNIT_TESTS(
- ${TEST_NAMES}
-)
+add_unit_tests(${TEST_NAMES})
-IF(${HAVE_SALOME})
+if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/FeaturesPlugin")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
install(FILES ${TMP_TESTS_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
install(DIRECTORY data DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDIF(${HAVE_SALOME})
+endif(${HAVE_SALOME})
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES_PARA})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
-
foreach(tfile ${TEST_NAMES_SEQ})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_SEQ}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_SEQ}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
- FiltersAPI.h
- FiltersAPI_Argument.h
- FiltersAPI_Feature.h
- FiltersAPI_Filter.h
- FiltersAPI_Selection.h
-)
+set(PROJECT_HEADERS FiltersAPI.h FiltersAPI_Argument.h FiltersAPI_Feature.h
+ FiltersAPI_Filter.h FiltersAPI_Selection.h)
-SET(PROJECT_SOURCES
- FiltersAPI_Argument.cpp
- FiltersAPI_Feature.cpp
- FiltersAPI_Filter.cpp
- FiltersAPI_Selection.cpp
-)
+set(PROJECT_SOURCES FiltersAPI_Argument.cpp FiltersAPI_Feature.cpp
+ FiltersAPI_Filter.cpp FiltersAPI_Selection.cpp)
-SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
-)
+set(PROJECT_LIBRARIES ModelAPI ModelHighAPI)
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/FiltersPlugin
-)
+include_directories(${PROJECT_SOURCE_DIR}/src/FiltersPlugin)
-ADD_DEFINITIONS(-DFILTERSAPI_EXPORTS)
-ADD_LIBRARY(FiltersAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(FiltersAPI ${PROJECT_LIBRARIES})
+add_definitions(-DFILTERSAPI_EXPORTS)
+add_library(FiltersAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(FiltersAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
+include(PythonAPI)
-SET_SOURCE_FILES_PROPERTIES(FiltersAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(FiltersAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(FiltersAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(FiltersAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET(SWIG_LINK_LIBRARIES
- FiltersAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+set(SWIG_LINK_LIBRARIES FiltersAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-SET(SWIG_MODULE_FiltersAPI_EXTRA_DEPS ${SWIG_MODULE_FiltersAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
+set(SWIG_MODULE_FiltersAPI_EXTRA_DEPS
+ ${SWIG_MODULE_FiltersAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(FiltersAPI LANGUAGE python SOURCES FiltersAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(FiltersAPI python FiltersAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(FiltersAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ FiltersAPI
+ LANGUAGE python
+ SOURCES FiltersAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(FiltersAPI python FiltersAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(FiltersAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_FiltersAPI PROPERTIES DEBUG_OUTPUT_NAME _FiltersAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_FiltersAPI PROPERTIES DEBUG_OUTPUT_NAME _FiltersAPI_d)
+endif(WIN32)
-INSTALL(TARGETS _FiltersAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS FiltersAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/FiltersAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _FiltersAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS FiltersAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FiltersAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
-## Copyright (C) 2014-2023 CEA, EDF
-##
-## 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, 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
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-## Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU Lesser General Public
-## License along with this library; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-## See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-##
-
-INCLUDE(Common)
-INCLUDE(UnitTest)
-
-SET(PROJECT_HEADERS
+# Copyright (C) 2014-2023 CEA, EDF
+#
+# 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, 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 MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
+#
+
+include(Common)
+include(UnitTest)
+
+set(PROJECT_HEADERS
FiltersPlugin.h
FiltersPlugin_Plugin.h
FiltersPlugin_Selection.h
FiltersPlugin_VolumeSize.h
FiltersPlugin_FeatureEdges.h
FiltersPlugin_ContinuousFaces.h
- FiltersPlugin_OnShapeName.h
-)
+ FiltersPlugin_OnShapeName.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
FiltersPlugin_Plugin.cpp
FiltersPlugin_Selection.cpp
FiltersPlugin_HorizontalFace.cpp
FiltersPlugin_VolumeSize.cpp
FiltersPlugin_FeatureEdges.cpp
FiltersPlugin_ContinuousFaces.cpp
- FiltersPlugin_OnShapeName.cpp
-)
-
-SET(PROJECT_LIBRARIES
- ModelAPI
- Events
- Config
- GeomAPI
- GeomAlgoAPI
- GeomValidators
-)
-
-SET(PROJECT_PYFILES
- FiltersPlugin_TopoConnectedFaces.py
-)
-
-SET(XML_RESOURCES
- plugin-Filters.xml
- filter-BelongsTo.xml
- filter-OnGeometry.xml
- filter-OnLine.xml
- filter-OnPlane.xml
- filter-OnPlaneSide.xml
- filter-OppositeToEdge.xml
- filter-RelativeToSolid.xml
- filter-TopoConnectedFaces.xml
- filter-EdgeSize.xml
- filter-FaceSize.xml
- filter-VolumeSize.xml
- filter-FeatureEdges.xml
- filter-ContinuousFaces.xml
- filter-OnShapeName.xml
-)
-
-SET(TEXT_RESOURCES
- FiltersPlugin_msg_en.ts
- FiltersPlugin_msg_fr.ts
-)
-
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
-
-ADD_DEFINITIONS(-DFILTERS_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(FiltersPlugin SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
-TARGET_LINK_LIBRARIES(FiltersPlugin ${PROJECT_LIBRARIES})
-
-INCLUDE_DIRECTORIES(
+ FiltersPlugin_OnShapeName.cpp)
+
+set(PROJECT_LIBRARIES ModelAPI Events Config GeomAPI GeomAlgoAPI GeomValidators)
+
+set(PROJECT_PYFILES FiltersPlugin_TopoConnectedFaces.py)
+
+set(XML_RESOURCES
+ plugin-Filters.xml
+ filter-BelongsTo.xml
+ filter-OnGeometry.xml
+ filter-OnLine.xml
+ filter-OnPlane.xml
+ filter-OnPlaneSide.xml
+ filter-OppositeToEdge.xml
+ filter-RelativeToSolid.xml
+ filter-TopoConnectedFaces.xml
+ filter-EdgeSize.xml
+ filter-FaceSize.xml
+ filter-VolumeSize.xml
+ filter-FeatureEdges.xml
+ filter-ContinuousFaces.xml
+ filter-OnShapeName.xml)
+
+set(TEXT_RESOURCES FiltersPlugin_msg_en.ts FiltersPlugin_msg_fr.ts)
+
+source_group("XML Files" FILES ${XML_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
+
+add_definitions(-DFILTERS_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(FiltersPlugin SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES} ${TEXT_RESOURCES})
+target_link_libraries(FiltersPlugin ${PROJECT_LIBRARIES})
+
+include_directories(
${OpenCASCADE_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/src/ModelAPI
${PROJECT_SOURCE_DIR}/src/Config
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
${PROJECT_SOURCE_DIR}/src/GeomValidators
${PROJECT_SOURCE_DIR}/src/CollectionPlugin
- ${PROJECT_SOURCE_DIR}/src/Locale
-)
+ ${PROJECT_SOURCE_DIR}/src/Locale)
-INSTALL(TARGETS FiltersPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(FILES ${PROJECT_PYFILES} DESTINATION ${SHAPER_INSTALL_ADDONS})
-INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(TARGETS FiltersPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(FILES ${PROJECT_PYFILES} DESTINATION ${SHAPER_INSTALL_ADDONS})
+install(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/FiltersPlugin")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
- GDMLAPI.h
- GDMLAPI_ConeSegment.h
- GDMLAPI_Ellipsoid.h
-)
+set(PROJECT_HEADERS GDMLAPI.h GDMLAPI_ConeSegment.h GDMLAPI_Ellipsoid.h)
-SET(PROJECT_SOURCES
- GDMLAPI_ConeSegment.cpp
- GDMLAPI_Ellipsoid.cpp
-)
+set(PROJECT_SOURCES GDMLAPI_ConeSegment.cpp GDMLAPI_Ellipsoid.cpp)
-SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
-)
+set(PROJECT_LIBRARIES ModelAPI ModelHighAPI)
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/GDMLPlugin
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI ${PROJECT_SOURCE_DIR}/src/GDMLPlugin)
-ADD_DEFINITIONS(-DGDMLAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(GDMLAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(GDMLAPI ${PROJECT_LIBRARIES})
+add_definitions(-DGDMLAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(GDMLAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(GDMLAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
+include(PythonAPI)
-SET_SOURCE_FILES_PROPERTIES(GDMLAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(GDMLAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(GDMLAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(GDMLAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET(SWIG_LINK_LIBRARIES
- GDMLAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+set(SWIG_LINK_LIBRARIES GDMLAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-SET(SWIG_MODULE_GDMLAPI_EXTRA_DEPS ${SWIG_MODULE_GDMLAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
+set(SWIG_MODULE_GDMLAPI_EXTRA_DEPS
+ ${SWIG_MODULE_GDMLAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(GDMLAPI LANGUAGE python SOURCES GDMLAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(GDMLAPI python GDMLAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(GDMLAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ GDMLAPI
+ LANGUAGE python
+ SOURCES GDMLAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(GDMLAPI python GDMLAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(GDMLAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_GDMLAPI PROPERTIES DEBUG_OUTPUT_NAME _GDMLAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_GDMLAPI PROPERTIES DEBUG_OUTPUT_NAME _GDMLAPI_d)
+endif(WIN32)
-INSTALL(TARGETS _GDMLAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS GDMLAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDMLAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _GDMLAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS GDMLAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/GDMLAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UnitTest)
+include(Common)
+include(UnitTest)
-SET(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTOMOC ON)
-SET(PROJECT_HEADERS
- GDMLPlugin.h
- GDMLPlugin_Plugin.h
- GDMLPlugin_ConeSegment.h
- GDMLPlugin_Ellipsoid.h
-)
+set(PROJECT_HEADERS GDMLPlugin.h GDMLPlugin_Plugin.h GDMLPlugin_ConeSegment.h
+ GDMLPlugin_Ellipsoid.h)
-SET(PROJECT_SOURCES
- GDMLPlugin_Plugin.cpp
- GDMLPlugin_ConeSegment.cpp
- GDMLPlugin_Ellipsoid.cpp
-)
+set(PROJECT_SOURCES GDMLPlugin_Plugin.cpp GDMLPlugin_ConeSegment.cpp
+ GDMLPlugin_Ellipsoid.cpp)
-SET(XML_RESOURCES
- plugin-GDML.xml
- conesegment_widget.xml
- ellipsoid_widget.xml
-)
+set(XML_RESOURCES plugin-GDML.xml conesegment_widget.xml ellipsoid_widget.xml)
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
+source_group("XML Files" FILES ${XML_RESOURCES})
-INCLUDE_DIRECTORIES(
- ../ModelAPI
- ../GeomAPI
- ../GeomAlgoAPI
- ../Events
- ../Config
- ../ModuleBase
-)
+include_directories(../ModelAPI ../GeomAPI ../GeomAlgoAPI ../Events ../Config
+ ../ModuleBase)
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
Events
Config
ModelAPI
GeomAPI
GeomAlgoAPI
ModuleBase
- ${QT_LIBRARIES}
-)
+ ${QT_LIBRARIES})
-ADD_DEFINITIONS(-DGDMLPLUGIN_EXPORTS)
-ADD_LIBRARY(GDMLPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
-TARGET_LINK_LIBRARIES(GDMLPlugin ${PROJECT_LIBRARIES})
+add_definitions(-DGDMLPLUGIN_EXPORTS)
+add_library(GDMLPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES})
+target_link_libraries(GDMLPlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS GDMLPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/GDML)
+install(TARGETS GDMLPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/GDML)
-#ADD_UNIT_TESTS(
-# TestCone.py
-# TestEllipsoid.py
-#)
+# ADD_UNIT_TESTS( TestCone.py TestEllipsoid.py )
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-FIND_PACKAGE(SWIG REQUIRED)
+find_package(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE(UnitTest)
+include(${SWIG_USE_FILE})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include(UnitTest)
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
GeomAPI.h
GeomAPI_BSpline.h
GeomAPI_BSpline2d.h
GeomAPI_Torus.h
GeomAPI_Box.h
GeomAPI_WireExplorer.h
- GeomAPI_ShapeHierarchy.h
-)
+ GeomAPI_ShapeHierarchy.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
GeomAPI_BSpline.cpp
GeomAPI_BSpline2d.cpp
GeomAPI_Circ.cpp
GeomAPI_Torus.cpp
GeomAPI_Box.cpp
GeomAPI_WireExplorer.cpp
- GeomAPI_ShapeHierarchy.cpp
-)
+ GeomAPI_ShapeHierarchy.cpp)
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
${OpenCASCADE_FoundationClasses_LIBRARIES}
${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
- ${OpenCASCADE_Visualization_LIBRARIES}
-)
+ ${OpenCASCADE_Visualization_LIBRARIES})
-ADD_DEFINITIONS(-DGEOMAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(GeomAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+add_definitions(-DGEOMAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(GeomAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,362,383,512)
+set(CMAKE_SWIG_FLAGS -threads -w325,321,362,383,512)
-SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(GeomAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(GeomAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(GeomAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-INCLUDE_DIRECTORIES(
- ${OpenCASCADE_INCLUDE_DIR}
-)
+include_directories(${OpenCASCADE_INCLUDE_DIR})
-TARGET_LINK_LIBRARIES(GeomAPI ${PROJECT_LIBRARIES})
+target_link_libraries(GeomAPI ${PROJECT_LIBRARIES})
-SET(SWIG_SCRIPTS
- ${CMAKE_CURRENT_BINARY_DIR}/GeomAPI.py
-)
+set(SWIG_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/GeomAPI.py)
-SET(SWIG_LINK_LIBRARIES
- GeomAPI
- ${PYTHON_LIBRARIES}
-)
+set(SWIG_LINK_LIBRARIES GeomAPI ${PYTHON_LIBRARIES})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(GeomAPI LANGUAGE python SOURCES GeomAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(GeomAPI python GeomAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(GeomAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ GeomAPI
+ LANGUAGE python
+ SOURCES GeomAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(GeomAPI python GeomAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(GeomAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_GeomAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_GeomAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAPI_d)
+endif(WIN32)
-INSTALL(TARGETS _GeomAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS GeomAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _GeomAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS GeomAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/GeomAPI")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-FIND_PACKAGE(SWIG REQUIRED)
+find_package(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+include(${SWIG_USE_FILE})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
GeomAlgoAPI.h
GeomAlgoAPI_Tools.h
GeomAlgoAPI_CompoundBuilder.h
GeomAlgoAPI_NormalToFace.h
GeomAlgoAPI_Tube.h
GeomAlgoAPI_ShapeInfo.h
- GeomAlgoAPI_CanonicalRecognition.h
+ GeomAlgoAPI_CanonicalRecognition.h
GeomAlgoAPI_GlueFaces.h
GeomAlgoAPI_LimitTolerance.h
GeomAlgoAPI_Utils.h
- GeomAlgoAPI_NonPlanarFace.h
-)
+ GeomAlgoAPI_NonPlanarFace.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
GeomAlgoAPI_Tools.cpp
GeomAlgoAPI_CompoundBuilder.cpp
GeomAlgoAPI_FaceBuilder.cpp
GeomAlgoAPI_NormalToFace.cpp
GeomAlgoAPI_Tube.cpp
GeomAlgoAPI_ShapeInfo.cpp
- GeomAlgoAPI_CanonicalRecognition.cpp
+ GeomAlgoAPI_CanonicalRecognition.cpp
GeomAlgoAPI_GlueFaces.cpp
- GeomAlgoAPI_CanonicalRecognition.cpp
+ GeomAlgoAPI_CanonicalRecognition.cpp
GeomAlgoAPI_LimitTolerance.cpp
GeomAlgoAPI_Utils.cpp
- GeomAlgoAPI_NonPlanarFace.cpp
-)
+ GeomAlgoAPI_NonPlanarFace.cpp)
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
GeomAPI
GeomAlgoImpl
ModelAPI
XAOShaper
${OpenCASCADE_DataExchange_LIBRARIES}
${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
- ${OpenCASCADE_ApplicationFramework_LIBRARIES}
-)
+ ${OpenCASCADE_ApplicationFramework_LIBRARIES})
-ADD_DEFINITIONS(-DGEOMALGOAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+add_definitions(-DGEOMALGOAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(GeomAlgoAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-SET(CMAKE_SWIG_FLAGS -w325,321,362,383,302)
+set(CMAKE_SWIG_FLAGS -w325,321,362,383,302)
-SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(GeomAlgoAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(GeomAlgoAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
# additional include directories
-INCLUDE_DIRECTORIES(
- ../GeomAPI
- ../GeomAlgoImpl
- ../ModelAPI
- ../XAO
- ${PROJECT_SOURCE_DIR}/src/Locale
- ${OpenCASCADE_INCLUDE_DIR}
-)
+include_directories(../GeomAPI ../GeomAlgoImpl ../ModelAPI ../XAO
+ ${PROJECT_SOURCE_DIR}/src/Locale ${OpenCASCADE_INCLUDE_DIR})
-TARGET_LINK_LIBRARIES(GeomAlgoAPI ${PROJECT_LIBRARIES})
+target_link_libraries(GeomAlgoAPI ${PROJECT_LIBRARIES})
-SET(SWIG_SCRIPTS
- ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py
-)
+set(SWIG_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/GeomAlgoAPI.py)
-SET(SWIG_LINK_LIBRARIES
- GeomAPI
- GeomAlgoAPI
- GeomAlgoImpl
- ${PYTHON_LIBRARIES}
-)
+set(SWIG_LINK_LIBRARIES GeomAPI GeomAlgoAPI GeomAlgoImpl ${PYTHON_LIBRARIES})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(GeomAlgoAPI LANGUAGE python SOURCES GeomAlgoAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ GeomAlgoAPI
+ LANGUAGE python
+ SOURCES GeomAlgoAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(GeomAlgoAPI python GeomAlgoAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(GeomAlgoAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME
+ _GeomAlgoAPI_d)
+endif(WIN32)
-INSTALL(TARGETS _GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
GeomAlgoImpl.h
GEOMAlgo_Algo.hxx
GEOMAlgo_AlgoTools.hxx
GEOMAlgo_PassKeyShape.hxx
GEOMAlgo_PassKeyShapeMapHasher.hxx
GEOMAlgo_Splitter.hxx
- GEOMImpl_Fillet1d.hxx
-)
+ GEOMImpl_Fillet1d.hxx)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
GEOMAlgo_Algo.cxx
GEOMAlgo_AlgoTools.cxx
GEOMAlgo_AlgoTools_1.cxx
GEOMAlgo_PassKeyShape.cxx
GEOMAlgo_PassKeyShapeMapHasher.cxx
GEOMAlgo_Splitter.cxx
- GEOMImpl_Fillet1d.cxx
-)
+ GEOMImpl_Fillet1d.cxx)
-SET(PROJECT_LIBRARIES
- ${OpenCASCADE_FoundationClasses_LIBRARIES}
- ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
-)
+set(PROJECT_LIBRARIES ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES})
-ADD_DEFINITIONS(-DGEOMALGOIMPL_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(GeomAlgoImpl SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+add_definitions(-DGEOMALGOIMPL_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(GeomAlgoImpl SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-INCLUDE_DIRECTORIES(
- ${OpenCASCADE_INCLUDE_DIR}
-)
+include_directories(${OpenCASCADE_INCLUDE_DIR})
-TARGET_LINK_LIBRARIES(GeomAlgoImpl ${PROJECT_LIBRARIES})
+target_link_libraries(GeomAlgoImpl ${PROJECT_LIBRARIES})
-INSTALL(TARGETS GeomAlgoImpl DESTINATION ${SHAPER_INSTALL_BIN})
+install(TARGETS GeomAlgoImpl DESTINATION ${SHAPER_INSTALL_BIN})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
- GeomData.h
- GeomData_Point.h
- GeomData_Dir.h
- GeomData_Point2D.h
- GeomData_Point2DArray.h
-)
+set(PROJECT_HEADERS GeomData.h GeomData_Point.h GeomData_Dir.h
+ GeomData_Point2D.h GeomData_Point2DArray.h)
-SET(PROJECT_SOURCES
- GeomData_Point.cpp
- GeomData_Dir.cpp
- GeomData_Point2D.cpp
- GeomData_Point2DArray.cpp
-)
+set(PROJECT_SOURCES GeomData_Point.cpp GeomData_Dir.cpp GeomData_Point2D.cpp
+ GeomData_Point2DArray.cpp)
-SET(PROJECT_LIBRARIES
- GeomDataAPI
- ModelAPI
- GeomAPI
- Events
- ${OpenCASCADE_ApplicationFramework_LIBRARIES}
-)
+set(PROJECT_LIBRARIES GeomDataAPI ModelAPI GeomAPI Events
+ ${OpenCASCADE_ApplicationFramework_LIBRARIES})
-ADD_DEFINITIONS(-DGEOMDATA_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(GeomData SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(GeomData ${PROJECT_LIBRARIES})
+add_definitions(-DGEOMDATA_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(GeomData SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(GeomData ${PROJECT_LIBRARIES})
-INCLUDE_DIRECTORIES(
+include_directories(
../ModelAPI
../GeomDataAPI
../GeomAPI
../Events
../Config
../Model
- ${OpenCASCADE_INCLUDE_DIR}
-)
+ ${OpenCASCADE_INCLUDE_DIR})
-INSTALL(TARGETS GeomData DESTINATION ${SHAPER_INSTALL_BIN})
+install(TARGETS GeomData DESTINATION ${SHAPER_INSTALL_BIN})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-FIND_PACKAGE(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE(UnitTest)
-
-SET(PROJECT_HEADERS
- GeomDataAPI.h
- GeomDataAPI_Point.h
- GeomDataAPI_Dir.h
- GeomDataAPI_Point2D.h
- GeomDataAPI_Point2DArray.h
-)
-
-SET(PROJECT_SOURCES
- GeomDataAPI_Point.cpp
- GeomDataAPI_Dir.cpp
- GeomDataAPI_Point2D.cpp
- GeomDataAPI_Point2DArray.cpp
-)
-
-SET(PROJECT_LIBRARIES
- ModelAPI
-)
-
-INCLUDE_DIRECTORIES(
- ../GeomAPI # only for SWIG
- ../Events # only for SWIG
- ../ModelAPI
-)
-
-ADD_DEFINITIONS(-DGEOMDATAAPI_EXPORTS)
-ADD_LIBRARY(GeomDataAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-SET_TARGET_PROPERTIES(GeomDataAPI PROPERTIES LINKER_LANGUAGE CXX)
-TARGET_LINK_LIBRARIES(GeomDataAPI ${PROJECT_LIBRARIES})
-
-SET(CMAKE_SWIG_FLAGS -w325,321,362,383,302,403)
-
-SET_SOURCE_FILES_PROPERTIES(GeomDataAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(GeomDataAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-
-SET(SWIG_SCRIPTS
- ${CMAKE_CURRENT_BINARY_DIR}/GeomDataAPI.py
-)
-
-SET(SWIG_LINK_LIBRARIES
- GeomDataAPI
- ${PYTHON_LIBRARIES}
-)
-
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(GeomDataAPI LANGUAGE python SOURCES GeomDataAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(GeomDataAPI python GeomDataAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(GeomDataAPI ${SWIG_LINK_LIBRARIES})
-
-IF(WIN32)
- SET_TARGET_PROPERTIES(_GeomDataAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomDataAPI_d)
-ENDIF(WIN32)
-
-INSTALL(TARGETS GeomDataAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(TARGETS _GeomDataAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
+find_package(SWIG REQUIRED)
+include(${SWIG_USE_FILE})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include(UnitTest)
+
+set(PROJECT_HEADERS GeomDataAPI.h GeomDataAPI_Point.h GeomDataAPI_Dir.h
+ GeomDataAPI_Point2D.h GeomDataAPI_Point2DArray.h)
+
+set(PROJECT_SOURCES GeomDataAPI_Point.cpp GeomDataAPI_Dir.cpp
+ GeomDataAPI_Point2D.cpp GeomDataAPI_Point2DArray.cpp)
+
+set(PROJECT_LIBRARIES ModelAPI)
+
+include_directories(
+ ../GeomAPI # only for SWIG
+ ../Events # only for SWIG
+ ../ModelAPI)
+
+add_definitions(-DGEOMDATAAPI_EXPORTS)
+add_library(GeomDataAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+set_target_properties(GeomDataAPI PROPERTIES LINKER_LANGUAGE CXX)
+target_link_libraries(GeomDataAPI ${PROJECT_LIBRARIES})
+
+set(CMAKE_SWIG_FLAGS -w325,321,362,383,302,403)
+
+set_source_files_properties(GeomDataAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(GeomDataAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+
+set(SWIG_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/GeomDataAPI.py)
+
+set(SWIG_LINK_LIBRARIES GeomDataAPI ${PYTHON_LIBRARIES})
+
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ GeomDataAPI
+ LANGUAGE python
+ SOURCES GeomDataAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(GeomDataAPI python GeomDataAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(GeomDataAPI ${SWIG_LINK_LIBRARIES})
+
+if(WIN32)
+ set_target_properties(_GeomDataAPI PROPERTIES DEBUG_OUTPUT_NAME
+ _GeomDataAPI_d)
+endif(WIN32)
+
+install(TARGETS GeomDataAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(TARGETS _GeomDataAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/GeomDataAPI")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
GeomValidators.h
GeomValidators_BodyShapes.h
GeomValidators_ConstructionComposite.h
GeomValidators_ValueOrder.h
GeomValidators_Intersected.h
GeomValidators_NotSelfIntersected.h
- GeomValidators_GlobalSelection.h
-)
+ GeomValidators_GlobalSelection.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
GeomValidators_BodyShapes.cpp
GeomValidators_ConstructionComposite.cpp
GeomValidators_DifferentShapes.cpp
GeomValidators_ValueOrder.cpp
GeomValidators_Intersected.cpp
GeomValidators_NotSelfIntersected.cpp
- GeomValidators_GlobalSelection.cpp
-)
+ GeomValidators_GlobalSelection.cpp)
-SET(PROJECT_LIBRARIES
- ModelAPI
- Events
- Config
- GeomAPI
-)
+set(PROJECT_LIBRARIES ModelAPI Events Config GeomAPI)
-ADD_DEFINITIONS(-DGEOMVALIDATORS_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(GeomValidators SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(GeomValidators ${PROJECT_LIBRARIES})
+add_definitions(-DGEOMVALIDATORS_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(GeomValidators SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(GeomValidators ${PROJECT_LIBRARIES})
-INCLUDE_DIRECTORIES(
+include_directories(
${OpenCASCADE_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/src/ModelAPI
${PROJECT_SOURCE_DIR}/src/Config
${PROJECT_SOURCE_DIR}/src/Events
${PROJECT_SOURCE_DIR}/src/GeomAPI
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/BuildPlugin
-)
+ ${PROJECT_SOURCE_DIR}/src/BuildPlugin)
-INSTALL(TARGETS GeomValidators DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(TARGETS GeomValidators DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-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/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/Locale
- ${PROJECT_SOURCE_DIR}/src/ParametersPlugin
- ${PROJECT_SOURCE_DIR}/src/BuildPlugin
- ${SUIT_INCLUDE}
- ${PYTHON_INCLUDE_DIR}
-)
+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/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/Locale
+ ${PROJECT_SOURCE_DIR}/src/ParametersPlugin
+ ${PROJECT_SOURCE_DIR}/src/BuildPlugin
+ ${SUIT_INCLUDE}
+ ${PYTHON_INCLUDE_DIR})
-SET(PROJECT_HEADERS
- InitializationPlugin.h
- InitializationPlugin_Plugin.h
- InitializationPlugin_EvalListener.h
- InitializationPlugin_PyInterp.h
-)
+set(PROJECT_HEADERS
+ InitializationPlugin.h InitializationPlugin_Plugin.h
+ InitializationPlugin_EvalListener.h InitializationPlugin_PyInterp.h)
-SET(PROJECT_SOURCES
- InitializationPlugin_Plugin.cpp
- InitializationPlugin_EvalListener.cpp
- InitializationPlugin_PyInterp.cpp
-)
+set(PROJECT_SOURCES
+ InitializationPlugin_Plugin.cpp InitializationPlugin_EvalListener.cpp
+ InitializationPlugin_PyInterp.cpp)
-MESSAGE(STATUS "PYTHON_LIBRARIES (ParametersPlugin): ${PYTHON_LIBRARIES}")
+message(STATUS "PYTHON_LIBRARIES (ParametersPlugin): ${PYTHON_LIBRARIES}")
-SET(PROJECT_LIBRARIES
- Events
- Config
- ModelAPI
- Locale
- ${PyInterp}
- ${PYTHON_LIBRARIES}
-)
+set(PROJECT_LIBRARIES Events Config ModelAPI Locale ${PyInterp}
+ ${PYTHON_LIBRARIES})
-ADD_DEFINITIONS(-DINITIALIZATIONPLUGIN_EXPORTS -DHAVE_DEBUG_PYTHON)
-ADD_LIBRARY(InitializationPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
+add_definitions(-DINITIALIZATIONPLUGIN_EXPORTS -DHAVE_DEBUG_PYTHON)
+add_library(InitializationPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES})
-TARGET_LINK_LIBRARIES(InitializationPlugin ${PROJECT_LIBRARIES})
+target_link_libraries(InitializationPlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS InitializationPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-#INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
+install(TARGETS InitializationPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+# INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
# Copyright (C) 2020-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UnitTest)
+include(Common)
+include(UnitTest)
-IF(NOT Boost_INCLUDE_DIR)
- FILE(TO_CMAKE_PATH "$ENV{BOOST_ROOT_DIR}" BOOST_ROOT)
- FIND_PACKAGE(Boost REQUIRED)
-ENDIF()
+if(NOT Boost_INCLUDE_DIR)
+ file(TO_CMAKE_PATH "$ENV{BOOST_ROOT_DIR}" BOOST_ROOT)
+ find_package(Boost REQUIRED)
+endif()
-INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${Boost_INCLUDE_DIR}
-)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${Boost_INCLUDE_DIR})
-SET(PROJECT_HEADERS
- Locale_def.h
- Locale_Convert.h
-)
+set(PROJECT_HEADERS Locale_def.h Locale_Convert.h)
-SET(PROJECT_SOURCES
- Locale_Convert.cpp
-)
+set(PROJECT_SOURCES Locale_Convert.cpp)
-SET(PROJECT_LIBRARIES
-)
+set(PROJECT_LIBRARIES)
-ADD_DEFINITIONS(-DLOCALE_EXPORTS)
-ADD_LIBRARY(Locale SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(Locale ${PROJECT_LIBRARIES})
+add_definitions(-DLOCALE_EXPORTS)
+add_library(Locale SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(Locale ${PROJECT_LIBRARIES})
-INSTALL(TARGETS Locale DESTINATION ${SHAPER_INSTALL_BIN})
+install(TARGETS Locale DESTINATION ${SHAPER_INSTALL_BIN})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/Locale")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
Model.h
Model_Application.h
Model_Document.h
Model_ResultParameter.h
Model_Tools.h
Model_Update.h
- Model_Validator.h
-)
+ Model_Validator.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
Model_Application.cpp
Model_Document.cpp
Model_Objects.cpp
Model_ResultParameter.cpp
Model_Tools.cpp
Model_Update.cpp
- Model_Validator.cpp
-)
+ Model_Validator.cpp)
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
ModelAPI
Events
Config
GeomAlgoAPI
Locale
ModelGeomAlgo
- ${OpenCASCADE_ApplicationFramework_LIBRARIES}
-)
-SET(PROJECT_INCLUDES
- ../ModelAPI
- ../Events
- ../Config
- ../Selector
- ../GeomData
- ../GeomDataAPI
- ../GeomAlgoAPI
- ../GeomAPI
- ../Locale
- ../ModelGeomAlgo
- ../ConstructionPlugin
- ${OpenCASCADE_INCLUDE_DIR}
-)
+ ${OpenCASCADE_ApplicationFramework_LIBRARIES})
+set(PROJECT_INCLUDES
+ ../ModelAPI
+ ../Events
+ ../Config
+ ../Selector
+ ../GeomData
+ ../GeomDataAPI
+ ../GeomAlgoAPI
+ ../GeomAPI
+ ../Locale
+ ../ModelGeomAlgo
+ ../ConstructionPlugin
+ ${OpenCASCADE_INCLUDE_DIR})
+if(TKTInspector)
+ add_definitions(-DTINSPECTOR)
+endif()
-IF(TKTInspector)
- ADD_DEFINITIONS(-DTINSPECTOR)
-ENDIF()
+add_definitions(-DMODEL_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(Model SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(Model ${PROJECT_LIBRARIES})
-ADD_DEFINITIONS(-DMODEL_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(Model SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(Model ${PROJECT_LIBRARIES})
+include_directories(${PROJECT_INCLUDES})
-INCLUDE_DIRECTORIES(${PROJECT_INCLUDES})
-
-INSTALL(TARGETS Model DESTINATION ${SHAPER_INSTALL_BIN})
+install(TARGETS Model DESTINATION ${SHAPER_INSTALL_BIN})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-FIND_PACKAGE(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE(UnitTest)
+find_package(SWIG REQUIRED)
+include(${SWIG_USE_FILE})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include(UnitTest)
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
ModelAPI.h
ModelAPI_Attribute.h
ModelAPI_AttributeBoolean.h
ModelAPI_ResultPart.h
ModelAPI_Session.h
ModelAPI_Tools.h
- ModelAPI_Validator.h
-)
+ ModelAPI_Validator.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
ModelAPI_Attribute.cpp
ModelAPI_AttributeBoolean.cpp
ModelAPI_AttributeImage.cpp
ModelAPI_ResultPart.cpp
ModelAPI_ResultParameter.cpp
ModelAPI_Session.cpp
- ModelAPI_Tools.cpp
-)
-
-SET(PROJECT_LIBRARIES
- Config
- GeomAPI
- Locale
-)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,362,383,302,403,451,473)
-ADD_DEFINITIONS(-DMODELAPI_EXPORTS)
-
-ADD_LIBRARY(ModelAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-SET_TARGET_PROPERTIES(ModelAPI PROPERTIES LINKER_LANGUAGE CXX)
-TARGET_LINK_LIBRARIES(ModelAPI ${PROJECT_LIBRARIES})
-
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Config
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${PROJECT_SOURCE_DIR}/src/Locale
-)
-
-
-SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES CPLUSPLUS ON)
-# "-includeall" is not needed: it starts to follow the standard inludes (like "string") without success
-# SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES SWIG_FLAGS)
-SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-#SET_SOURCE_FILES_PROPERTIES(ModelAPIPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "-D_WIN32")
-
-SET(SWIG_SCRIPTS
- ${CMAKE_CURRENT_BINARY_DIR}/ModelAPI.py
-)
-
-SET(SWIG_LINK_LIBRARIES
- ModelAPI
- GeomAPI
- ${PYTHON_LIBRARIES}
-)
-
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(ModelAPI LANGUAGE python SOURCES ModelAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(ModelAPI python ModelAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(ModelAPI ${SWIG_LINK_LIBRARIES})
-
-IF(WIN32)
- SET_TARGET_PROPERTIES(_ModelAPI PROPERTIES DEBUG_OUTPUT_NAME _ModelAPI_d)
-ENDIF(WIN32)
-
-INSTALL(TARGETS _ModelAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS ModelAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
+ ModelAPI_Tools.cpp)
+
+set(PROJECT_LIBRARIES Config GeomAPI Locale)
+set(CMAKE_SWIG_FLAGS -threads -w325,321,362,383,302,403,451,473)
+add_definitions(-DMODELAPI_EXPORTS)
+
+add_library(ModelAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+set_target_properties(ModelAPI PROPERTIES LINKER_LANGUAGE CXX)
+target_link_libraries(ModelAPI ${PROJECT_LIBRARIES})
+
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Config ${PROJECT_SOURCE_DIR}/src/Events
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/Locale)
+
+set_source_files_properties(ModelAPI.i PROPERTIES CPLUSPLUS ON)
+# "-includeall" is not needed: it starts to follow the standard inludes (like
+# "string") without success SET_SOURCE_FILES_PROPERTIES(ModelAPI.i PROPERTIES
+# SWIG_FLAGS)
+set_source_files_properties(ModelAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+# SET_SOURCE_FILES_PROPERTIES(ModelAPIPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS
+# "-D_WIN32")
+
+set(SWIG_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/ModelAPI.py)
+
+set(SWIG_LINK_LIBRARIES ModelAPI GeomAPI ${PYTHON_LIBRARIES})
+
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ ModelAPI
+ LANGUAGE python
+ SOURCES ModelAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(ModelAPI python ModelAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(ModelAPI ${SWIG_LINK_LIBRARIES})
+
+if(WIN32)
+ set_target_properties(_ModelAPI PROPERTIES DEBUG_OUTPUT_NAME _ModelAPI_d)
+endif(WIN32)
+
+install(TARGETS _ModelAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS ModelAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ModelAPI")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-FIND_PACKAGE(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE(UnitTest)
-
-SET(PROJECT_HEADERS
- ModelGeomAlgo.h
- ModelGeomAlgo_Point2D.h
- ModelGeomAlgo_Shape.h
-)
-
-SET(PROJECT_SOURCES
- ModelGeomAlgo_Point2D.cpp
- ModelGeomAlgo_Shape.cpp
-)
-
-SET(PROJECT_LIBRARIES
- Config
- GeomAPI
- GeomDataAPI
- GeomAlgoAPI
- ModelAPI
-)
-
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,362,383,302,403)
-ADD_DEFINITIONS(-DMODELGEOMALGO_EXPORTS)
-
-ADD_LIBRARY(ModelGeomAlgo SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-SET_TARGET_PROPERTIES(ModelGeomAlgo PROPERTIES LINKER_LANGUAGE CXX)
-TARGET_LINK_LIBRARIES(ModelGeomAlgo ${PROJECT_LIBRARIES})
-
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Config
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
-)
-
-
-SET_SOURCE_FILES_PROPERTIES(ModelGeomAlgo.i PROPERTIES CPLUSPLUS ON)
-# "-includeall" is not needed: it starts to follow the standard inludes (like "string") without success
-# SET_SOURCE_FILES_PROPERTIES(ModelGeomAlgo.i PROPERTIES SWIG_FLAGS)
-SET_SOURCE_FILES_PROPERTIES(ModelGeomAlgo.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-#SET_SOURCE_FILES_PROPERTIES(ModelGeomAlgoPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "-D_WIN32")
-
-SET(SWIG_SCRIPTS
- ${CMAKE_CURRENT_BINARY_DIR}/ModelGeomAlgo.py
-)
-
-SET(SWIG_LINK_LIBRARIES
- ModelGeomAlgo
- GeomAPI
- ${PYTHON_LIBRARIES}
-)
-
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(ModelGeomAlgo LANGUAGE python SOURCES ModelGeomAlgo.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(ModelGeomAlgo python ModelGeomAlgo.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(ModelGeomAlgo ${SWIG_LINK_LIBRARIES})
-
-IF(WIN32)
- SET_TARGET_PROPERTIES(_ModelGeomAlgo PROPERTIES DEBUG_OUTPUT_NAME _ModelGeomAlgo_d)
-ENDIF(WIN32)
-
-INSTALL(TARGETS _ModelGeomAlgo DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS ModelGeomAlgo DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
+find_package(SWIG REQUIRED)
+include(${SWIG_USE_FILE})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include(UnitTest)
+
+set(PROJECT_HEADERS ModelGeomAlgo.h ModelGeomAlgo_Point2D.h
+ ModelGeomAlgo_Shape.h)
+
+set(PROJECT_SOURCES ModelGeomAlgo_Point2D.cpp ModelGeomAlgo_Shape.cpp)
+
+set(PROJECT_LIBRARIES Config GeomAPI GeomDataAPI GeomAlgoAPI ModelAPI)
+
+set(CMAKE_SWIG_FLAGS -threads -w325,321,362,383,302,403)
+add_definitions(-DMODELGEOMALGO_EXPORTS)
+
+add_library(ModelGeomAlgo SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+set_target_properties(ModelGeomAlgo PROPERTIES LINKER_LANGUAGE CXX)
+target_link_libraries(ModelGeomAlgo ${PROJECT_LIBRARIES})
+
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Config ${PROJECT_SOURCE_DIR}/src/Events
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI ${PROJECT_SOURCE_DIR}/src/ModelAPI)
+
+set_source_files_properties(ModelGeomAlgo.i PROPERTIES CPLUSPLUS ON)
+# "-includeall" is not needed: it starts to follow the standard inludes (like
+# "string") without success SET_SOURCE_FILES_PROPERTIES(ModelGeomAlgo.i
+# PROPERTIES SWIG_FLAGS)
+set_source_files_properties(ModelGeomAlgo.i PROPERTIES SWIG_DEFINITIONS
+ "-shadow")
+# SET_SOURCE_FILES_PROPERTIES(ModelGeomAlgoPYTHON_wrap.cxx PROPERTIES
+# COMPILE_FLAGS "-D_WIN32")
+
+set(SWIG_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/ModelGeomAlgo.py)
+
+set(SWIG_LINK_LIBRARIES ModelGeomAlgo GeomAPI ${PYTHON_LIBRARIES})
+
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ ModelGeomAlgo
+ LANGUAGE python
+ SOURCES ModelGeomAlgo.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(ModelGeomAlgo python ModelGeomAlgo.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(ModelGeomAlgo ${SWIG_LINK_LIBRARIES})
+
+if(WIN32)
+ set_target_properties(_ModelGeomAlgo PROPERTIES DEBUG_OUTPUT_NAME
+ _ModelGeomAlgo_d)
+endif(WIN32)
+
+install(TARGETS _ModelGeomAlgo DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS ModelGeomAlgo DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ModelGeomAlgo")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-
-SET(PROJECT_HEADERS
- ModelHighAPI.h
- ModelHighAPI_Double.h
- ModelHighAPI_Dumper.h
- ModelHighAPI_Integer.h
- ModelHighAPI_Interface.h
- ModelHighAPI_Macro.h
- ModelHighAPI_RefAttr.h
- ModelHighAPI_Reference.h
- ModelHighAPI_Selection.h
- ModelHighAPI_Services.h
- ModelHighAPI_Tools.h
- ModelHighAPI_FeatureStore.h
- ModelHighAPI_Folder.h
-)
-
-SET(PROJECT_SOURCES
- ModelHighAPI_Double.cpp
- ModelHighAPI_Dumper.cpp
- ModelHighAPI_Integer.cpp
- ModelHighAPI_Interface.cpp
- ModelHighAPI_RefAttr.cpp
- ModelHighAPI_Reference.cpp
- ModelHighAPI_Selection.cpp
- ModelHighAPI_Services.cpp
- ModelHighAPI_Tools.cpp
- ModelHighAPI_FeatureStore.cpp
- ModelHighAPI_Folder.cpp
-)
-
-SET(PROJECT_LIBRARIES
- Config
- Events
- GeomAPI
- GeomDataAPI
- GeomAlgoAPI
- Locale
- ModelAPI
- ModelGeomAlgo
-)
-
-ADD_DEFINITIONS(-DMODELHIGHAPI_EXPORTS -DWNT)
-ADD_LIBRARY(ModelHighAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-#TODO(spo): is it necessary?
-SET_TARGET_PROPERTIES(ModelHighAPI PROPERTIES LINKER_LANGUAGE CXX)
-TARGET_LINK_LIBRARIES(ModelHighAPI ${PROJECT_LIBRARIES})
+include(Common)
+
+set(PROJECT_HEADERS
+ ModelHighAPI.h
+ ModelHighAPI_Double.h
+ ModelHighAPI_Dumper.h
+ ModelHighAPI_Integer.h
+ ModelHighAPI_Interface.h
+ ModelHighAPI_Macro.h
+ ModelHighAPI_RefAttr.h
+ ModelHighAPI_Reference.h
+ ModelHighAPI_Selection.h
+ ModelHighAPI_Services.h
+ ModelHighAPI_Tools.h
+ ModelHighAPI_FeatureStore.h
+ ModelHighAPI_Folder.h)
+
+set(PROJECT_SOURCES
+ ModelHighAPI_Double.cpp
+ ModelHighAPI_Dumper.cpp
+ ModelHighAPI_Integer.cpp
+ ModelHighAPI_Interface.cpp
+ ModelHighAPI_RefAttr.cpp
+ ModelHighAPI_Reference.cpp
+ ModelHighAPI_Selection.cpp
+ ModelHighAPI_Services.cpp
+ ModelHighAPI_Tools.cpp
+ ModelHighAPI_FeatureStore.cpp
+ ModelHighAPI_Folder.cpp)
+
+set(PROJECT_LIBRARIES
+ Config
+ Events
+ GeomAPI
+ GeomDataAPI
+ GeomAlgoAPI
+ Locale
+ ModelAPI
+ ModelGeomAlgo)
+
+add_definitions(-DMODELHIGHAPI_EXPORTS -DWNT)
+add_library(ModelHighAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+# TODO(spo): is it necessary?
+set_target_properties(ModelHighAPI PROPERTIES LINKER_LANGUAGE CXX)
+target_link_libraries(ModelHighAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
+include(PythonAPI)
-SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(ModelHighAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(ModelHighAPI.i PROPERTIES SWIG_DEFINITIONS
+ "-shadow")
-SET(SWIG_LINK_LIBRARIES
- ModelHighAPI
- ${PYTHON_LIBRARIES}
-)
+set(SWIG_LINK_LIBRARIES ModelHighAPI ${PYTHON_LIBRARIES})
-INCLUDE_DIRECTORIES(
+include_directories(
${PROJECT_SOURCE_DIR}/src/Config
${PROJECT_SOURCE_DIR}/src/Events
${PROJECT_SOURCE_DIR}/src/GeomAPI
${PROJECT_SOURCE_DIR}/src/Locale
${PROJECT_SOURCE_DIR}/src/ModelAPI
${PROJECT_SOURCE_DIR}/src/ModelGeomAlgo
- ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
-)
-
-set(SWIG_MODULE_ModelHighAPI_EXTRA_DEPS
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403,509,503)
-
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(ModelHighAPI LANGUAGE python SOURCES ModelHighAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(ModelHighAPI python ModelHighAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(ModelHighAPI ${SWIG_LINK_LIBRARIES})
-
-IF(WIN32)
- SET_TARGET_PROPERTIES(_ModelHighAPI PROPERTIES DEBUG_OUTPUT_NAME _ModelHighAPI_d)
-ENDIF(WIN32)
-
-INSTALL(TARGETS _ModelHighAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS ModelHighAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ModelHighAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+ ${PROJECT_SOURCE_DIR}/src/PartSetPlugin)
+
+set(SWIG_MODULE_ModelHighAPI_EXTRA_DEPS doxyhelp.i ${PROJECT_HEADERS})
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403,509,503)
+
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ ModelHighAPI
+ LANGUAGE python
+ SOURCES ModelHighAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(ModelHighAPI python ModelHighAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(ModelHighAPI ${SWIG_LINK_LIBRARIES})
+
+if(WIN32)
+ set_target_properties(_ModelHighAPI PROPERTIES DEBUG_OUTPUT_NAME
+ _ModelHighAPI_d)
+endif(WIN32)
+
+install(TARGETS _ModelHighAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS ModelHighAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ModelHighAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Tests
-INCLUDE(UnitTest)
+include(UnitTest)
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ModelHighAPI")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UseQtExt)
+include(Common)
+include(UseQtExt)
# --- options ---
# additional include directories
-INCLUDE_DIRECTORIES(${QT_INCLUDES})
+include_directories(${QT_INCLUDES})
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS})
+add_definitions(${QT_DEFINITIONS})
-SET(UPDATE_TRANSLATION OFF)
+set(UPDATE_TRANSLATION OFF)
-SET(PROJECT_HEADERS
- ModuleBase.h
- ModuleBase_ActionInfo.h
- ModuleBase_ActionType.h
- ModuleBase_BRepOwner.h
- ModuleBase_Definitions.h
- ModuleBase_DoubleSpinBox.h
- ModuleBase_Events.h
- ModuleBase_Filter.h
- ModuleBase_FilterValidated.h
- ModuleBase_IErrorMgr.h
- ModuleBase_IModule.h
- ModuleBase_IntSpinBox.h
- ModuleBase_IPrefMgr.h
- ModuleBase_IPropertyPanel.h
- ModuleBase_ISelection.h
- ModuleBase_ISelectionActivate.h
- ModuleBase_IViewWindow.h
- ModuleBase_IViewer.h
- ModuleBase_IWidgetCreator.h
- ModuleBase_IWorkshop.h
- ModuleBase_LabelValue.h
- ModuleBase_ListView.h
- ModuleBase_ModelWidget.h
- ModuleBase_Operation.h
- ModuleBase_OperationDescription.h
- ModuleBase_OperationFeature.h
- ModuleBase_PageBase.h
- ModuleBase_PageGroupBox.h
- ModuleBase_PageWidget.h
- ModuleBase_PagedContainer.h
- ModuleBase_ParamIntSpinBox.h
- ModuleBase_ParamSpinBox.h
- ModuleBase_Preferences.h
- ModuleBase_ResultPrs.h
- ModuleBase_SelectionValidator.h
- ModuleBase_ToolBox.h
- ModuleBase_Tools.h
- ModuleBase_ViewerFilters.h
- ModuleBase_ViewerPrs.h
- ModuleBase_WidgetAction.h
- ModuleBase_WidgetBoolValue.h
- ModuleBase_WidgetChoice.h
- ModuleBase_WidgetConcealedObjects.h
- ModuleBase_WidgetCreatorFactory.h
- ModuleBase_WidgetDoubleValue.h
- ModuleBase_WidgetEditor.h
- ModuleBase_WidgetExprEditor.h
- ModuleBase_WidgetFactory.h
- ModuleBase_WidgetFeatureSelector.h
- ModuleBase_WidgetFileSelector.h
- ModuleBase_WidgetIntValue.h
- ModuleBase_WidgetLabel.h
- ModuleBase_WidgetLabelValue.h
- ModuleBase_WidgetLineEdit.h
- ModuleBase_WidgetMultiSelector.h
- ModuleBase_WidgetOptionalBox.h
- ModuleBase_WidgetSelector.h
- ModuleBase_WidgetSelectorStore.h
- ModuleBase_WidgetShapeSelector.h
- ModuleBase_WidgetSwitch.h
- ModuleBase_WidgetToolbox.h
- ModuleBase_WidgetValidated.h
- ModuleBase_WidgetValidator.h
- ModuleBase_IconFactory.h
- ModuleBase_Dialog.h
- ModuleBase_ModelDialogWidget.h
- ModuleBase_ActionParameter.h
- ModuleBase_ActionIntParameter.h
- ModuleBase_ChoiceCtrl.h
- ModuleBase_WidgetNameEdit.h
- ModuleBase_WidgetRadiobox.h
- ModuleBase_WidgetPointInput.h
- ModuleBase_ITreeNode.h
- ModuleBase_WidgetSelectionFilter.h
- ModuleBase_IStepPrs.h
- ModuleBase_SelectionFilterType.h
- ModuleBase_WidgetUndoLabel.h
-)
+set(PROJECT_HEADERS
+ ModuleBase.h
+ ModuleBase_ActionInfo.h
+ ModuleBase_ActionType.h
+ ModuleBase_BRepOwner.h
+ ModuleBase_Definitions.h
+ ModuleBase_DoubleSpinBox.h
+ ModuleBase_Events.h
+ ModuleBase_Filter.h
+ ModuleBase_FilterValidated.h
+ ModuleBase_IErrorMgr.h
+ ModuleBase_IModule.h
+ ModuleBase_IntSpinBox.h
+ ModuleBase_IPrefMgr.h
+ ModuleBase_IPropertyPanel.h
+ ModuleBase_ISelection.h
+ ModuleBase_ISelectionActivate.h
+ ModuleBase_IViewWindow.h
+ ModuleBase_IViewer.h
+ ModuleBase_IWidgetCreator.h
+ ModuleBase_IWorkshop.h
+ ModuleBase_LabelValue.h
+ ModuleBase_ListView.h
+ ModuleBase_ModelWidget.h
+ ModuleBase_Operation.h
+ ModuleBase_OperationDescription.h
+ ModuleBase_OperationFeature.h
+ ModuleBase_PageBase.h
+ ModuleBase_PageGroupBox.h
+ ModuleBase_PageWidget.h
+ ModuleBase_PagedContainer.h
+ ModuleBase_ParamIntSpinBox.h
+ ModuleBase_ParamSpinBox.h
+ ModuleBase_Preferences.h
+ ModuleBase_ResultPrs.h
+ ModuleBase_SelectionValidator.h
+ ModuleBase_ToolBox.h
+ ModuleBase_Tools.h
+ ModuleBase_ViewerFilters.h
+ ModuleBase_ViewerPrs.h
+ ModuleBase_WidgetAction.h
+ ModuleBase_WidgetBoolValue.h
+ ModuleBase_WidgetChoice.h
+ ModuleBase_WidgetConcealedObjects.h
+ ModuleBase_WidgetCreatorFactory.h
+ ModuleBase_WidgetDoubleValue.h
+ ModuleBase_WidgetEditor.h
+ ModuleBase_WidgetExprEditor.h
+ ModuleBase_WidgetFactory.h
+ ModuleBase_WidgetFeatureSelector.h
+ ModuleBase_WidgetFileSelector.h
+ ModuleBase_WidgetIntValue.h
+ ModuleBase_WidgetLabel.h
+ ModuleBase_WidgetLabelValue.h
+ ModuleBase_WidgetLineEdit.h
+ ModuleBase_WidgetMultiSelector.h
+ ModuleBase_WidgetOptionalBox.h
+ ModuleBase_WidgetSelector.h
+ ModuleBase_WidgetSelectorStore.h
+ ModuleBase_WidgetShapeSelector.h
+ ModuleBase_WidgetSwitch.h
+ ModuleBase_WidgetToolbox.h
+ ModuleBase_WidgetValidated.h
+ ModuleBase_WidgetValidator.h
+ ModuleBase_IconFactory.h
+ ModuleBase_Dialog.h
+ ModuleBase_ModelDialogWidget.h
+ ModuleBase_ActionParameter.h
+ ModuleBase_ActionIntParameter.h
+ ModuleBase_ChoiceCtrl.h
+ ModuleBase_WidgetNameEdit.h
+ ModuleBase_WidgetRadiobox.h
+ ModuleBase_WidgetPointInput.h
+ ModuleBase_ITreeNode.h
+ ModuleBase_WidgetSelectionFilter.h
+ ModuleBase_IStepPrs.h
+ ModuleBase_SelectionFilterType.h
+ ModuleBase_WidgetUndoLabel.h)
-SET(PROJECT_MOC_HEADERS
- ModuleBase_Dialog.h
- ModuleBase_DoubleSpinBox.h
- ModuleBase_IErrorMgr.h
- ModuleBase_IModule.h
- ModuleBase_IntSpinBox.h
- ModuleBase_IPropertyPanel.h
- ModuleBase_IViewer.h
- ModuleBase_IWorkshop.h
- ModuleBase_LabelValue.h
- ModuleBase_ListView.h
- ModuleBase_ModelDialogWidget.h
- ModuleBase_ModelWidget.h
- ModuleBase_Operation.h
- ModuleBase_OperationFeature.h
- ModuleBase_PagedContainer.h
- ModuleBase_PageGroupBox.h
- ModuleBase_PageWidget.h
- ModuleBase_ParamIntSpinBox.h
- ModuleBase_ParamSpinBox.h
- ModuleBase_Preferences.h
- ModuleBase_ToolBox.h
- ModuleBase_WidgetAction.h
- ModuleBase_WidgetBoolValue.h
- ModuleBase_WidgetChoice.h
- ModuleBase_WidgetConcealedObjects.h
- ModuleBase_WidgetDoubleValue.h
- ModuleBase_WidgetEditor.h
- ModuleBase_WidgetExprEditor.h
- ModuleBase_WidgetFeatureSelector.h
- ModuleBase_WidgetFileSelector.h
- ModuleBase_WidgetIntValue.h
- ModuleBase_WidgetLabel.h
- ModuleBase_WidgetLabelValue.h
- ModuleBase_WidgetLineEdit.h
- ModuleBase_WidgetMultiSelector.h
- ModuleBase_WidgetOptionalBox.h
- ModuleBase_WidgetSelector.h
- ModuleBase_WidgetShapeSelector.h
- ModuleBase_WidgetSwitch.h
- ModuleBase_WidgetToolbox.h
- ModuleBase_WidgetValidated.h
- ModuleBase_ChoiceCtrl.h
- ModuleBase_WidgetNameEdit.h
- ModuleBase_WidgetRadiobox.h
- ModuleBase_WidgetPointInput.h
- ModuleBase_WidgetSelectionFilter.h
- ModuleBase_WidgetUndoLabel.h
-)
+set(PROJECT_MOC_HEADERS
+ ModuleBase_Dialog.h
+ ModuleBase_DoubleSpinBox.h
+ ModuleBase_IErrorMgr.h
+ ModuleBase_IModule.h
+ ModuleBase_IntSpinBox.h
+ ModuleBase_IPropertyPanel.h
+ ModuleBase_IViewer.h
+ ModuleBase_IWorkshop.h
+ ModuleBase_LabelValue.h
+ ModuleBase_ListView.h
+ ModuleBase_ModelDialogWidget.h
+ ModuleBase_ModelWidget.h
+ ModuleBase_Operation.h
+ ModuleBase_OperationFeature.h
+ ModuleBase_PagedContainer.h
+ ModuleBase_PageGroupBox.h
+ ModuleBase_PageWidget.h
+ ModuleBase_ParamIntSpinBox.h
+ ModuleBase_ParamSpinBox.h
+ ModuleBase_Preferences.h
+ ModuleBase_ToolBox.h
+ ModuleBase_WidgetAction.h
+ ModuleBase_WidgetBoolValue.h
+ ModuleBase_WidgetChoice.h
+ ModuleBase_WidgetConcealedObjects.h
+ ModuleBase_WidgetDoubleValue.h
+ ModuleBase_WidgetEditor.h
+ ModuleBase_WidgetExprEditor.h
+ ModuleBase_WidgetFeatureSelector.h
+ ModuleBase_WidgetFileSelector.h
+ ModuleBase_WidgetIntValue.h
+ ModuleBase_WidgetLabel.h
+ ModuleBase_WidgetLabelValue.h
+ ModuleBase_WidgetLineEdit.h
+ ModuleBase_WidgetMultiSelector.h
+ ModuleBase_WidgetOptionalBox.h
+ ModuleBase_WidgetSelector.h
+ ModuleBase_WidgetShapeSelector.h
+ ModuleBase_WidgetSwitch.h
+ ModuleBase_WidgetToolbox.h
+ ModuleBase_WidgetValidated.h
+ ModuleBase_ChoiceCtrl.h
+ ModuleBase_WidgetNameEdit.h
+ ModuleBase_WidgetRadiobox.h
+ ModuleBase_WidgetPointInput.h
+ ModuleBase_WidgetSelectionFilter.h
+ ModuleBase_WidgetUndoLabel.h)
-SET(PROJECT_SOURCES
- ModuleBase_ActionInfo.cpp
- ModuleBase_BRepOwner.cpp
- ModuleBase_DoubleSpinBox.cpp
- ModuleBase_Filter.cpp
- ModuleBase_FilterValidated.cpp
- ModuleBase_IErrorMgr.cpp
- ModuleBase_IModule.cpp
- ModuleBase_IntSpinBox.cpp
- ModuleBase_IPrefMgr.cpp
- ModuleBase_IPropertyPanel.cpp
- ModuleBase_ISelection.cpp
- ModuleBase_IViewWindow.cpp
- ModuleBase_IViewer.cpp
- ModuleBase_IWidgetCreator.cpp
- ModuleBase_IWorkshop.cpp
- ModuleBase_LabelValue.cpp
- ModuleBase_ListView.cpp
- ModuleBase_ModelWidget.cpp
- ModuleBase_Operation.cpp
- ModuleBase_OperationDescription.cpp
- ModuleBase_OperationFeature.cpp
- ModuleBase_PageBase.cpp
- ModuleBase_PageGroupBox.cpp
- ModuleBase_PageWidget.cpp
- ModuleBase_PagedContainer.cpp
- ModuleBase_ParamIntSpinBox.cpp
- ModuleBase_ParamSpinBox.cpp
- ModuleBase_Preferences.cpp
- ModuleBase_ResultPrs.cpp
- ModuleBase_ToolBox.cpp
- ModuleBase_Tools.cpp
- ModuleBase_ViewerFilters.cpp
- ModuleBase_ViewerPrs.cpp
- ModuleBase_WidgetAction.cpp
- ModuleBase_WidgetBoolValue.cpp
- ModuleBase_WidgetChoice.cpp
- ModuleBase_WidgetConcealedObjects.cpp
- ModuleBase_WidgetCreatorFactory.cpp
- ModuleBase_WidgetDoubleValue.cpp
- ModuleBase_WidgetEditor.cpp
- ModuleBase_WidgetExprEditor.cpp
- ModuleBase_WidgetFactory.cpp
- ModuleBase_WidgetFeatureSelector.cpp
- ModuleBase_WidgetFileSelector.cpp
- ModuleBase_WidgetIntValue.cpp
- ModuleBase_WidgetLabel.cpp
- ModuleBase_WidgetLabelValue.cpp
- ModuleBase_WidgetLineEdit.cpp
- ModuleBase_WidgetMultiSelector.cpp
- ModuleBase_WidgetOptionalBox.cpp
- ModuleBase_WidgetSelector.cpp
- ModuleBase_WidgetSelectorStore.cpp
- ModuleBase_WidgetShapeSelector.cpp
- ModuleBase_WidgetSwitch.cpp
- ModuleBase_WidgetToolbox.cpp
- ModuleBase_WidgetValidated.cpp
- ModuleBase_WidgetValidator.cpp
- ModuleBase_IconFactory.cpp
- ModuleBase_SelectionValidator.cpp
- ModuleBase_Dialog.cpp
- ModuleBase_ChoiceCtrl.cpp
- ModuleBase_WidgetNameEdit.cpp
- ModuleBase_WidgetRadiobox.cpp
- ModuleBase_WidgetPointInput.cpp
- ModuleBase_WidgetSelectionFilter.cpp
- ModuleBase_IStepPrs.cpp
- ModuleBase_WidgetUndoLabel.cpp
-)
+set(PROJECT_SOURCES
+ ModuleBase_ActionInfo.cpp
+ ModuleBase_BRepOwner.cpp
+ ModuleBase_DoubleSpinBox.cpp
+ ModuleBase_Filter.cpp
+ ModuleBase_FilterValidated.cpp
+ ModuleBase_IErrorMgr.cpp
+ ModuleBase_IModule.cpp
+ ModuleBase_IntSpinBox.cpp
+ ModuleBase_IPrefMgr.cpp
+ ModuleBase_IPropertyPanel.cpp
+ ModuleBase_ISelection.cpp
+ ModuleBase_IViewWindow.cpp
+ ModuleBase_IViewer.cpp
+ ModuleBase_IWidgetCreator.cpp
+ ModuleBase_IWorkshop.cpp
+ ModuleBase_LabelValue.cpp
+ ModuleBase_ListView.cpp
+ ModuleBase_ModelWidget.cpp
+ ModuleBase_Operation.cpp
+ ModuleBase_OperationDescription.cpp
+ ModuleBase_OperationFeature.cpp
+ ModuleBase_PageBase.cpp
+ ModuleBase_PageGroupBox.cpp
+ ModuleBase_PageWidget.cpp
+ ModuleBase_PagedContainer.cpp
+ ModuleBase_ParamIntSpinBox.cpp
+ ModuleBase_ParamSpinBox.cpp
+ ModuleBase_Preferences.cpp
+ ModuleBase_ResultPrs.cpp
+ ModuleBase_ToolBox.cpp
+ ModuleBase_Tools.cpp
+ ModuleBase_ViewerFilters.cpp
+ ModuleBase_ViewerPrs.cpp
+ ModuleBase_WidgetAction.cpp
+ ModuleBase_WidgetBoolValue.cpp
+ ModuleBase_WidgetChoice.cpp
+ ModuleBase_WidgetConcealedObjects.cpp
+ ModuleBase_WidgetCreatorFactory.cpp
+ ModuleBase_WidgetDoubleValue.cpp
+ ModuleBase_WidgetEditor.cpp
+ ModuleBase_WidgetExprEditor.cpp
+ ModuleBase_WidgetFactory.cpp
+ ModuleBase_WidgetFeatureSelector.cpp
+ ModuleBase_WidgetFileSelector.cpp
+ ModuleBase_WidgetIntValue.cpp
+ ModuleBase_WidgetLabel.cpp
+ ModuleBase_WidgetLabelValue.cpp
+ ModuleBase_WidgetLineEdit.cpp
+ ModuleBase_WidgetMultiSelector.cpp
+ ModuleBase_WidgetOptionalBox.cpp
+ ModuleBase_WidgetSelector.cpp
+ ModuleBase_WidgetSelectorStore.cpp
+ ModuleBase_WidgetShapeSelector.cpp
+ ModuleBase_WidgetSwitch.cpp
+ ModuleBase_WidgetToolbox.cpp
+ ModuleBase_WidgetValidated.cpp
+ ModuleBase_WidgetValidator.cpp
+ ModuleBase_IconFactory.cpp
+ ModuleBase_SelectionValidator.cpp
+ ModuleBase_Dialog.cpp
+ ModuleBase_ChoiceCtrl.cpp
+ ModuleBase_WidgetNameEdit.cpp
+ ModuleBase_WidgetRadiobox.cpp
+ ModuleBase_WidgetPointInput.cpp
+ ModuleBase_WidgetSelectionFilter.cpp
+ ModuleBase_IStepPrs.cpp
+ ModuleBase_WidgetUndoLabel.cpp)
-SET(TEXT_RESOURCES
- ModuleBase_msg_fr.ts
-)
+set(TEXT_RESOURCES ModuleBase_msg_fr.ts)
-SET(PROJECT_LIBRARIES
- Config
- Events
- ModelAPI
- ModelGeomAlgo
- GeomAPI
- GeomDataAPI
- GeomAlgoAPI
- Locale
- ${QT_LIBRARIES}
- ${OpenCASCADE_FoundationClasses_LIBRARIES}
- ${OpenCASCADE_Visualization_LIBRARIES}
- ${suit}
- ${qtx}
- ${ViewerData}
-)
+set(PROJECT_LIBRARIES
+ Config
+ Events
+ ModelAPI
+ ModelGeomAlgo
+ GeomAPI
+ GeomDataAPI
+ GeomAlgoAPI
+ Locale
+ ${QT_LIBRARIES}
+ ${OpenCASCADE_FoundationClasses_LIBRARIES}
+ ${OpenCASCADE_Visualization_LIBRARIES}
+ ${suit}
+ ${qtx}
+ ${ViewerData})
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
+qt_wrap_moc(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
-IF (${UPDATE_TRANSLATION})
- SET(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS} )
- QT5_CREATE_TRANSLATION(QM_RESOURCES
- ${PROJECT_FILES}
- ${TEXT_RESOURCES}
- OPTIONS -extensions cpp -no-recursive -locations none
- )
-ELSE(${UPDATE_TRANSLATION})
- IF(${MAKE_TRANSLATION})
- QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
- ENDIF(${MAKE_TRANSLATION})
-ENDIF(${UPDATE_TRANSLATION})
+if(${UPDATE_TRANSLATION})
+ set(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+ qt5_create_translation(
+ QM_RESOURCES
+ ${PROJECT_FILES}
+ ${TEXT_RESOURCES}
+ OPTIONS
+ -extensions
+ cpp
+ -no-recursive
+ -locations
+ none)
+else(${UPDATE_TRANSLATION})
+ if(${MAKE_TRANSLATION})
+ qt5_add_translation(QM_RESOURCES ${TEXT_RESOURCES})
+ endif(${MAKE_TRANSLATION})
+endif(${UPDATE_TRANSLATION})
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
+source_group(
+ "Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES}
+ ${QM_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
-INCLUDE_DIRECTORIES(
- ${OpenCASCADE_INCLUDE_DIR}
- ${PROJECT_SOURCE_DIR}/src/Config
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelGeomAlgo
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${PROJECT_SOURCE_DIR}/src/Locale
- ${SUIT_INCLUDE}
-)
+include_directories(
+ ${OpenCASCADE_INCLUDE_DIR}
+ ${PROJECT_SOURCE_DIR}/src/Config
+ ${PROJECT_SOURCE_DIR}/src/Events
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelGeomAlgo
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/Locale
+ ${SUIT_INCLUDE})
-ADD_DEFINITIONS(-DMODULEBASE_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(ModuleBase SHARED
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${PROJECT_AUTOMOC}
- ${TEXT_RESOURCES}
- ${QM_RESOURCES}
-)
+add_definitions(-DMODULEBASE_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(
+ ModuleBase SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_AUTOMOC}
+ ${TEXT_RESOURCES} ${QM_RESOURCES})
-TARGET_LINK_LIBRARIES(ModuleBase GeomAPI ${PROJECT_LIBRARIES})
+target_link_libraries(ModuleBase GeomAPI ${PROJECT_LIBRARIES})
-INSTALL(TARGETS ModuleBase DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
+install(TARGETS ModuleBase DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
- ParametersAPI.h
- ParametersAPI_Parameter.h
-)
+set(PROJECT_HEADERS ParametersAPI.h ParametersAPI_Parameter.h)
-SET(PROJECT_SOURCES
- ParametersAPI_Parameter.cpp
-)
+set(PROJECT_SOURCES ParametersAPI_Parameter.cpp)
-SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
-)
+set(PROJECT_LIBRARIES ModelAPI ModelHighAPI)
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- # TODO(spo): modify ParametersPlugin headers to remove dependency on GeomAPI headers
+include_directories(
+ # TODO(spo): modify ParametersPlugin headers to remove dependency on GeomAPI
+ # headers
${PROJECT_SOURCE_DIR}/src/GeomAPI
# TODO(spo): it is for *_swig.h files. Can we eliminate it?
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/ParametersPlugin
-)
+ ${PROJECT_SOURCE_DIR}/src/ParametersPlugin)
-#TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
-ADD_DEFINITIONS(-DPARAMETERSAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(ParametersAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(ParametersAPI ${PROJECT_LIBRARIES})
+# TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
+add_definitions(-DPARAMETERSAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(ParametersAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(ParametersAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
-
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-
-SET_SOURCE_FILES_PROPERTIES(ParametersAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(ParametersAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-
-#TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may require modern CMake)?
-SET(SWIG_LINK_LIBRARIES
- ParametersAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
-
-SET(SWIG_MODULE_ParametersAPI_EXTRA_DEPS ${SWIG_MODULE_ParametersAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
-
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(ParametersAPI LANGUAGE python SOURCES ParametersAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(ParametersAPI python ParametersAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(ParametersAPI ${SWIG_LINK_LIBRARIES})
-
-IF(WIN32)
- SET_TARGET_PROPERTIES(_ParametersAPI PROPERTIES DEBUG_OUTPUT_NAME _ParametersAPI_d)
-ENDIF(WIN32)
-
-INSTALL(TARGETS _ParametersAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS ParametersAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ParametersAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+include(PythonAPI)
+
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+
+set_source_files_properties(ParametersAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(ParametersAPI.i PROPERTIES SWIG_DEFINITIONS
+ "-shadow")
+
+# TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may
+# require modern CMake)?
+set(SWIG_LINK_LIBRARIES ParametersAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
+
+set(SWIG_MODULE_ParametersAPI_EXTRA_DEPS
+ ${SWIG_MODULE_ParametersAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
+
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ ParametersAPI
+ LANGUAGE python
+ SOURCES ParametersAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(ParametersAPI python ParametersAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(ParametersAPI ${SWIG_LINK_LIBRARIES})
+
+if(WIN32)
+ set_target_properties(_ParametersAPI PROPERTIES DEBUG_OUTPUT_NAME
+ _ParametersAPI_d)
+endif(WIN32)
+
+install(TARGETS _ParametersAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS ParametersAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ParametersAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UnitTest)
-INCLUDE(UseQtExt)
+include(Common)
+include(UnitTest)
+include(UseQtExt)
# additional include directories
-INCLUDE_DIRECTORIES(
- ../Locale
- ${QT_INCLUDES}
-)
+include_directories(../Locale ${QT_INCLUDES})
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS})
+add_definitions(${QT_DEFINITIONS})
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
ParametersPlugin.h
ParametersPlugin_Plugin.h
ParametersPlugin_Parameter.h
ParametersPlugin_Validators.h
ParametersPlugin_WidgetCreator.h
ParametersPlugin_ParametersMgr.h
- ParametersPlugin_WidgetParamsMgr.h
-)
+ ParametersPlugin_WidgetParamsMgr.h)
-SET(PROJECT_MOC_HEADERS
- ParametersPlugin_WidgetParamsMgr.h
-)
+set(PROJECT_MOC_HEADERS ParametersPlugin_WidgetParamsMgr.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
ParametersPlugin_Plugin.cpp
ParametersPlugin_Parameter.cpp
- ParametersPlugin_EvalListener.cpp
+ ParametersPlugin_EvalListener.cpp
ParametersPlugin_Validators.cpp
ParametersPlugin_WidgetCreator.cpp
ParametersPlugin_ParametersMgr.cpp
- ParametersPlugin_WidgetParamsMgr.cpp
-)
-
-SET(XML_RESOURCES
- plugin-Parameters.xml
-)
-
-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/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/ModuleBase
- ${OpenCASCADE_INCLUDE_DIR}
-)
-
-SET(PROJECT_LIBRARIES
- Events
- Config
- Locale
- ModelAPI
- ModuleBase
- ${QT_LIBRARIES}
-)
-
-ADD_DEFINITIONS(-DPARAMETERSPLUGIN_EXPORTS ${OpenCASCADE_DEFINITIONS})
-
-SET(TEXT_RESOURCES
- ParametersPlugin_msg_ru.ts
- ParametersPlugin_msg_en.ts
- ParametersPlugin_msg_fr.ts
-)
-
-# QT4_CREATE_TRANSLATION(QM_RESOURCES
-# ${PROJECT_SOURCES}
-# ${TEXT_RESOURCES}
-# OPTIONS -extensions cpp -no-recursive
-# )
-
-#SET(PROJECT_AUTOMOC
-# ${CMAKE_CURRENT_BINARY_DIR}/ParametersPlugin_automoc.cpp
-#)
-# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
+ ParametersPlugin_WidgetParamsMgr.cpp)
+
+set(XML_RESOURCES plugin-Parameters.xml)
+
+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/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/ModuleBase
+ ${OpenCASCADE_INCLUDE_DIR})
+
+set(PROJECT_LIBRARIES Events Config Locale ModelAPI ModuleBase ${QT_LIBRARIES})
+add_definitions(-DPARAMETERSPLUGIN_EXPORTS ${OpenCASCADE_DEFINITIONS})
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${QM_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
+set(TEXT_RESOURCES ParametersPlugin_msg_ru.ts ParametersPlugin_msg_en.ts
+ ParametersPlugin_msg_fr.ts)
+
+# QT4_CREATE_TRANSLATION(QM_RESOURCES ${PROJECT_SOURCES} ${TEXT_RESOURCES}
+# OPTIONS -extensions cpp -no-recursive )
+
+# SET(PROJECT_AUTOMOC ${CMAKE_CURRENT_BINARY_DIR}/ParametersPlugin_automoc.cpp )
+# sources / moc wrappings
+qt_wrap_moc(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
-ADD_LIBRARY(ParametersPlugin MODULE
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${XML_RESOURCES}
- ${TEXT_RESOURCES}
- ${QM_RESOURCES}
- ${PROJECT_AUTOMOC}
-)
+source_group("Generated Files" FILES ${PROJECT_AUTOMOC} ${QM_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
+source_group("XML Files" FILES ${XML_RESOURCES})
+add_library(
+ ParametersPlugin MODULE
+ ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES}
+ ${QM_RESOURCES} ${PROJECT_AUTOMOC})
-TARGET_LINK_LIBRARIES(ParametersPlugin ${PROJECT_LIBRARIES})
+target_link_libraries(ParametersPlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS ParametersPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
+install(TARGETS ParametersPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} ${TEXT_RESOURCES}
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/ParametersPlugin")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UseQtExt)
+include(Common)
+include(UseQtExt)
# additional include directories
-INCLUDE_DIRECTORIES(${QT_INCLUDES})
+include_directories(${QT_INCLUDES})
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS} ${OpenCASCADE_DEFINITIONS})
+add_definitions(${QT_DEFINITIONS} ${OpenCASCADE_DEFINITIONS})
-SET(UPDATE_TRANSLATION OFF)
+set(UPDATE_TRANSLATION OFF)
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
PartSet.h
PartSet_Constants.h
PartSet_CustomPrs.h
PartSet_TreeNodes.h
PartSet_FieldStepPrs.h
PartSet_WidgetBSplinePoints.h
- PartSet_BSplineWidget.h
-)
-
-SET(PROJECT_MOC_HEADERS
+ PartSet_BSplineWidget.h)
+set(PROJECT_MOC_HEADERS
PartSet_MenuMgr.h
PartSet_Module.h
PartSet_SketcherMgr.h
PartSet_WidgetSketchLabel.h
PartSet_WidgetBSplinePoints.h
PartSet_ExternalPointsMgr.h
- PartSet_BSplineWidget.h
-)
+ PartSet_BSplineWidget.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
PartSet_CustomPrs.cpp
PartSet_ExternalObjectsMgr.cpp
PartSet_FilterInfinite.cpp
PartSet_TreeNodes.cpp
PartSet_FieldStepPrs.cpp
PartSet_WidgetBSplinePoints.cpp
- PartSet_BSplineWidget.cpp
-)
+ PartSet_BSplineWidget.cpp)
-SET(PROJECT_RESOURCES
- PartSet_icons.qrc
-)
+set(PROJECT_RESOURCES PartSet_icons.qrc)
-SET(TEXT_RESOURCES
- PartSet_msg_fr.ts
-)
+set(TEXT_RESOURCES PartSet_msg_fr.ts)
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
ModuleBase
ModelGeomAlgo
Config
${QT_LIBRARIES}
${OpenCASCADE_FoundationClasses_LIBRARIES}
${OpenCASCADE_ApplicationFramework_LIBRARIES}
- ${OCCViewer}
-)
+ ${OCCViewer})
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
+qt_wrap_moc(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
# sources / rcc wrappings
-QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
-
-IF (${UPDATE_TRANSLATION})
- SET(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS} )
- QT5_CREATE_TRANSLATION(QM_RESOURCES
- ${PROJECT_FILES}
- ${TEXT_RESOURCES}
- OPTIONS -extensions cpp -no-recursive -locations none
- )
-ELSE(${UPDATE_TRANSLATION})
- IF(${MAKE_TRANSLATION})
- QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
- ENDIF(${MAKE_TRANSLATION})
-ENDIF(${UPDATE_TRANSLATION})
-
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
-
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/XGUI
- ${PROJECT_SOURCE_DIR}/src/Config
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/Locale
- ${PROJECT_SOURCE_DIR}/src/ModuleBase
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelGeomAlgo
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${PROJECT_SOURCE_DIR}/src/SketchPlugin
- ${PROJECT_SOURCE_DIR}/src/ExchangePlugin
- ${PROJECT_SOURCE_DIR}/src/SketcherPrs
- ${PROJECT_SOURCE_DIR}/src/FeaturesPlugin
- ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/CollectionPlugin
- ${OpenCASCADE_INCLUDE_DIR}
- ${SUIT_INCLUDE}
-)
-
-IF(NOT ${HAVE_SALOME})
- INCLUDE_DIRECTORIES(${APPELEMENTS_INCLUDE_DIR})
-ENDIF()
-
-ADD_DEFINITIONS(-DPARTSET_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(PartSet SHARED
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${PROJECT_COMPILED_RESOURCES}
- ${PROJECT_AUTOMOC}
+qt_add_resources(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
+
+if(${UPDATE_TRANSLATION})
+ set(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+ qt5_create_translation(
+ QM_RESOURCES
+ ${PROJECT_FILES}
${TEXT_RESOURCES}
- ${QM_RESOURCES}
-)
+ OPTIONS
+ -extensions
+ cpp
+ -no-recursive
+ -locations
+ none)
+else(${UPDATE_TRANSLATION})
+ if(${MAKE_TRANSLATION})
+ qt5_add_translation(QM_RESOURCES ${TEXT_RESOURCES})
+ endif(${MAKE_TRANSLATION})
+endif(${UPDATE_TRANSLATION})
+
+source_group(
+ "Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES}
+ ${QM_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES})
+
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/XGUI
+ ${PROJECT_SOURCE_DIR}/src/Config
+ ${PROJECT_SOURCE_DIR}/src/Events
+ ${PROJECT_SOURCE_DIR}/src/Locale
+ ${PROJECT_SOURCE_DIR}/src/ModuleBase
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelGeomAlgo
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/SketchPlugin
+ ${PROJECT_SOURCE_DIR}/src/ExchangePlugin
+ ${PROJECT_SOURCE_DIR}/src/SketcherPrs
+ ${PROJECT_SOURCE_DIR}/src/FeaturesPlugin
+ ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/CollectionPlugin
+ ${OpenCASCADE_INCLUDE_DIR}
+ ${SUIT_INCLUDE})
+
+if(NOT ${HAVE_SALOME})
+ include_directories(${APPELEMENTS_INCLUDE_DIR})
+endif()
+
+add_definitions(-DPARTSET_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(
+ PartSet SHARED
+ ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_COMPILED_RESOURCES}
+ ${PROJECT_AUTOMOC} ${TEXT_RESOURCES} ${QM_RESOURCES})
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
-TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI GeomAlgoAPI)
+target_link_libraries(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI GeomAlgoAPI)
-ADD_DEPENDENCIES(PartSet ModuleBase)
+add_dependencies(PartSet ModuleBase)
-INSTALL(TARGETS PartSet DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
+install(TARGETS PartSet DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UnitTest)
+include(Common)
+include(UnitTest)
-SET(PROJECT_HEADERS
- PartSetAPI.h
- PartSetAPI_Part.h
-)
+set(PROJECT_HEADERS PartSetAPI.h PartSetAPI_Part.h)
-SET(PROJECT_SOURCES
- PartSetAPI_Part.cpp
-)
+set(PROJECT_SOURCES PartSetAPI_Part.cpp)
-SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
-)
+set(PROJECT_LIBRARIES ModelAPI ModelHighAPI)
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- # TODO(spo): modify PartSetPlugin headers to remove dependency on GeomAPI headers
+include_directories(
+ # TODO(spo): modify PartSetPlugin headers to remove dependency on GeomAPI
+ # headers
${PROJECT_SOURCE_DIR}/src/GeomAPI
# TODO(spo): it is for *_swig.h files. Can we eliminate it?
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/PartSetPlugin
-)
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI ${PROJECT_SOURCE_DIR}/src/PartSetPlugin)
-#TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
-ADD_DEFINITIONS(-DPARTSETAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(PartSetAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(PartSetAPI ${PROJECT_LIBRARIES})
+# TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
+add_definitions(-DPARTSETAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(PartSetAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(PartSetAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
-
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-
-SET_SOURCE_FILES_PROPERTIES(PartSetAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(PartSetAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-
-#TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may require modern CMake)?
-SET(SWIG_LINK_LIBRARIES
- PartSetAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
-
-SET(SWIG_MODULE_PartSetAPI_EXTRA_DEPS ${SWIG_MODULE_PartSetAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
-
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(PartSetAPI LANGUAGE python SOURCES PartSetAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(PartSetAPI python PartSetAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(PartSetAPI ${SWIG_LINK_LIBRARIES})
-
-IF(WIN32)
- SET_TARGET_PROPERTIES(_PartSetAPI PROPERTIES DEBUG_OUTPUT_NAME _PartSetAPI_d)
-ENDIF(WIN32)
-
-INSTALL(TARGETS _PartSetAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS PartSetAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/PartSetAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+include(PythonAPI)
+
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+
+set_source_files_properties(PartSetAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(PartSetAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+
+# TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may
+# require modern CMake)?
+set(SWIG_LINK_LIBRARIES PartSetAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
+
+set(SWIG_MODULE_PartSetAPI_EXTRA_DEPS
+ ${SWIG_MODULE_PartSetAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
+
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ PartSetAPI
+ LANGUAGE python
+ SOURCES PartSetAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(PartSetAPI python PartSetAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(PartSetAPI ${SWIG_LINK_LIBRARIES})
+
+if(WIN32)
+ set_target_properties(_PartSetAPI PROPERTIES DEBUG_OUTPUT_NAME _PartSetAPI_d)
+endif(WIN32)
+
+install(TARGETS _PartSetAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS PartSetAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PartSetAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/PartSetAPI")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-
-SET(PROJECT_HEADERS
- PartSetPlugin.h
- PartSetPlugin_Plugin.h
- PartSetPlugin_Part.h
- PartSetPlugin_Duplicate.h
- PartSetPlugin_Remove.h
-)
-
-SET(PROJECT_SOURCES
- PartSetPlugin_Plugin.cpp
- PartSetPlugin_Part.cpp
- PartSetPlugin_Duplicate.cpp
- PartSetPlugin_Remove.cpp
-)
-
-SET(XML_RESOURCES
- plugin-PartSet.xml
-)
-
-SET(TEXT_RESOURCES
- PartSetPlugin_msg_fr.ts
-)
-
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
-
-ADD_DEFINITIONS(-DPARTSETPLUGIN_EXPORTS)
-ADD_LIBRARY(PartSetPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
-TARGET_LINK_LIBRARIES(PartSetPlugin ${PROJECT_LIBRARIES} ModelAPI)
-
-INCLUDE_DIRECTORIES(
- ../Events
- ../ModelAPI
- ../GeomAPI
-)
-
-INSTALL(TARGETS PartSetPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/PartSet)
+include(Common)
+
+set(PROJECT_HEADERS PartSetPlugin.h PartSetPlugin_Plugin.h PartSetPlugin_Part.h
+ PartSetPlugin_Duplicate.h PartSetPlugin_Remove.h)
+
+set(PROJECT_SOURCES PartSetPlugin_Plugin.cpp PartSetPlugin_Part.cpp
+ PartSetPlugin_Duplicate.cpp PartSetPlugin_Remove.cpp)
+
+set(XML_RESOURCES plugin-PartSet.xml)
+
+set(TEXT_RESOURCES PartSetPlugin_msg_fr.ts)
+
+source_group("XML Files" FILES ${XML_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
+
+add_definitions(-DPARTSETPLUGIN_EXPORTS)
+add_library(PartSetPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES} ${TEXT_RESOURCES})
+target_link_libraries(PartSetPlugin ${PROJECT_LIBRARIES} ModelAPI)
+
+include_directories(../Events ../ModelAPI ../GeomAPI)
+
+install(TARGETS PartSetPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} ${TEXT_RESOURCES}
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/PartSet)
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
- PrimitivesAPI.h
- PrimitivesAPI_Box.h
- PrimitivesAPI_Cone.h
- PrimitivesAPI_Cylinder.h
- PrimitivesAPI_Sphere.h
- PrimitivesAPI_Torus.h
- PrimitivesAPI_Tube.h
-)
+set(PROJECT_HEADERS
+ PrimitivesAPI.h
+ PrimitivesAPI_Box.h
+ PrimitivesAPI_Cone.h
+ PrimitivesAPI_Cylinder.h
+ PrimitivesAPI_Sphere.h
+ PrimitivesAPI_Torus.h
+ PrimitivesAPI_Tube.h)
-SET(PROJECT_SOURCES
- PrimitivesAPI_Box.cpp
- PrimitivesAPI_Cone.cpp
- PrimitivesAPI_Cylinder.cpp
- PrimitivesAPI_Sphere.cpp
- PrimitivesAPI_Torus.cpp
- PrimitivesAPI_Tube.cpp
-)
+set(PROJECT_SOURCES
+ PrimitivesAPI_Box.cpp PrimitivesAPI_Cone.cpp PrimitivesAPI_Cylinder.cpp
+ PrimitivesAPI_Sphere.cpp PrimitivesAPI_Torus.cpp PrimitivesAPI_Tube.cpp)
-SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
-)
+set(PROJECT_LIBRARIES ModelAPI ModelHighAPI)
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/PrimitivesPlugin
-)
+ ${PROJECT_SOURCE_DIR}/src/PrimitivesPlugin)
-ADD_DEFINITIONS(-DPRIMITIVESAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(PrimitivesAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(PrimitivesAPI ${PROJECT_LIBRARIES})
+add_definitions(-DPRIMITIVESAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(PrimitivesAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(PrimitivesAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
+include(PythonAPI)
-SET_SOURCE_FILES_PROPERTIES(PrimitivesAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(PrimitivesAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(PrimitivesAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(PrimitivesAPI.i PROPERTIES SWIG_DEFINITIONS
+ "-shadow")
-SET(SWIG_LINK_LIBRARIES
- PrimitivesAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+set(SWIG_LINK_LIBRARIES PrimitivesAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-SET(SWIG_MODULE_PrimitivesAPI_EXTRA_DEPS ${SWIG_MODULE_PrimitivesAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
+set(SWIG_MODULE_PrimitivesAPI_EXTRA_DEPS
+ ${SWIG_MODULE_PrimitivesAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(PrimitivesAPI LANGUAGE python SOURCES PrimitivesAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(PrimitivesAPI python PrimitivesAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(PrimitivesAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ PrimitivesAPI
+ LANGUAGE python
+ SOURCES PrimitivesAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(PrimitivesAPI python PrimitivesAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(PrimitivesAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_PrimitivesAPI PROPERTIES DEBUG_OUTPUT_NAME _PrimitivesAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_PrimitivesAPI PROPERTIES DEBUG_OUTPUT_NAME
+ _PrimitivesAPI_d)
+endif(WIN32)
-INSTALL(TARGETS _PrimitivesAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS PrimitivesAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/PrimitivesAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _PrimitivesAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS PrimitivesAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PrimitivesAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
PrimitivesPlugin.h
PrimitivesPlugin_Plugin.h
PrimitivesPlugin_Box.h
PrimitivesPlugin_Cylinder.h
PrimitivesPlugin_Sphere.h
PrimitivesPlugin_Torus.h
- PrimitivesPlugin_Tube.h
-)
+ PrimitivesPlugin_Tube.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
PrimitivesPlugin_Plugin.cpp
PrimitivesPlugin_Box.cpp
PrimitivesPlugin_Cone.cpp
PrimitivesPlugin_Cylinder.cpp
PrimitivesPlugin_Sphere.cpp
PrimitivesPlugin_Torus.cpp
- PrimitivesPlugin_Tube.cpp
-)
+ PrimitivesPlugin_Tube.cpp)
-SET(XML_RESOURCES
- plugin-Primitives.xml
- box_widget.xml
- cone_widget.xml
- cylinder_widget.xml
- sphere_widget.xml
- torus_widget.xml
- tube_widget.xml
-)
+set(XML_RESOURCES
+ plugin-Primitives.xml
+ box_widget.xml
+ cone_widget.xml
+ cylinder_widget.xml
+ sphere_widget.xml
+ torus_widget.xml
+ tube_widget.xml)
-SET(TEXT_RESOURCES
- PrimitivesPlugin_msg_fr.ts
-)
+set(TEXT_RESOURCES PrimitivesPlugin_msg_fr.ts)
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
+source_group("XML Files" FILES ${XML_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
-INCLUDE_DIRECTORIES(
- ../ModelAPI
- ../GeomAPI
- ../GeomAlgoAPI
- ../Events
-)
+include_directories(../ModelAPI ../GeomAPI ../GeomAlgoAPI ../Events)
-SET(PROJECT_LIBRARIES
- Events
- ModelAPI
- GeomAPI
- GeomAlgoAPI
-)
+set(PROJECT_LIBRARIES Events ModelAPI GeomAPI GeomAlgoAPI)
-ADD_DEFINITIONS(-DPRIMITIVESPLUGIN_EXPORTS)
-ADD_LIBRARY(PrimitivesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
-TARGET_LINK_LIBRARIES(PrimitivesPlugin ${PROJECT_LIBRARIES})
+add_definitions(-DPRIMITIVESPLUGIN_EXPORTS)
+add_library(PrimitivesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES} ${TEXT_RESOURCES})
+target_link_libraries(PrimitivesPlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS PrimitivesPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Primitives)
+install(TARGETS PrimitivesPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} ${TEXT_RESOURCES}
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Primitives)
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INSTALL(DIRECTORY geom model examples DESTINATION ${SHAPER_INSTALL_PYTHON_API})
-INSTALL(FILES initConfig.py DESTINATION ${SHAPER_INSTALL_PYTHON_API})
-SALOME_CONFIGURE_FILE(__init__.py __init__.py INSTALL ${SHAPER_INSTALL_PYTHON_API})
+install(DIRECTORY geom model examples DESTINATION ${SHAPER_INSTALL_PYTHON_API})
+install(FILES initConfig.py DESTINATION ${SHAPER_INSTALL_PYTHON_API})
+salome_configure_file(__init__.py __init__.py INSTALL
+ ${SHAPER_INSTALL_PYTHON_API})
# --------- Unit tests -----------
-INCLUDE(UnitTest)
+include(UnitTest)
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/PythonAPI")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-SET(TEXT_RESOURCES
- PythonAddons_msg_en.ts
- PythonAddons_msg_fr.ts
-)
+set(TEXT_RESOURCES PythonAddons_msg_en.ts PythonAddons_msg_fr.ts)
# configuration
-IF(${HAVE_SALOME})
- SET(ADDONS_FOLDER_PATH ../../../../bin/salome)
-ELSE(${HAVE_SALOME})
- SET(ADDONS_FOLDER_PATH ../addons)
-ENDIF(${HAVE_SALOME})
+if(${HAVE_SALOME})
+ set(ADDONS_FOLDER_PATH ../../../../bin/salome)
+else(${HAVE_SALOME})
+ set(ADDONS_FOLDER_PATH ../addons)
+endif(${HAVE_SALOME})
-CONFIGURE_FILE(
- "${CMAKE_CURRENT_SOURCE_DIR}/addons_Features.xml.in"
- "${CMAKE_CURRENT_BINARY_DIR}/addons_Features.xml"
- )
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/addons_Features.xml.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/addons_Features.xml")
-INSTALL(FILES addons_Features.py DESTINATION ${SHAPER_INSTALL_ADDONS})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/addons_Features.xml DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(FILES addons_Features.py DESTINATION ${SHAPER_INSTALL_ADDONS})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/addons_Features.xml
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(FILES __init__.py DESTINATION ${SHAPER_INSTALL_ADDONS})
-INSTALL(DIRECTORY macros DESTINATION ${SHAPER_INSTALL_ADDONS})
+install(FILES __init__.py DESTINATION ${SHAPER_INSTALL_ADDONS})
+install(DIRECTORY macros DESTINATION ${SHAPER_INSTALL_ADDONS})
-INSTALL(DIRECTORY macros/rectangle/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
-INSTALL(DIRECTORY macros/compoundVertices/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
-INSTALL(DIRECTORY macros/importParameters/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
-INSTALL(DIRECTORY macros/midSurface/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
-INSTALL(DIRECTORY macros/pipeNetwork/icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
-INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY macros/rectangle/icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
+install(DIRECTORY macros/compoundVertices/icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
+install(DIRECTORY macros/importParameters/icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
+install(DIRECTORY macros/midSurface/icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
+install(DIRECTORY macros/pipeNetwork/icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Addons)
+install(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INCLUDE(UnitTest)
+include(UnitTest)
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/PythonAddons")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(UseQtExt)
+include(UseQtExt)
# additional include directories
-INCLUDE_DIRECTORIES(${QT_INCLUDES})
+include_directories(${QT_INCLUDES})
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS})
+add_definitions(${QT_DEFINITIONS})
-SET(UPDATE_TRANSLATION OFF)
+set(UPDATE_TRANSLATION OFF)
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
SHAPER_SHAPERGUI.h
SHAPERGUI.h
SHAPERGUI_DataModel.h
SHAPERGUI_OCCSelector.h
SHAPERGUI_SalomeViewer.h
SHAPERGUI_NestedButton.h
- SHAPERGUI_ToolbarsMgr.h
-)
+ SHAPERGUI_ToolbarsMgr.h)
-SET(PROJECT_MOC_HEADERS
- SHAPERGUI.h
- SHAPERGUI_DataModel.h
- SHAPERGUI_NestedButton.h
- SHAPERGUI_SalomeViewer.h
- SHAPERGUI_ToolbarsMgr.h
-)
+set(PROJECT_MOC_HEADERS
+ SHAPERGUI.h SHAPERGUI_DataModel.h SHAPERGUI_NestedButton.h
+ SHAPERGUI_SalomeViewer.h SHAPERGUI_ToolbarsMgr.h)
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
-
-SET(PROJECT_SOURCES
- SHAPERGUI.cpp
- SHAPERGUI_DataModel.cpp
- SHAPERGUI_OCCSelector.cpp
- SHAPERGUI_SalomeViewer.cpp
- SHAPERGUI_NestedButton.cpp
- SHAPERGUI_ToolbarsMgr.cpp
-)
-
-SET(PROJECT_RESOURCES
- ${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml
- resources/SalomeApp.xml
- resources/shaper.png
-)
-
-SET(TEXT_RESOURCES
- SHAPERGUI_msg_fr.ts
-)
-
-IF (${UPDATE_TRANSLATION})
- SET(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS} )
- QT5_CREATE_TRANSLATION(QM_RESOURCES
- ${PROJECT_FILES}
- ${TEXT_RESOURCES}
- OPTIONS -extensions cpp -no-recursive -locations none
- )
-ELSE(${UPDATE_TRANSLATION})
- IF(${MAKE_TRANSLATION})
- QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
- ENDIF(${MAKE_TRANSLATION})
-ENDIF(${UPDATE_TRANSLATION})
-
-
-SET(PROJECT_LIBRARIES
+qt_wrap_moc(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
+
+set(PROJECT_SOURCES
+ SHAPERGUI.cpp SHAPERGUI_DataModel.cpp SHAPERGUI_OCCSelector.cpp
+ SHAPERGUI_SalomeViewer.cpp SHAPERGUI_NestedButton.cpp
+ SHAPERGUI_ToolbarsMgr.cpp)
+
+set(PROJECT_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml
+ resources/SalomeApp.xml resources/shaper.png)
+
+set(TEXT_RESOURCES SHAPERGUI_msg_fr.ts)
+
+if(${UPDATE_TRANSLATION})
+ set(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+ qt5_create_translation(
+ QM_RESOURCES
+ ${PROJECT_FILES}
+ ${TEXT_RESOURCES}
+ OPTIONS
+ -extensions
+ cpp
+ -no-recursive
+ -locations
+ none)
+else(${UPDATE_TRANSLATION})
+ if(${MAKE_TRANSLATION})
+ qt5_add_translation(QM_RESOURCES ${TEXT_RESOURCES})
+ endif(${MAKE_TRANSLATION})
+endif(${UPDATE_TRANSLATION})
+
+set(PROJECT_LIBRARIES
Events
Config
XGUI
${CAM}
${OCCViewer}
${qtx}
- ${SalomeObject}
-)
-
-ADD_DEFINITIONS( -DSHAPERGUI_EXPORTS ${OpenCASCADE_DEFINITIONS} )
-
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/XGUI
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModuleBase
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${PROJECT_SOURCE_DIR}/src/Config
- ${PROJECT_SOURCE_DIR}/src/ExchangePlugin
- ${SUIT_INCLUDE}
- ${OpenCASCADE_INCLUDE_DIR}
-)
-
-ADD_LIBRARY(SHAPER SHARED
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${PROJECT_AUTOMOC}
- ${QM_RESOURCES}
-)
-
-ADD_DEPENDENCIES(SHAPER XGUI)
+ ${SalomeObject})
+
+add_definitions(-DSHAPERGUI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/XGUI
+ ${PROJECT_SOURCE_DIR}/src/Events
+ ${PROJECT_SOURCE_DIR}/src/ModuleBase
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/Config
+ ${PROJECT_SOURCE_DIR}/src/ExchangePlugin
+ ${SUIT_INCLUDE}
+ ${OpenCASCADE_INCLUDE_DIR})
+
+add_library(SHAPER SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${PROJECT_AUTOMOC} ${QM_RESOURCES})
+
+add_dependencies(SHAPER XGUI)
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
-TARGET_LINK_LIBRARIES(SHAPER ${PROJECT_LIBRARIES})
+target_link_libraries(SHAPER ${PROJECT_LIBRARIES})
#
add_executable(shapergui_app shapergui_app.cpp)
target_link_libraries(shapergui_app ${QT_LIBRARIES})
# configuration
-CONFIGURE_FILE(
- "${CMAKE_CURRENT_SOURCE_DIR}/resources/LightApp.xml.in"
- "${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml"
- )
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/resources/LightApp.xml.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/LightApp.xml")
install(TARGETS shapergui_app DESTINATION ${SHAPER_INSTALL_EXE})
-INSTALL(TARGETS SHAPER DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${PROJECT_RESOURCES} DESTINATION ${SHAPER_INSTALL_RESOURCES})
-install(FILES resources/SalomeApp.xml RENAME SalomeAppSL.xml DESTINATION ${SHAPER_INSTALL_RESOURCES})
-INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
+install(TARGETS SHAPER DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${PROJECT_RESOURCES} DESTINATION ${SHAPER_INSTALL_RESOURCES})
+install(
+ FILES resources/SalomeApp.xml
+ RENAME SalomeAppSL.xml
+ DESTINATION ${SHAPER_INSTALL_RESOURCES})
+install(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UseQtExt)
+include(Common)
+include(UseQtExt)
# additional include directories
-INCLUDE_DIRECTORIES(${QT_INCLUDES})
+include_directories(${QT_INCLUDES})
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS})
+add_definitions(${QT_DEFINITIONS})
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
SamplePanelPlugin.h
SamplePanelPlugin_Feature.h
SamplePanelPlugin_ModelWidget.h
SamplePanelPlugin_ModelWidgetCreator.h
SamplePanelPlugin_Panel.h
SamplePanelPlugin_Plugin.h
- SamplePanelPlugin_WidgetCreator.h
-)
+ SamplePanelPlugin_WidgetCreator.h)
-SET(PROJECT_MOC_HEADERS
- SamplePanelPlugin_ModelWidget.h
- SamplePanelPlugin_Panel.h
-)
+set(PROJECT_MOC_HEADERS SamplePanelPlugin_ModelWidget.h
+ SamplePanelPlugin_Panel.h)
-SET(PROJECT_SOURCES
- SamplePanelPlugin_Feature.cpp
- SamplePanelPlugin_ModelWidget.cpp
- SamplePanelPlugin_ModelWidgetCreator.cpp
- SamplePanelPlugin_Panel.cpp
- SamplePanelPlugin_Plugin.cpp
- SamplePanelPlugin_WidgetCreator.cpp
-)
+set(PROJECT_SOURCES
+ SamplePanelPlugin_Feature.cpp SamplePanelPlugin_ModelWidget.cpp
+ SamplePanelPlugin_ModelWidgetCreator.cpp SamplePanelPlugin_Panel.cpp
+ SamplePanelPlugin_Plugin.cpp SamplePanelPlugin_WidgetCreator.cpp)
-SET(PROJECT_LIBRARIES
- Config
- Events
- ModelAPI
- ModuleBase
- ${QT_LIBRARIES}
-)
+set(PROJECT_LIBRARIES Config Events ModelAPI ModuleBase ${QT_LIBRARIES})
-SET(XML_RESOURCES
- plugin-SamplePanel.xml
-)
+set(XML_RESOURCES plugin-SamplePanel.xml)
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
+qt_wrap_moc(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC})
+source_group("Generated Files" FILES ${PROJECT_AUTOMOC})
-ADD_DEFINITIONS(-DSAMPLEPANELPLUGIN_EXPORTS -DWNT)
-ADD_LIBRARY(SamplePanelPlugin MODULE
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${XML_RESOURCES}
- ${PROJECT_AUTOMOC})
+add_definitions(-DSAMPLEPANELPLUGIN_EXPORTS -DWNT)
+add_library(SamplePanelPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES} ${PROJECT_AUTOMOC})
-TARGET_LINK_LIBRARIES(SamplePanelPlugin ${PROJECT_LIBRARIES})
+target_link_libraries(SamplePanelPlugin ${PROJECT_LIBRARIES})
-INCLUDE_DIRECTORIES(
- ${OpenCASCADE_INCLUDE_DIR}
- ../Config
- ../Events
- ../ModelAPI
- ../ModuleBase
-)
+include_directories(${OpenCASCADE_INCLUDE_DIR} ../Config ../Events ../ModelAPI
+ ../ModuleBase)
-INSTALL(TARGETS SamplePanelPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(TARGETS SamplePanelPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
+include(Common)
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
Selector.h
Selector_Selector.h
Selector_Algo.h
Selector_FilterByNeighbors.h
Selector_WeakName.h
Selector_NameGenerator.h
- Selector_NExplode.h
-)
+ Selector_NExplode.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
Selector_Selector.cpp
Selector_Algo.cpp
Selector_Primitive.cpp
Selector_FilterByNeighbors.cpp
Selector_WeakName.cpp
Selector_NameGenerator.cpp
- Selector_NExplode.cpp
-)
+ Selector_NExplode.cpp)
-SET(PROJECT_LIBRARIES
- Locale
- ${OpenCASCADE_ApplicationFramework_LIBRARIES}
- GeomAPI
- GeomAlgoAPI
-)
-SET(PROJECT_INCLUDES
- ../Locale
- ${OpenCASCADE_INCLUDE_DIR}
- ../GeomAPI
- ../GeomAlgoAPI
-)
+set(PROJECT_LIBRARIES Locale ${OpenCASCADE_ApplicationFramework_LIBRARIES}
+ GeomAPI GeomAlgoAPI)
+set(PROJECT_INCLUDES ../Locale ${OpenCASCADE_INCLUDE_DIR} ../GeomAPI
+ ../GeomAlgoAPI)
+add_definitions(-DSELECTOR_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(Selector SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(Selector ${PROJECT_LIBRARIES})
-ADD_DEFINITIONS(-DSELECTOR_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(Selector SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(Selector ${PROJECT_LIBRARIES})
+include_directories(${PROJECT_INCLUDES})
-INCLUDE_DIRECTORIES(${PROJECT_INCLUDES})
-
-INSTALL(TARGETS Selector DESTINATION ${SHAPER_INSTALL_BIN})
+install(TARGETS Selector DESTINATION ${SHAPER_INSTALL_BIN})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-
-SET(PROJECT_HEADERS
- SketchAPI.h
- SketchAPI_Arc.h
- SketchAPI_BSpline.h
- SketchAPI_Circle.h
- SketchAPI_Constraint.h
- SketchAPI_ConstraintAngle.h
- SketchAPI_Ellipse.h
- SketchAPI_EllipticArc.h
- SketchAPI_IntersectionPoint.h
- SketchAPI_Line.h
- SketchAPI_MacroArc.h
- SketchAPI_MacroCircle.h
- SketchAPI_MacroMiddlePoint.h
- SketchAPI_MacroEllipse.h
- SketchAPI_MacroEllipticArc.h
- SketchAPI_Mirror.h
- SketchAPI_Offset.h
- SketchAPI_Point.h
- SketchAPI_Projection.h
- SketchAPI_Rectangle.h
- SketchAPI_Rotation.h
- SketchAPI_Sketch.h
- SketchAPI_SketchEntity.h
- SketchAPI_Translation.h
-)
-
-SET(PROJECT_SOURCES
- SketchAPI_Arc.cpp
- SketchAPI_BSpline.cpp
- SketchAPI_Circle.cpp
- SketchAPI_Constraint.cpp
- SketchAPI_ConstraintAngle.cpp
- SketchAPI_Ellipse.cpp
- SketchAPI_EllipticArc.cpp
- SketchAPI_IntersectionPoint.cpp
- SketchAPI_Line.cpp
- SketchAPI_MacroArc.cpp
- SketchAPI_MacroCircle.cpp
- SketchAPI_MacroMiddlePoint.cpp
- SketchAPI_MacroEllipse.cpp
- SketchAPI_MacroEllipticArc.cpp
- SketchAPI_Mirror.cpp
- SketchAPI_Offset.cpp
- SketchAPI_Point.cpp
- SketchAPI_Projection.cpp
- SketchAPI_Rectangle.cpp
- SketchAPI_Rotation.cpp
- SketchAPI_Sketch.cpp
- SketchAPI_SketchEntity.cpp
- SketchAPI_Translation.cpp
-)
-
-SET(PROJECT_LIBRARIES
- GeomAlgoAPI
- Locale
- ModelAPI
- ModelHighAPI
- SketcherPrs
-)
-
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
- ${PROJECT_SOURCE_DIR}/src/SketcherPrs
-)
+include(Common)
+
+set(PROJECT_HEADERS
+ SketchAPI.h
+ SketchAPI_Arc.h
+ SketchAPI_BSpline.h
+ SketchAPI_Circle.h
+ SketchAPI_Constraint.h
+ SketchAPI_ConstraintAngle.h
+ SketchAPI_Ellipse.h
+ SketchAPI_EllipticArc.h
+ SketchAPI_IntersectionPoint.h
+ SketchAPI_Line.h
+ SketchAPI_MacroArc.h
+ SketchAPI_MacroCircle.h
+ SketchAPI_MacroMiddlePoint.h
+ SketchAPI_MacroEllipse.h
+ SketchAPI_MacroEllipticArc.h
+ SketchAPI_Mirror.h
+ SketchAPI_Offset.h
+ SketchAPI_Point.h
+ SketchAPI_Projection.h
+ SketchAPI_Rectangle.h
+ SketchAPI_Rotation.h
+ SketchAPI_Sketch.h
+ SketchAPI_SketchEntity.h
+ SketchAPI_Translation.h)
+
+set(PROJECT_SOURCES
+ SketchAPI_Arc.cpp
+ SketchAPI_BSpline.cpp
+ SketchAPI_Circle.cpp
+ SketchAPI_Constraint.cpp
+ SketchAPI_ConstraintAngle.cpp
+ SketchAPI_Ellipse.cpp
+ SketchAPI_EllipticArc.cpp
+ SketchAPI_IntersectionPoint.cpp
+ SketchAPI_Line.cpp
+ SketchAPI_MacroArc.cpp
+ SketchAPI_MacroCircle.cpp
+ SketchAPI_MacroMiddlePoint.cpp
+ SketchAPI_MacroEllipse.cpp
+ SketchAPI_MacroEllipticArc.cpp
+ SketchAPI_Mirror.cpp
+ SketchAPI_Offset.cpp
+ SketchAPI_Point.cpp
+ SketchAPI_Projection.cpp
+ SketchAPI_Rectangle.cpp
+ SketchAPI_Rotation.cpp
+ SketchAPI_Sketch.cpp
+ SketchAPI_SketchEntity.cpp
+ SketchAPI_Translation.cpp)
+
+set(PROJECT_LIBRARIES GeomAlgoAPI Locale ModelAPI ModelHighAPI SketcherPrs)
+
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI ${PROJECT_SOURCE_DIR}/src/SketcherPrs)
# Plugin headers dependency
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Config
- ${PROJECT_SOURCE_DIR}/src/Locale
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
- ${PROJECT_SOURCE_DIR}/src/SketchPlugin
-)
-
-#TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
-ADD_DEFINITIONS(-DSKETCHAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
-ADD_LIBRARY(SketchAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(SketchAPI ${PROJECT_LIBRARIES})
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Config ${PROJECT_SOURCE_DIR}/src/Locale
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/SketchPlugin)
+
+# TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
+add_definitions(-DSKETCHAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_library(SketchAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(SketchAPI ${PROJECT_LIBRARIES})
# SWIG wrapper
-INCLUDE(PythonAPI)
+include(PythonAPI)
-SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
+set(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
-SET_SOURCE_FILES_PROPERTIES(SketchAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(SketchAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+set_source_files_properties(SketchAPI.i PROPERTIES CPLUSPLUS ON)
+set_source_files_properties(SketchAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-#TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may require modern CMake)?
-SET(SWIG_LINK_LIBRARIES
- SketchAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
-)
+# TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may
+# require modern CMake)?
+set(SWIG_LINK_LIBRARIES SketchAPI ModelHighAPI ModelAPI ${PYTHON_LIBRARIES})
-SET(SWIG_MODULE_SketchAPI_EXTRA_DEPS ${SWIG_MODULE_SketchAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- doxyhelp.i
- ${PROJECT_HEADERS}
-)
+set(SWIG_MODULE_SketchAPI_EXTRA_DEPS
+ ${SWIG_MODULE_SketchAPI_EXTRA_DEPS}
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i doxyhelp.i
+ ${PROJECT_HEADERS})
-IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
- SWIG_ADD_LIBRARY(SketchAPI LANGUAGE python SOURCES SketchAPI.i ${PROJECT_HEADERS})
-ELSE()
- SWIG_ADD_MODULE(SketchAPI python SketchAPI.i ${PROJECT_HEADERS})
-ENDIF()
-SWIG_LINK_LIBRARIES(SketchAPI ${SWIG_LINK_LIBRARIES})
+if(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
+ swig_add_library(
+ SketchAPI
+ LANGUAGE python
+ SOURCES SketchAPI.i ${PROJECT_HEADERS})
+else()
+ swig_add_module(SketchAPI python SketchAPI.i ${PROJECT_HEADERS})
+endif()
+swig_link_libraries(SketchAPI ${SWIG_LINK_LIBRARIES})
-IF(WIN32)
- SET_TARGET_PROPERTIES(_SketchAPI PROPERTIES DEBUG_OUTPUT_NAME _SketchAPI_d)
-ENDIF(WIN32)
+if(WIN32)
+ set_target_properties(_SketchAPI PROPERTIES DEBUG_OUTPUT_NAME _SketchAPI_d)
+endif(WIN32)
-INSTALL(TARGETS _SketchAPI DESTINATION ${SHAPER_INSTALL_SWIG})
-INSTALL(TARGETS SketchAPI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/SketchAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS _SketchAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+install(TARGETS SketchAPI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/SketchAPI.py
+ DESTINATION ${SHAPER_INSTALL_SWIG})
# Tests
-INCLUDE(UnitTest)
+include(UnitTest)
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/SketchAPI")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
set(TMP_TESTS_NAMES)
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(Common)
-INCLUDE(UnitTest)
+include(Common)
+include(UnitTest)
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
SketchPlugin.h
SketchPlugin_Arc.h
SketchPlugin_BSpline.h
SketchPlugin_Split.h
SketchPlugin_Tools.h
SketchPlugin_Trim.h
- SketchPlugin_Validators.h
-)
+ SketchPlugin_Validators.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
SketchPlugin_Arc.cpp
SketchPlugin_BSpline.cpp
SketchPlugin_BSplineBase.cpp
SketchPlugin_Split.cpp
SketchPlugin_Tools.cpp
SketchPlugin_Trim.cpp
- SketchPlugin_Validators.cpp
-)
+ SketchPlugin_Validators.cpp)
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
Config
GeomAPI
GeomAlgoAPI
ModelAPI
ModelGeomAlgo
ModuleBase
- SketcherPrs
-)
+ SketcherPrs)
-SET(XML_RESOURCES
- plugin-Sketch.xml
- plugin-SketchCopy.xml
- plugin-SketchDrawer.xml
-)
+set(XML_RESOURCES plugin-Sketch.xml plugin-SketchCopy.xml
+ plugin-SketchDrawer.xml)
-SET(TEXT_RESOURCES
- SketchPlugin_msg_en.ts
- SketchPlugin_msg_fr.ts
-)
+set(TEXT_RESOURCES SketchPlugin_msg_en.ts SketchPlugin_msg_fr.ts)
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
-SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
+source_group("Generated Files" FILES ${PROJECT_AUTOMOC})
+source_group("Resource Files" FILES ${TEXT_RESOURCES})
+source_group("XML Files" FILES ${XML_RESOURCES})
-ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS)
-ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
-TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES})
+add_definitions(-DSKETCHPLUGIN_EXPORTS)
+add_library(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${XML_RESOURCES} ${TEXT_RESOURCES})
+target_link_libraries(SketchPlugin ${PROJECT_LIBRARIES})
-INCLUDE_DIRECTORIES(
+include_directories(
../Config
../Events
../Locale
../GeomAPI
../GeomAlgoAPI
../GeomDataAPI
- ../SketcherPrs
-)
+ ../SketcherPrs)
-INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch)
-INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+install(DIRECTORY icons/
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch)
+install(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
include(tests.set)
if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
include(tests_change_radius.set)
- ADD_UNIT_TESTS(${TEST_NAMES_CHANGE_RADIUS})
+ add_unit_tests(${TEST_NAMES_CHANGE_RADIUS})
endif()
-ADD_RESTRICTED_TESTS(
- Test20204.py
-)
+add_restricted_tests(Test20204.py)
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/SketchPlugin")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
set(TEST_NAMES ${TEST_NAMES} ${TEST_NAMES_CHANGE_RADIUS})
install(FILES tests_change_radius.set DESTINATION ${TEST_INSTALL_DIRECTORY})
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
foreach(tfile ${TEST_NAMES})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
foreach(tfile ${TEST_NAMES_SEQ})
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
add_test(${TEST_NAME} python ${tfile})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_SEQ}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_SEQ}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
# Avoid using SolveSpace
-SET(NO_SolveSpace TRUE)
+set(NO_SolveSpace TRUE)
# Convert files in list to full name
-FUNCTION(TO_FULL_PATH theFILES)
- SET(locFiles "")
- FOREACH(locFile ${${theFILES}})
- SET(locFiles ${locFiles} ${CMAKE_CURRENT_SOURCE_DIR}/${locFile})
- ENDFOREACH()
- SET(${theFILES} ${locFiles} PARENT_SCOPE)
-ENDFUNCTION(TO_FULL_PATH)
-
-
-INCLUDE(Common)
-
-SET(SKETCHSOLVER_HEADERS
- SketchSolver_Error.h
- SketchSolver_Group.h
- SketchSolver_Manager.h
- SketchSolver_Storage.h
-)
-
-SET(SKETCHSOLVER_CONSTRAINT_HEADERS
+function(TO_FULL_PATH theFILES)
+ set(locFiles "")
+ foreach(locFile ${${theFILES}})
+ set(locFiles ${locFiles} ${CMAKE_CURRENT_SOURCE_DIR}/${locFile})
+ endforeach()
+ set(${theFILES}
+ ${locFiles}
+ PARENT_SCOPE)
+endfunction(TO_FULL_PATH)
+
+include(Common)
+
+set(SKETCHSOLVER_HEADERS SketchSolver_Error.h SketchSolver_Group.h
+ SketchSolver_Manager.h SketchSolver_Storage.h)
+
+set(SKETCHSOLVER_CONSTRAINT_HEADERS
SketchSolver_Constraint.h
SketchSolver_ConstraintAngle.h
SketchSolver_ConstraintCoincidence.h
SketchSolver_ConstraintMultiRotation.h
SketchSolver_ConstraintMultiTranslation.h
SketchSolver_ConstraintMovement.h
- SketchSolver_ConstraintOffset.h
-)
+ SketchSolver_ConstraintOffset.h)
-SET(SKETCHSOLVER_SOURCES
- SketchSolver_Group.cpp
- SketchSolver_Manager.cpp
- SketchSolver_Storage.cpp
-)
+set(SKETCHSOLVER_SOURCES SketchSolver_Group.cpp SketchSolver_Manager.cpp
+ SketchSolver_Storage.cpp)
-SET(SKETCHSOLVER_CONSTRAINT_SOURCES
+set(SKETCHSOLVER_CONSTRAINT_SOURCES
SketchSolver_Constraint.cpp
SketchSolver_ConstraintAngle.cpp
SketchSolver_ConstraintCoincidence.cpp
SketchSolver_ConstraintMultiRotation.cpp
SketchSolver_ConstraintMultiTranslation.cpp
SketchSolver_ConstraintMovement.cpp
- SketchSolver_ConstraintOffset.cpp
-)
+ SketchSolver_ConstraintOffset.cpp)
-SET(SKETCHSOLVER_LIBRARIES
- Config
- Events
- ModelAPI
- GeomAPI
- GeomDataAPI
-)
+set(SKETCHSOLVER_LIBRARIES Config Events ModelAPI GeomAPI GeomDataAPI)
-SET(SKETCHSOLVER_TEXT_RESOURCES
- SketchSolver_msg_en.ts
- SketchSolver_msg_fr.ts
-)
+set(SKETCHSOLVER_TEXT_RESOURCES SketchSolver_msg_en.ts SketchSolver_msg_fr.ts)
-INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Config
- ${PROJECT_SOURCE_DIR}/src/SketchPlugin
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
- ${PROJECT_SOURCE_DIR}/src/Events
-)
+include_directories(
+ ${PROJECT_SOURCE_DIR}/src/Config ${PROJECT_SOURCE_DIR}/src/SketchPlugin
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI ${PROJECT_SOURCE_DIR}/src/Events)
-#SOURCE_GROUP ("Resource Files" FILES ${SKETCHSOLVER_TEXT_RESOURCES})
+# SOURCE_GROUP ("Resource Files" FILES ${SKETCHSOLVER_TEXT_RESOURCES})
#
-#ADD_DEFINITIONS(-DSKETCHSOLVER_EXPORTS)
+# ADD_DEFINITIONS(-DSKETCHSOLVER_EXPORTS)
#
-#ADD_LIBRARY(SketchSolver SHARED ${SKETCHSOLVER_SOURCES} ${SKETCHSOLVER_CONSTRAINT_SOURCES} ${SKETCHSOLVER_HEADERS} ${SKETCHSOLVER_CONSTRAINT_HEADERS} ${SKETCHSOLVER_TEXT_RESOURCES}
-#)
+# ADD_LIBRARY(SketchSolver SHARED ${SKETCHSOLVER_SOURCES}
+# ${SKETCHSOLVER_CONSTRAINT_SOURCES} ${SKETCHSOLVER_HEADERS}
+# ${SKETCHSOLVER_CONSTRAINT_HEADERS} ${SKETCHSOLVER_TEXT_RESOURCES} )
#
-#TARGET_LINK_LIBRARIES(SketchSolver ${SKETCHSOLVER_LIBRARIES}
-#)
+# TARGET_LINK_LIBRARIES(SketchSolver ${SKETCHSOLVER_LIBRARIES} )
#
-#INSTALL(TARGETS SketchSolver DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-#INSTALL(FILES ${SKETCHSOLVER_TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+# INSTALL(TARGETS SketchSolver DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+# INSTALL(FILES ${SKETCHSOLVER_TEXT_RESOURCES} DESTINATION
+# ${SHAPER_INSTALL_XML_RESOURCES})
# Set full path to source files
-TO_FULL_PATH(SKETCHSOLVER_SOURCES)
-TO_FULL_PATH(SKETCHSOLVER_CONSTRAINT_SOURCES)
-TO_FULL_PATH(SKETCHSOLVER_HEADERS)
-TO_FULL_PATH(SKETCHSOLVER_CONSTRAINT_HEADERS)
-TO_FULL_PATH(SKETCHSOLVER_TEXT_RESOURCES)
-
+to_full_path(SKETCHSOLVER_SOURCES)
+to_full_path(SKETCHSOLVER_CONSTRAINT_SOURCES)
+to_full_path(SKETCHSOLVER_HEADERS)
+to_full_path(SKETCHSOLVER_CONSTRAINT_HEADERS)
+to_full_path(SKETCHSOLVER_TEXT_RESOURCES)
# Include specific solvers
-IF(NO_SolveSpace)
- SET(SSPath_FOUND FALSE)
-ELSE()
- FIND_FILE(SSPath "SolveSpaceSolver/CMakeLists.txt" PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
- STRING(COMPARE NOTEQUAL ${SSPath} "SSPath-NOTFOUND" SSPath_FOUND)
-ENDIF()
-
-IF(NO_PlaneGCS)
- SET(GCSPath_FOUND FALSE)
-ELSE()
- FIND_FILE(GCSPath "PlaneGCSSolver/CMakeLists.txt" PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
- STRING(COMPARE NOTEQUAL ${GCSPath} "GCSPath-NOTFOUND" GCSPath_FOUND)
-ENDIF()
-
-IF(${SSPath_FOUND} OR ${GCSPath_FOUND})
- IF(${SSPath_FOUND})
- MESSAGE(STATUS "SolveSpaceSolver plugin found in ${SSPath}")
- ADD_SUBDIRECTORY(SolveSpaceSolver)
- ENDIF()
- IF(${GCSPath_FOUND})
- MESSAGE(STATUS "PlaneGCSSolver plugin found in ${GCSPath}")
- ADD_SUBDIRECTORY(PlaneGCSSolver)
- ENDIF()
-ELSE()
- MESSAGE(WARNING "No sketch solver plugin is found")
-ENDIF()
+if(NO_SolveSpace)
+ set(SSPath_FOUND FALSE)
+else()
+ find_file(SSPath "SolveSpaceSolver/CMakeLists.txt"
+ PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
+ string(COMPARE NOTEQUAL ${SSPath} "SSPath-NOTFOUND" SSPath_FOUND)
+endif()
+
+if(NO_PlaneGCS)
+ set(GCSPath_FOUND FALSE)
+else()
+ find_file(GCSPath "PlaneGCSSolver/CMakeLists.txt"
+ PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
+ string(COMPARE NOTEQUAL ${GCSPath} "GCSPath-NOTFOUND" GCSPath_FOUND)
+endif()
+
+if(${SSPath_FOUND} OR ${GCSPath_FOUND})
+ if(${SSPath_FOUND})
+ message(STATUS "SolveSpaceSolver plugin found in ${SSPath}")
+ add_subdirectory(SolveSpaceSolver)
+ endif()
+ if(${GCSPath_FOUND})
+ message(STATUS "PlaneGCSSolver plugin found in ${GCSPath}")
+ add_subdirectory(PlaneGCSSolver)
+ endif()
+else()
+ message(WARNING "No sketch solver plugin is found")
+endif()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-FIND_PACKAGE(PlaneGCS REQUIRED)
+find_package(PlaneGCS REQUIRED)
-SET(PLANEGCSSOLVER_HEADERS
+set(PLANEGCSSOLVER_HEADERS
PlaneGCSSolver_Defs.h
PlaneGCSSolver_Solver.h
PlaneGCSSolver_Storage.h
PlaneGCSSolver_AngleWrapper.h
PlaneGCSSolver_BooleanWrapper.h
PlaneGCSSolver_Tools.h
- PlaneGCSSolver_GeoExtensions.h
-)
+ PlaneGCSSolver_GeoExtensions.h)
-SET(PLANEGCSSOLVER_SOURCES
+set(PLANEGCSSOLVER_SOURCES
PlaneGCSSolver_Solver.cpp
PlaneGCSSolver_Storage.cpp
PlaneGCSSolver_ConstraintWrapper.cpp
PlaneGCSSolver_AngleWrapper.cpp
PlaneGCSSolver_BooleanWrapper.cpp
PlaneGCSSolver_Tools.cpp
- PlaneGCSSolver_GeoExtensions.cpp
-)
+ PlaneGCSSolver_GeoExtensions.cpp)
-SET(PLANEGCSSOLVER_BUILDER_HEADERS
- PlaneGCSSolver_EntityBuilder.h
- PlaneGCSSolver_AttributeBuilder.h
- PlaneGCSSolver_FeatureBuilder.h
- PlaneGCSSolver_EntityDestroyer.h
-)
+set(PLANEGCSSOLVER_BUILDER_HEADERS
+ PlaneGCSSolver_EntityBuilder.h PlaneGCSSolver_AttributeBuilder.h
+ PlaneGCSSolver_FeatureBuilder.h PlaneGCSSolver_EntityDestroyer.h)
-SET(PLANEGCSSOLVER_BUILDER_SOURCES
- PlaneGCSSolver_AttributeBuilder.cpp
- PlaneGCSSolver_FeatureBuilder.cpp
- PlaneGCSSolver_EntityDestroyer.cpp
-)
+set(PLANEGCSSOLVER_BUILDER_SOURCES
+ PlaneGCSSolver_AttributeBuilder.cpp PlaneGCSSolver_FeatureBuilder.cpp
+ PlaneGCSSolver_EntityDestroyer.cpp)
-SET(PLANEGCSSOLVER_UPDATER_HEADERS
- PlaneGCSSolver_Update.h
- PlaneGCSSolver_UpdateFeature.h
- PlaneGCSSolver_UpdateCoincidence.h
-)
+set(PLANEGCSSOLVER_UPDATER_HEADERS
+ PlaneGCSSolver_Update.h PlaneGCSSolver_UpdateFeature.h
+ PlaneGCSSolver_UpdateCoincidence.h)
-SET(PLANEGCSSOLVER_UPDATER_SOURCES
- PlaneGCSSolver_UpdateFeature.cpp
- PlaneGCSSolver_UpdateCoincidence.cpp
-)
+set(PLANEGCSSOLVER_UPDATER_SOURCES PlaneGCSSolver_UpdateFeature.cpp
+ PlaneGCSSolver_UpdateCoincidence.cpp)
-SET(PROJECT_LIBRARIES
- ${PLANEGCS_LIBRARIES}
- ${SKETCHSOLVER_LIBRARIES}
-)
+set(PROJECT_LIBRARIES ${PLANEGCS_LIBRARIES} ${SKETCHSOLVER_LIBRARIES})
-INCLUDE_DIRECTORIES(
- ${Boost_INCLUDE_DIRS}
- ${EIGEN3_INCLUDE_DIR}
- ${PLANEGCS_INCLUDE_DIRS}
- ${PROJECT_SOURCE_DIR}/src/SketchSolver
- ${PROJECT_SOURCE_DIR}/src/SketchPlugin
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
-)
+include_directories(
+ ${Boost_INCLUDE_DIRS}
+ ${EIGEN3_INCLUDE_DIR}
+ ${PLANEGCS_INCLUDE_DIRS}
+ ${PROJECT_SOURCE_DIR}/src/SketchSolver
+ ${PROJECT_SOURCE_DIR}/src/SketchPlugin
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomDataAPI)
-SOURCE_GROUP ("Resource Files" FILES ${SKETCHSOLVER_TEXT_RESOURCES})
-SOURCE_GROUP ("Header Files\\Builders" FILES ${PLANEGCSSOLVER_BUILDER_HEADERS})
-SOURCE_GROUP ("Source Files\\Builders" FILES ${PLANEGCSSOLVER_BUILDER_SOURCES})
-SOURCE_GROUP ("Header Files\\Updaters" FILES ${PLANEGCSSOLVER_UPDATER_HEADERS})
-SOURCE_GROUP ("Source Files\\Updaters" FILES ${PLANEGCSSOLVER_UPDATER_SOURCES})
-SOURCE_GROUP ("Header Files\\SketchSolver" FILES ${SKETCHSOLVER_HEADERS})
-SOURCE_GROUP ("Source Files\\SketchSolver" FILES ${SKETCHSOLVER_SOURCES})
-SOURCE_GROUP ("Header Files\\Constraints" FILES ${SKETCHSOLVER_CONSTRAINT_HEADERS})
-SOURCE_GROUP ("Source Files\\Constraints" FILES ${SKETCHSOLVER_CONSTRAINT_SOURCES})
-SOURCE_GROUP ("Header Files\\PlaneGCS" FILES ${PLANEGCSSOLVER_HEADERS})
-SOURCE_GROUP ("Source Files\\PlaneGCS" FILES ${PLANEGCSSOLVER_SOURCES})
+source_group("Resource Files" FILES ${SKETCHSOLVER_TEXT_RESOURCES})
+source_group("Header Files\\Builders" FILES ${PLANEGCSSOLVER_BUILDER_HEADERS})
+source_group("Source Files\\Builders" FILES ${PLANEGCSSOLVER_BUILDER_SOURCES})
+source_group("Header Files\\Updaters" FILES ${PLANEGCSSOLVER_UPDATER_HEADERS})
+source_group("Source Files\\Updaters" FILES ${PLANEGCSSOLVER_UPDATER_SOURCES})
+source_group("Header Files\\SketchSolver" FILES ${SKETCHSOLVER_HEADERS})
+source_group("Source Files\\SketchSolver" FILES ${SKETCHSOLVER_SOURCES})
+source_group("Header Files\\Constraints"
+ FILES ${SKETCHSOLVER_CONSTRAINT_HEADERS})
+source_group("Source Files\\Constraints"
+ FILES ${SKETCHSOLVER_CONSTRAINT_SOURCES})
+source_group("Header Files\\PlaneGCS" FILES ${PLANEGCSSOLVER_HEADERS})
+source_group("Source Files\\PlaneGCS" FILES ${PLANEGCSSOLVER_SOURCES})
-SET(PROJECT_HEADERS
- ${PLANEGCSSOLVER_HEADERS}
- ${PLANEGCSSOLVER_BUILDER_HEADERS}
- ${PLANEGCSSOLVER_UPDATER_HEADERS}
- ${SKETCHSOLVER_HEADERS}
- ${SKETCHSOLVER_CONSTRAINT_HEADERS}
-)
+set(PROJECT_HEADERS
+ ${PLANEGCSSOLVER_HEADERS} ${PLANEGCSSOLVER_BUILDER_HEADERS}
+ ${PLANEGCSSOLVER_UPDATER_HEADERS} ${SKETCHSOLVER_HEADERS}
+ ${SKETCHSOLVER_CONSTRAINT_HEADERS})
-SET(PROJECT_SOURCES
- ${PLANEGCSSOLVER_SOURCES}
- ${PLANEGCSSOLVER_BUILDER_SOURCES}
- ${PLANEGCSSOLVER_UPDATER_SOURCES}
- ${SKETCHSOLVER_SOURCES}
- ${SKETCHSOLVER_CONSTRAINT_SOURCES}
-)
+set(PROJECT_SOURCES
+ ${PLANEGCSSOLVER_SOURCES} ${PLANEGCSSOLVER_BUILDER_SOURCES}
+ ${PLANEGCSSOLVER_UPDATER_SOURCES} ${SKETCHSOLVER_SOURCES}
+ ${SKETCHSOLVER_CONSTRAINT_SOURCES})
if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
- ADD_DEFINITIONS(-DCHANGE_RADIUS_WHILE_MOVE)
+ add_definitions(-DCHANGE_RADIUS_WHILE_MOVE)
endif()
-##ADD_DEFINITIONS(-Wno-deprecated -Wignored-attributes -Wmisleading-indentation -Wreorder)
-ADD_DEFINITIONS(-w)
+# ADD_DEFINITIONS(-Wno-deprecated -Wignored-attributes -Wmisleading-indentation
+# -Wreorder)
+add_definitions(-w)
-ADD_LIBRARY(PlaneGCSSolver MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${SKETCHSOLVER_TEXT_RESOURCES})
-TARGET_LINK_LIBRARIES(PlaneGCSSolver ${PROJECT_LIBRARIES} ${SKETCHSOLVER_LIBRARIES})
-INSTALL(TARGETS PlaneGCSSolver DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
-INSTALL(FILES ${SKETCHSOLVER_TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
+add_library(PlaneGCSSolver MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ ${SKETCHSOLVER_TEXT_RESOURCES})
+target_link_libraries(PlaneGCSSolver ${PROJECT_LIBRARIES}
+ ${SKETCHSOLVER_LIBRARIES})
+install(TARGETS PlaneGCSSolver DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+install(FILES ${SKETCHSOLVER_TEXT_RESOURCES}
+ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-FIND_PACKAGE(SolveSpace REQUIRED)
+find_package(SolveSpace REQUIRED)
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
SolveSpaceSolver_Solver.h
SolveSpaceSolver_Builder.h
SolveSpaceSolver_Storage.h
SolveSpaceSolver_EntityWrapper.h
SolveSpaceSolver_ParameterWrapper.h
SolveSpaceSolver_ConstraintWrapper.h
- SolveSpaceSolver_ConstraintType.h
-)
+ SolveSpaceSolver_ConstraintType.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
SolveSpaceSolver_Solver.cpp
SolveSpaceSolver_Builder.cpp
SolveSpaceSolver_Storage.cpp
SolveSpaceSolver_EntityWrapper.cpp
SolveSpaceSolver_ParameterWrapper.cpp
- SolveSpaceSolver_ConstraintWrapper.cpp
-)
+ SolveSpaceSolver_ConstraintWrapper.cpp)
-SET(PROJECT_LIBRARIES
- ${SOLVESPACE_LIBRARIES}
- SketchSolver
- ModelAPI
- GeomAPI
-)
+set(PROJECT_LIBRARIES ${SOLVESPACE_LIBRARIES} SketchSolver ModelAPI GeomAPI)
-INCLUDE_DIRECTORIES(
- ${SOLVESPACE_INCLUDE_DIRS}
- ${PROJECT_SOURCE_DIR}/src/SketchSolver
- ${PROJECT_SOURCE_DIR}/src/SketchPlugin
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/GeomAPI
- ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
-)
+include_directories(
+ ${SOLVESPACE_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src/SketchSolver
+ ${PROJECT_SOURCE_DIR}/src/SketchPlugin ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/GeomAPI ${PROJECT_SOURCE_DIR}/src/GeomDataAPI)
-ADD_LIBRARY(SolveSpaceSolver MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-TARGET_LINK_LIBRARIES(SolveSpaceSolver ${PROJECT_LIBRARIES})
-INSTALL(TARGETS SolveSpaceSolver DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+add_library(SolveSpaceSolver MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+target_link_libraries(SolveSpaceSolver ${PROJECT_LIBRARIES})
+install(TARGETS SolveSpaceSolver DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-IF(NOT DEFINED ENV{FREETYPE_DIR})
- SET(ENV{FREETYPE_DIR} $ENV{FREETYPE_ROOT_DIR})
-ENDIF()
-FIND_PACKAGE(Freetype REQUIRED)
+if(NOT DEFINED ENV{FREETYPE_DIR})
+ set(ENV{FREETYPE_DIR} $ENV{FREETYPE_ROOT_DIR})
+endif()
+find_package(Freetype REQUIRED)
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
SketcherPrs.h
SketcherPrs_Coincident.h
SketcherPrs_Collinear.h
SketcherPrs_Mirror.h
SketcherPrs_Transformation.h
SketcherPrs_Angle.h
- SketcherPrs_Offset.h
-)
+ SketcherPrs_Offset.h)
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
SketcherPrs_Coincident.cpp
SketcherPrs_Collinear.cpp
SketcherPrs_DimensionStyle.cpp
SketcherPrs_Mirror.cpp
SketcherPrs_Transformation.cpp
SketcherPrs_Angle.cpp
- SketcherPrs_Offset.cpp
-)
+ SketcherPrs_Offset.cpp)
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
Config
ModelAPI
ModelGeomAlgo
${OpenCASCADE_FoundationClasses_LIBRARIES}
${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
${OpenCASCADE_Visualization_LIBRARIES}
- ${FREETYPE_LIBRARIES}
-)
+ ${FREETYPE_LIBRARIES})
-IF(WIN32)
- SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
-ELSE()
- SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
-ENDIF()
+if(WIN32)
+ set(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
+else()
+ set(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
+endif()
-
-SET(PROJECT_PICTURES
+set(PROJECT_PICTURES
icons/collinear.png
icons/parallel.png
icons/perpendicular.png
icons/mirror.png
icons/rotate.png
icons/translate.png
- icons/offset.png
-)
+ icons/offset.png)
-ADD_DEFINITIONS(-DSKETCHERPRS_EXPORTS ${OpenCASCADE_DEFINITIONS} -D_CRT_SECURE_NO_WARNINGS)
-ADD_LIBRARY(SketcherPrs SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+add_definitions(-DSKETCHERPRS_EXPORTS ${OpenCASCADE_DEFINITIONS}
+ -D_CRT_SECURE_NO_WARNINGS)
+add_library(SketcherPrs SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-INCLUDE_DIRECTORIES(
+include_directories(
${PROJECT_SOURCE_DIR}/src/Config
${PROJECT_SOURCE_DIR}/src/Events
${PROJECT_SOURCE_DIR}/src/ModelAPI
${PROJECT_SOURCE_DIR}/src/Locale
${PROJECT_SOURCE_DIR}/src/SketchPlugin
${OpenCASCADE_INCLUDE_DIR}
- ${FREETYPE_INCLUDE_DIRS}
-)
+ ${FREETYPE_INCLUDE_DIRS})
-TARGET_LINK_LIBRARIES(SketcherPrs ${PROJECT_LIBRARIES})
+target_link_libraries(SketcherPrs ${PROJECT_LIBRARIES})
-INSTALL(TARGETS SketcherPrs DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${PROJECT_PICTURES} DESTINATION ${SHAPER_INSTALL_RESOURCES})
+install(TARGETS SketcherPrs DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${PROJECT_PICTURES} DESTINATION ${SHAPER_INSTALL_RESOURCES})
# Copyright (C) 2012-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-#IF(SALOME_BUILD_TESTS)
-# ADD_SUBDIRECTORY(tests)
-#ENDIF(SALOME_BUILD_TESTS)
+# IF(SALOME_BUILD_TESTS) ADD_SUBDIRECTORY(tests) ENDIF(SALOME_BUILD_TESTS)
# --- options ---
-INCLUDE(Common)
-INCLUDE(XMLProcessing)
+include(Common)
+include(XMLProcessing)
# additional include directories
-INCLUDE_DIRECTORIES(${OpenCASCADE_INCLUDE_DIR})
+include_directories(${OpenCASCADE_INCLUDE_DIR})
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(-DXAO_EXPORTS ${OpenCASCADE_DEFINITIONS})
+add_definitions(-DXAO_EXPORTS ${OpenCASCADE_DEFINITIONS})
# libraries to link to
-SET(PROJECT_LIBRARIES
- ${LIBXML2_LIBRARIES}
- ${OpenCASCADE_ModelingData_LIBRARIES}
- ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
- )
+set(PROJECT_LIBRARIES
+ ${LIBXML2_LIBRARIES} ${OpenCASCADE_ModelingData_LIBRARIES}
+ ${OpenCASCADE_ModelingAlgorithms_LIBRARIES})
# --- headers ---
-SET(XAO_HEADERS
- XAO.hxx
- XAO_BooleanField.hxx
- XAO_BooleanStep.hxx
- XAO_BrepGeometry.hxx
- XAO_DoubleField.hxx
- XAO_DoubleStep.hxx
- XAO_Exception.hxx
- XAO_Field.hxx
- XAO_GeometricElement.hxx
- XAO_Geometry.hxx
- XAO_Group.hxx
- XAO_IntegerField.hxx
- XAO_IntegerStep.hxx
- XAO_Step.hxx
- XAO_StringField.hxx
- XAO_StringStep.hxx
- XAO_Xao.hxx
- XAO_XaoExporter.hxx
- XAO_XaoUtils.hxx
- )
+set(XAO_HEADERS
+ XAO.hxx
+ XAO_BooleanField.hxx
+ XAO_BooleanStep.hxx
+ XAO_BrepGeometry.hxx
+ XAO_DoubleField.hxx
+ XAO_DoubleStep.hxx
+ XAO_Exception.hxx
+ XAO_Field.hxx
+ XAO_GeometricElement.hxx
+ XAO_Geometry.hxx
+ XAO_Group.hxx
+ XAO_IntegerField.hxx
+ XAO_IntegerStep.hxx
+ XAO_Step.hxx
+ XAO_StringField.hxx
+ XAO_StringStep.hxx
+ XAO_Xao.hxx
+ XAO_XaoExporter.hxx
+ XAO_XaoUtils.hxx)
# --- sources ---
-SET(XAO_SOURCES
- XAO_BooleanField.cxx
- XAO_BooleanStep.cxx
- XAO_BrepGeometry.cxx
- XAO_DoubleField.cxx
- XAO_DoubleStep.cxx
- XAO_Field.cxx
- XAO_GeometricElement.cxx
- XAO_Geometry.cxx
- XAO_Group.cxx
- XAO_IntegerField.cxx
- XAO_IntegerStep.cxx
- XAO_Step.cxx
- XAO_StringField.cxx
- XAO_StringStep.cxx
- XAO_Xao.cxx
- XAO_XaoExporter.cxx
- XAO_XaoUtils.cxx
- )
+set(XAO_SOURCES
+ XAO_BooleanField.cxx
+ XAO_BooleanStep.cxx
+ XAO_BrepGeometry.cxx
+ XAO_DoubleField.cxx
+ XAO_DoubleStep.cxx
+ XAO_Field.cxx
+ XAO_GeometricElement.cxx
+ XAO_Geometry.cxx
+ XAO_Group.cxx
+ XAO_IntegerField.cxx
+ XAO_IntegerStep.cxx
+ XAO_Step.cxx
+ XAO_StringField.cxx
+ XAO_StringStep.cxx
+ XAO_Xao.cxx
+ XAO_XaoExporter.cxx
+ XAO_XaoUtils.cxx)
# --- rules ---
-ADD_LIBRARY(XAOShaper SHARED ${XAO_SOURCES} ${XAO_HEADERS})
-TARGET_LINK_LIBRARIES(XAOShaper ${PROJECT_LIBRARIES})
-INSTALL(TARGETS XAOShaper DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${XAO_HEADERS} DESTINATION ${SHAPER_INSTALL_HEADERS})
+add_library(XAOShaper SHARED ${XAO_SOURCES} ${XAO_HEADERS})
+target_link_libraries(XAOShaper ${PROJECT_LIBRARIES})
+install(TARGETS XAOShaper DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${XAO_HEADERS} DESTINATION ${SHAPER_INSTALL_HEADERS})
# Copyright (C) 2012-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
# --- options ---
# additional include directories
-INCLUDE_DIRECTORIES(
- ${PTHREAD_INCLUDE_DIR}
- ${OpenCASCADE_INCLUDE_DIR}
- ${CPPUNIT_INCLUDE_DIRS}
- )
+include_directories(${PTHREAD_INCLUDE_DIR} ${OpenCASCADE_INCLUDE_DIR}
+ ${CPPUNIT_INCLUDE_DIRS})
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(
- ${OpenCASCADE_DEFINITIONS}
- ${CPPUNIT_DEFINITIONS}
- )
+add_definitions(${OpenCASCADE_DEFINITIONS} ${CPPUNIT_DEFINITIONS})
# libraries to link to
-SET(_link_LIBRARIES
- ${CPPUNIT_LIBRARIES}
- XAOShaper
- )
+set(_link_LIBRARIES ${CPPUNIT_LIBRARIES} XAOShaper)
# --- sources ---
-SET(TestXAO_SOURCES
- BrepGeometryTest.cxx
- FieldTest.cxx
- GeometryTest.cxx
- GroupTest.cxx
- ImportExportTest.cxx
- XAOTests.cxx
- XaoTest.cxx
- XaoUtilsTest.cxx
- )
+set(TestXAO_SOURCES
+ BrepGeometryTest.cxx
+ FieldTest.cxx
+ GeometryTest.cxx
+ GroupTest.cxx
+ ImportExportTest.cxx
+ XAOTests.cxx
+ XaoTest.cxx
+ XaoUtilsTest.cxx)
# --- rules ---
-ADD_EXECUTABLE(TestXAO ${TestXAO_SOURCES})
-TARGET_LINK_LIBRARIES(TestXAO ${_link_LIBRARIES})
+add_executable(TestXAO ${TestXAO_SOURCES})
+target_link_libraries(TestXAO ${_link_LIBRARIES})
-SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+salome_generate_tests_environment(tests_env)
-ADD_TEST(TestXAO TestXAO)
-SET_TESTS_PROPERTIES(TestXAO PROPERTIES ENVIRONMENT "GEOM_SRC_DIR=${PROJECT_SOURCE_DIR};${tests_env};SHAPER_UNIT_TEST_IN_PROGRESS=1")
+add_test(TestXAO TestXAO)
+set_tests_properties(
+ TestXAO
+ PROPERTIES
+ ENVIRONMENT
+ "GEOM_SRC_DIR=${PROJECT_SOURCE_DIR};${tests_env};SHAPER_UNIT_TEST_IN_PROGRESS=1"
+)
-INSTALL(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS})
+install(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(UseQtExt)
+include(UseQtExt)
# additional include directories
-INCLUDE_DIRECTORIES(${QT_INCLUDES})
+include_directories(${QT_INCLUDES})
# additional preprocessor / compiler flags
-ADD_DEFINITIONS(${QT_DEFINITIONS})
+add_definitions(${QT_DEFINITIONS})
-SET(UPDATE_TRANSLATION OFF)
+set(UPDATE_TRANSLATION OFF)
-
-
-SET(PROJECT_HEADERS
+set(PROJECT_HEADERS
XGUI.h
XGUI_ActionsMgr.h
XGUI_ActiveControlMgr.h
XGUI_ViewerProxy.h
XGUI_Workshop.h
XGUI_WorkshopListener.h
- XGUI_InspectionPanel.h
- XGUI_CompressFiles.h
-)
+ XGUI_InspectionPanel.h
+ XGUI_CompressFiles.h)
-SET(PROJECT_MOC_HEADERS
+set(PROJECT_MOC_HEADERS
XGUI_ActionsMgr.h
XGUI_ActiveControlMgr.h
XGUI_ActiveControlSelector.h
XGUI_ViewerProxy.h
XGUI_Workshop.h
XGUI_WorkshopListener.h
- XGUI_InspectionPanel.h
-)
+ XGUI_InspectionPanel.h)
# sources / moc wrappings
-QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
+qt_wrap_moc(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
-SET(PROJECT_SOURCES
+set(PROJECT_SOURCES
XGUI_ActionsMgr.cpp
XGUI_ActiveControlMgr.cpp
XGUI_ColorDialog.cpp
XGUI_ViewerProxy.cpp
XGUI_Workshop.cpp
XGUI_WorkshopListener.cpp
- XGUI_InspectionPanel.cpp
- XGUI_CompressFiles.cpp
-)
+ XGUI_InspectionPanel.cpp
+ XGUI_CompressFiles.cpp)
-SET(PROJECT_RESOURCES
- XGUI_pictures.qrc
-)
+set(PROJECT_RESOURCES XGUI_pictures.qrc)
-SET(PREFERENCES_XML
- SHAPER.xml
-)
+set(PREFERENCES_XML SHAPER.xml)
-SET(TEXT_RESOURCES
- XGUI_msg_fr.ts
-)
+set(TEXT_RESOURCES XGUI_msg_fr.ts)
-SET(PROJECT_LIBRARIES
+set(PROJECT_LIBRARIES
Events
Config
ModelAPI
${PyConsole}
${PyInterp}
${suit}
- ${qtx}
-)
-
-IF(NOT ${HAVE_SALOME})
- SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} AppElements)
-ENDIF(NOT ${HAVE_SALOME})
-
-
-IF(WIN32)
- SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
-ELSE()
- SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
-ENDIF()
-
-QT_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
+ ${qtx})
+if(NOT ${HAVE_SALOME})
+ set(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} AppElements)
+endif(NOT ${HAVE_SALOME})
+if(WIN32)
+ set(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
+else()
+ set(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
+endif()
-IF (${UPDATE_TRANSLATION})
- SET(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS} )
- QT5_CREATE_TRANSLATION(QM_RESOURCES
- ${PROJECT_FILES}
- ${TEXT_RESOURCES}
- OPTIONS -extensions cpp -no-recursive -locations none
- )
-ELSE(${UPDATE_TRANSLATION})
- IF(${MAKE_TRANSLATION})
- QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
- ENDIF(${MAKE_TRANSLATION})
-ENDIF(${UPDATE_TRANSLATION})
+qt_add_resources(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
-
-SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
-#SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES})
-SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES} ${PREFERENCES_XML})
-
-ADD_DEFINITIONS( -DXGUI_EXPORTS ${OpenCASCADE_DEFINITIONS} -D_CRT_SECURE_NO_WARNINGS)
-
-SET(PROJECT_INCLUDES
+if(${UPDATE_TRANSLATION})
+ set(PROJECT_FILES ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+ qt5_create_translation(
+ QM_RESOURCES
+ ${PROJECT_FILES}
+ ${TEXT_RESOURCES}
+ OPTIONS
+ -extensions
+ cpp
+ -no-recursive
+ -locations
+ none)
+else(${UPDATE_TRANSLATION})
+ if(${MAKE_TRANSLATION})
+ qt5_add_translation(QM_RESOURCES ${TEXT_RESOURCES})
+ endif(${MAKE_TRANSLATION})
+endif(${UPDATE_TRANSLATION})
+
+source_group(
+ "Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES}
+ ${QM_RESOURCES})
+# SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC}
+# ${PROJECT_COMPILED_RESOURCES})
+source_group("Resource Files" FILES ${TEXT_RESOURCES} ${PROJECT_RESOURCES}
+ ${PREFERENCES_XML})
+
+add_definitions(-DXGUI_EXPORTS ${OpenCASCADE_DEFINITIONS}
+ -D_CRT_SECURE_NO_WARNINGS)
+
+set(PROJECT_INCLUDES
${PROJECT_SOURCE_DIR}/src/Events
${PROJECT_SOURCE_DIR}/src/Config
${PROJECT_SOURCE_DIR}/src/ExchangePlugin
${OpenCASCADE_INCLUDE_DIR}
${SUIT_INCLUDE})
-IF(NOT ${HAVE_SALOME})
- SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${APPELEMENTS_INCLUDE_DIR})
-ENDIF(NOT ${HAVE_SALOME})
+if(NOT ${HAVE_SALOME})
+ set(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${APPELEMENTS_INCLUDE_DIR})
+endif(NOT ${HAVE_SALOME})
-IF(TKTInspector)
- message("TINSPECTOR is defined")
- SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${TKTInspectorAPI} ${TKTInspector} ${TKTreeModel} ${TKVInspector})
- SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${TINSPECTOR_INCLUDE_DIR})
+if(TKTInspector)
+ message("TINSPECTOR is defined")
+ set(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} ${TKTInspectorAPI} ${TKTInspector}
+ ${TKTreeModel} ${TKVInspector})
+ set(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${TINSPECTOR_INCLUDE_DIR})
- ADD_DEFINITIONS(-DTINSPECTOR)
-ENDIF()
+ add_definitions(-DTINSPECTOR)
+endif()
-INCLUDE_DIRECTORIES(${PROJECT_INCLUDES})
+include_directories(${PROJECT_INCLUDES})
-LINK_DIRECTORIES($ENV{PYTHON_LIB_DIR})
+link_directories($ENV{PYTHON_LIB_DIR})
-ADD_LIBRARY(XGUI SHARED
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${PROJECT_COMPILED_RESOURCES}
- ${TEXT_RESOURCES}
- ${QM_RESOURCES}
- ${PREFERENCES_XML}
- ${PROJECT_AUTOMOC}
-)
+add_library(
+ XGUI SHARED
+ ${PROJECT_SOURCES}
+ ${PROJECT_HEADERS}
+ ${PROJECT_COMPILED_RESOURCES}
+ ${TEXT_RESOURCES}
+ ${QM_RESOURCES}
+ ${PREFERENCES_XML}
+ ${PROJECT_AUTOMOC})
-ADD_DEPENDENCIES(XGUI ModelAPI)
+add_dependencies(XGUI ModelAPI)
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
-TARGET_LINK_LIBRARIES(XGUI ${PROJECT_LIBRARIES})
+target_link_libraries(XGUI ${PROJECT_LIBRARIES})
-INSTALL(TARGETS XGUI DESTINATION ${SHAPER_INSTALL_BIN})
-INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
-INSTALL(FILES ${PREFERENCES_XML} DESTINATION ${SHAPER_INSTALL_RESOURCES})
-INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_RESOURCES})
+install(TARGETS XGUI DESTINATION ${SHAPER_INSTALL_BIN})
+install(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
+install(FILES ${PREFERENCES_XML} DESTINATION ${SHAPER_INSTALL_RESOURCES})
+install(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_RESOURCES})
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(UnitTest)
+include(UnitTest)
include(tests.set)
-ADD_UNIT_TESTS(${TEST_NAMES})
+add_unit_tests(${TEST_NAMES})
if(${HAVE_SALOME})
enable_testing()
set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/test_API")
- install(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
+ install(
+ FILES CTestTestfileInstall.cmake
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ RENAME CTestTestfile.cmake)
install(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
install(FILES ${TEST_NAMES} DESTINATION ${TEST_INSTALL_DIRECTORY})
endif(${HAVE_SALOME})
# Copyright (C) 2021-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
include(tests.set)
set(TEST_NAME ${COMPONENT_NAME}_${tfile})
get_filename_component(tfile_without_dir ${tfile} NAME)
add_test(${TEST_NAME} python ${tfile_without_dir})
- set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${SALOME_TEST_LABEL_ADV}")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS
+ "${SALOME_TEST_LABEL_ADV}")
endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-ENABLE_TESTING()
+enable_testing()
file(GLOB pyFiles "*.py")
-SET(RESTRICTED_ROOT_DIR $ENV{RESTRICTED_ROOT_DIR} CACHE PATH "Path to the restricted repository")
+set(RESTRICTED_ROOT_DIR
+ $ENV{RESTRICTED_ROOT_DIR}
+ CACHE PATH "Path to the restricted repository")
-if (EXISTS ${RESTRICTED_ROOT_DIR})
- file(GLOB pyFilesRestr "${RESTRICTED_ROOT_DIR}/SHAPER/test.compatibility/*.py")
+if(EXISTS ${RESTRICTED_ROOT_DIR})
+ file(GLOB pyFilesRestr
+ "${RESTRICTED_ROOT_DIR}/SHAPER/test.compatibility/*.py")
endif()
-if (WIN32) # different separators and path to libraries variable name
- SET(_JUSTPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${SUIT_LIB_DIR};${SALOME_KERNEL_LIBDIR};$ENV{PATH}")
- STRING(REPLACE "\\" "/" _JUSTPATH "${_JUSTPATH}")
- STRING(REPLACE ";" "\\;" _JUSTPATH "${_JUSTPATH}")
- SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS};$ENV{PYTHONPATH}")
- STRING(REPLACE "\\" "/" _PYTHONPATH "${_PYTHONPATH}")
- STRING(REPLACE ";" "\\;" _PYTHONPATH "${_PYTHONPATH}")
+if(WIN32) # different separators and path to libraries variable name
+ set(_JUSTPATH
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${SUIT_LIB_DIR};${SALOME_KERNEL_LIBDIR};$ENV{PATH}"
+ )
+ string(REPLACE "\\" "/" _JUSTPATH "${_JUSTPATH}")
+ string(REPLACE ";" "\\;" _JUSTPATH "${_JUSTPATH}")
+ set(_PYTHONPATH
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS};$ENV{PYTHONPATH}"
+ )
+ string(REPLACE "\\" "/" _PYTHONPATH "${_PYTHONPATH}")
+ string(REPLACE ";" "\\;" _PYTHONPATH "${_PYTHONPATH}")
else()
- SET(_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${SUIT_LIB_DIR}:${SALOME_KERNEL_LIBDIR}:$ENV{LD_LIBRARY_PATH}")
- SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:$ENV{PYTHONPATH}")
+ set(_LD_LIBRARY_PATH
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${SUIT_LIB_DIR}:${SALOME_KERNEL_LIBDIR}:$ENV{LD_LIBRARY_PATH}"
+ )
+ set(_PYTHONPATH
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:$ENV{PYTHONPATH}"
+ )
endif()
foreach(eachFilePath ${pyFiles};${pyFilesRestr})
# Strip the ".py" suffix
- GET_FILENAME_COMPONENT(aTestName ${eachFilePath} NAME_WE)
+ get_filename_component(aTestName ${eachFilePath} NAME_WE)
# Add "SubprojectName_" prefix
- GET_FILENAME_COMPONENT(aSubprojectName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
- SET(aTestName "${aSubprojectName}_${aTestName}")
+ get_filename_component(aSubprojectName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+ set(aTestName "${aSubprojectName}_${aTestName}")
# Full path to the python test file beeing executed
- SET(aTestFilePath "${eachFilePath}")
- IF(EXISTS ${aTestFilePath})
- ADD_TEST(NAME ${aTestName} COMMAND ${PYTHON_EXECUTABLE} ${aTestFilePath})
- if (WIN32) # different path to libraries variable name
- SET_TESTS_PROPERTIES(${aTestName} PROPERTIES ENVIRONMENT "PATH=${_JUSTPATH};PYTHONPATH=${_PYTHONPATH};SHAPER_UNIT_TEST_IN_PROGRESS=1"
- LABELS "tests_compatibility")
+ set(aTestFilePath "${eachFilePath}")
+ if(EXISTS ${aTestFilePath})
+ add_test(NAME ${aTestName} COMMAND ${PYTHON_EXECUTABLE} ${aTestFilePath})
+ if(WIN32) # different path to libraries variable name
+ set_tests_properties(
+ ${aTestName}
+ PROPERTIES
+ ENVIRONMENT
+ "PATH=${_JUSTPATH};PYTHONPATH=${_PYTHONPATH};SHAPER_UNIT_TEST_IN_PROGRESS=1"
+ LABELS
+ "tests_compatibility")
else()
- SET_TESTS_PROPERTIES(${aTestName} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${_LD_LIBRARY_PATH};PYTHONPATH=${_PYTHONPATH};SHAPER_UNIT_TEST_IN_PROGRESS=1"
- LABELS "tests_compatibility")
+ set_tests_properties(
+ ${aTestName}
+ PROPERTIES
+ ENVIRONMENT
+ "LD_LIBRARY_PATH=${_LD_LIBRARY_PATH};PYTHONPATH=${_PYTHONPATH};SHAPER_UNIT_TEST_IN_PROGRESS=1"
+ LABELS
+ "tests_compatibility")
endif()
- # Debug output...
- # MESSAGE(STATUS "Test added: ${aTestName} file: ${aTestFilePath}")
- ELSE(EXISTS ${aTestFilePath})
- MESSAGE(WARNING "Can not find the test file: ${aTestFilePath}")
- ENDIF(EXISTS ${aTestFilePath})
+ # Debug output... MESSAGE(STATUS "Test added: ${aTestName} file:
+ # ${aTestFilePath}")
+ else(EXISTS ${aTestFilePath})
+ message(WARNING "Can not find the test file: ${aTestFilePath}")
+ endif(EXISTS ${aTestFilePath})
endforeach(eachFilePath ${ARGN})
-ADD_CUSTOM_TARGET(run_tests_compatibility COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -L "tests_compatibility")
+add_custom_target(
+ run_tests_compatibility
+ COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -L
+ "tests_compatibility")
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-ENABLE_TESTING()
+enable_testing()
# get all restricted HDF tests
-SET(hdfFilesRestr "")
-IF (EXISTS $ENV{RESTRICTED_ROOT_DIR})
- FILE(GLOB hdfFilesRestr "$ENV{RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/*.hdf")
-ENDIF()
+set(hdfFilesRestr "")
+if(EXISTS $ENV{RESTRICTED_ROOT_DIR})
+ file(GLOB hdfFilesRestr "$ENV{RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/*.hdf")
+endif()
# get all HDF tests from the current drectory
file(GLOB hdfFilesCur "${CMAKE_CURRENT_SOURCE_DIR}/*.hdf")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${aTestName}.py")
set(TEST_NAMES ${TEST_NAMES} ${aTestName})
else()
- message(WARNING "File ${aTestName}.py containing reference data for ${aTestName}.hdf does not exist")
+ message(
+ WARNING
+ "File ${aTestName}.py containing reference data for ${aTestName}.hdf does not exist"
+ )
endif()
endforeach()
-SET(TIMEOUT 600)
+set(TIMEOUT 600)
-SET(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/HDFs")
+set(TEST_INSTALL_DIRECTORY "${SALOME_SHAPER_INSTALL_TESTS}/HDFs")
-SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+salome_generate_tests_environment(tests_env)
-SET(PUBLIC_TESTS "")
-SET(RESTRICTED_TESTS "")
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME ${COMPONENT_NAME}_HDF_${tfile})
+set(PUBLIC_TESTS "")
+set(RESTRICTED_TESTS "")
+foreach(tfile ${TEST_NAMES})
+ set(TEST_NAME ${COMPONENT_NAME}_HDF_${tfile})
- IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.hdf")
- SET(HDF_TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.hdf")
- SET(PUBLIC_TESTS ${PUBLIC_TESTS} ${tfile})
- ELSEIF(EXISTS "$ENV{RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/${tfile}.hdf")
- SET(HDF_TEST_FILE "$ENV{RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/${tfile}.hdf")
- SET(RESTRICTED_TESTS ${RESTRICTED_TESTS} ${tfile})
- ENDIF()
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.hdf")
+ set(HDF_TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.hdf")
+ set(PUBLIC_TESTS ${PUBLIC_TESTS} ${tfile})
+ elseif(EXISTS "$ENV{RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/${tfile}.hdf")
+ set(HDF_TEST_FILE "$ENV{RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/${tfile}.hdf")
+ set(RESTRICTED_TESTS ${RESTRICTED_TESTS} ${tfile})
+ endif()
- ADD_TEST(NAME ${TEST_NAME}
- COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/testme.py" "${HDF_TEST_FILE}" "${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py")
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env};SHAPER_UNIT_TEST_IN_PROGRESS=1")
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME};models_hdf;REQUIRE_X_SERVER")
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES TIMEOUT ${TIMEOUT})
-ENDFOREACH()
+ add_test(NAME ${TEST_NAME}
+ COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/testme.py"
+ "${HDF_TEST_FILE}" "${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py")
+ set_tests_properties(
+ ${TEST_NAME} PROPERTIES ENVIRONMENT
+ "${tests_env};SHAPER_UNIT_TEST_IN_PROGRESS=1")
+ set_tests_properties(
+ ${TEST_NAME} PROPERTIES LABELS
+ "${COMPONENT_NAME};models_hdf;REQUIRE_X_SERVER")
+ set_tests_properties(${TEST_NAME} PROPERTIES TIMEOUT ${TIMEOUT})
+endforeach()
-ADD_CUSTOM_TARGET(run_hdf_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -L "models_hdf")
+add_custom_target(run_hdf_tests COMMAND ${CMAKE_CTEST_COMMAND} -C
+ "${CMAKE_BUILD_TYPE}" -L "models_hdf")
# salome test
-FOREACH(tfile ${TEST_NAMES})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
+foreach(tfile ${TEST_NAMES})
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
DESTINATION ${TEST_INSTALL_DIRECTORY})
- IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.hdf")
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.hdf
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.hdf")
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.hdf
DESTINATION ${TEST_INSTALL_DIRECTORY})
- ENDIF()
-ENDFOREACH()
+ endif()
+endforeach()
-INSTALL(FILES CTestTestfileInstall.cmake
+install(
+ FILES CTestTestfileInstall.cmake
DESTINATION ${TEST_INSTALL_DIRECTORY}
RENAME CTestTestfile.cmake)
-INSTALL(FILES testme.py DESTINATION ${TEST_INSTALL_DIRECTORY}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE)
-FILE(COPY test_hdf.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-INSTALL(FILES test_hdf.py DESTINATION ${TEST_INSTALL_DIRECTORY}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- GROUP_READ GROUP_EXECUTE
- WORLD_READ WORLD_EXECUTE)
-CONFIGURE_FILE(tests.set.in ${CMAKE_CURRENT_BINARY_DIR}/tests.set @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+install(
+ FILES testme.py
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ PERMISSIONS
+ OWNER_READ
+ OWNER_WRITE
+ OWNER_EXECUTE
+ GROUP_READ
+ GROUP_EXECUTE
+ WORLD_READ
+ WORLD_EXECUTE)
+file(COPY test_hdf.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+install(
+ FILES test_hdf.py
+ DESTINATION ${TEST_INSTALL_DIRECTORY}
+ PERMISSIONS
+ OWNER_READ
+ OWNER_WRITE
+ OWNER_EXECUTE
+ GROUP_READ
+ GROUP_EXECUTE
+ WORLD_READ
+ WORLD_EXECUTE)
+configure_file(tests.set.in ${CMAKE_CURRENT_BINARY_DIR}/tests.set @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tests.set
+ DESTINATION ${TEST_INSTALL_DIRECTORY})
# Copyright (C) 2016-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-INCLUDE(tests.set)
+include(tests.set)
-SET(COMPONENT_NAME SHAPER)
-SET(PYTHON_TEST_DRIVER "testme.py")
-SET(TIMEOUT 600)
+set(COMPONENT_NAME SHAPER)
+set(PYTHON_TEST_DRIVER "testme.py")
+set(TIMEOUT 600)
-FOREACH(tfile ${PUBLIC_TESTS})
- SET(TEST_NAME ${COMPONENT_NAME}_HDF_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_TEST_DRIVER} "${TIMEOUT}" "${tfile}.hdf" "${tfile}.py")
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
-ENDFOREACH()
+foreach(tfile ${PUBLIC_TESTS})
+ set(TEST_NAME ${COMPONENT_NAME}_HDF_${tfile})
+ add_test(${TEST_NAME} ${PYTHON_TEST_DRIVER} "${TIMEOUT}" "${tfile}.hdf"
+ "${tfile}.py")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+endforeach()
-FOREACH(tfile ${RESTRICTED_TESTS})
- SET(TEST_NAME ${COMPONENT_NAME}_HDF_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_TEST_DRIVER} "${TIMEOUT}" "$ENV{RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/${tfile}.hdf" "${tfile}.py")
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
-ENDFOREACH()
+foreach(tfile ${RESTRICTED_TESTS})
+ set(TEST_NAME ${COMPONENT_NAME}_HDF_${tfile})
+ add_test(${TEST_NAME} ${PYTHON_TEST_DRIVER} "${TIMEOUT}"
+ "$ENV{RESTRICTED_ROOT_DIR}/SHAPER/test.hdfs/${tfile}.hdf"
+ "${tfile}.py")
+ set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+endforeach()
# Copyright (C) 2014-2023 CEA, EDF
#
-# 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, or (at your option) any later version.
+# 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, 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
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
+# This library is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU Lesser General Public License along
+# with this library; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+# See http://www.salome-platform.org/ or email :
+# webmaster.salome@opencascade.com
#
-ENABLE_TESTING()
+enable_testing()
file(GLOB pyFiles "*.py")
-SET(RESTRICTED_ROOT_DIR $ENV{RESTRICTED_ROOT_DIR} CACHE PATH "Path to the restricted repository")
+set(RESTRICTED_ROOT_DIR
+ $ENV{RESTRICTED_ROOT_DIR}
+ CACHE PATH "Path to the restricted repository")
-if (EXISTS ${RESTRICTED_ROOT_DIR})
+if(EXISTS ${RESTRICTED_ROOT_DIR})
file(GLOB pyFilesRestr "${RESTRICTED_ROOT_DIR}/SHAPER/test.models/*.py")
endif()
-if (WIN32) # different separators and path to libraries variable name
- SET(_JUSTPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${SUIT_LIB_DIR};${SALOME_KERNEL_LIBDIR};$ENV{PATH}")
- STRING(REPLACE "\\" "/" _JUSTPATH "${_JUSTPATH}")
- STRING(REPLACE ";" "\\;" _JUSTPATH "${_JUSTPATH}")
- SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS};$ENV{PYTHONPATH}")
- STRING(REPLACE "\\" "/" _PYTHONPATH "${_PYTHONPATH}")
- STRING(REPLACE ";" "\\;" _PYTHONPATH "${_PYTHONPATH}")
+if(WIN32) # different separators and path to libraries variable name
+ set(_JUSTPATH
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${SUIT_LIB_DIR};${SALOME_KERNEL_LIBDIR};$ENV{PATH}"
+ )
+ string(REPLACE "\\" "/" _JUSTPATH "${_JUSTPATH}")
+ string(REPLACE ";" "\\;" _JUSTPATH "${_JUSTPATH}")
+ set(_PYTHONPATH
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES};${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS};$ENV{PYTHONPATH}"
+ )
+ string(REPLACE "\\" "/" _PYTHONPATH "${_PYTHONPATH}")
+ string(REPLACE ";" "\\;" _PYTHONPATH "${_PYTHONPATH}")
else()
- SET(_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${SUIT_LIB_DIR}:${SALOME_KERNEL_LIBDIR}:$ENV{LD_LIBRARY_PATH}")
- SET(_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:$ENV{PYTHONPATH}")
+ set(_LD_LIBRARY_PATH
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_BIN}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${SUIT_LIB_DIR}:${SALOME_KERNEL_LIBDIR}:$ENV{LD_LIBRARY_PATH}"
+ )
+ set(_PYTHONPATH
+ "${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_SWIG}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_PLUGIN_FILES}:${CMAKE_INSTALL_PREFIX}/${SHAPER_INSTALL_ADDONS}:$ENV{PYTHONPATH}"
+ )
endif()
foreach(eachFilePath ${pyFiles};${pyFilesRestr})
# Strip the ".py" suffix
- GET_FILENAME_COMPONENT(aTestName ${eachFilePath} NAME_WE)
+ get_filename_component(aTestName ${eachFilePath} NAME_WE)
# Add "SubprojectName_" prefix
- GET_FILENAME_COMPONENT(aSubprojectName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
- SET(aTestName "${aSubprojectName}_${aTestName}")
+ get_filename_component(aSubprojectName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
+ set(aTestName "${aSubprojectName}_${aTestName}")
# Full path to the python test file beeing executed
- SET(aTestFilePath "${eachFilePath}")
- IF(EXISTS ${aTestFilePath})
- ADD_TEST(NAME ${aTestName} COMMAND ${PYTHON_EXECUTABLE} ${aTestFilePath})
- if (WIN32) # different path to libraries variable name
- SET_TESTS_PROPERTIES(${aTestName} PROPERTIES ENVIRONMENT "PATH=${_JUSTPATH};PYTHONPATH=${_PYTHONPATH};SHAPER_UNIT_TEST_IN_PROGRESS=1"
- LABELS "models_tests")
+ set(aTestFilePath "${eachFilePath}")
+ if(EXISTS ${aTestFilePath})
+ add_test(NAME ${aTestName} COMMAND ${PYTHON_EXECUTABLE} ${aTestFilePath})
+ if(WIN32) # different path to libraries variable name
+ set_tests_properties(
+ ${aTestName}
+ PROPERTIES
+ ENVIRONMENT
+ "PATH=${_JUSTPATH};PYTHONPATH=${_PYTHONPATH};SHAPER_UNIT_TEST_IN_PROGRESS=1"
+ LABELS
+ "models_tests")
else()
- SET_TESTS_PROPERTIES(${aTestName} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${_LD_LIBRARY_PATH};PYTHONPATH=${_PYTHONPATH};SHAPER_UNIT_TEST_IN_PROGRESS=1"
- LABELS "models_tests")
+ set_tests_properties(
+ ${aTestName}
+ PROPERTIES
+ ENVIRONMENT
+ "LD_LIBRARY_PATH=${_LD_LIBRARY_PATH};PYTHONPATH=${_PYTHONPATH};SHAPER_UNIT_TEST_IN_PROGRESS=1"
+ LABELS
+ "models_tests")
endif()
- # Debug output...
- # MESSAGE(STATUS "Test added: ${aTestName} file: ${aTestFilePath}")
- ELSE(EXISTS ${aTestFilePath})
- MESSAGE(WARNING "Can not find the test file: ${aTestFilePath}")
- ENDIF(EXISTS ${aTestFilePath})
+ # Debug output... MESSAGE(STATUS "Test added: ${aTestName} file:
+ # ${aTestFilePath}")
+ else(EXISTS ${aTestFilePath})
+ message(WARNING "Can not find the test file: ${aTestFilePath}")
+ endif(EXISTS ${aTestFilePath})
endforeach(eachFilePath ${ARGN})
-ADD_CUSTOM_TARGET(run_models_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -L "models_tests")
+add_custom_target(
+ run_models_tests COMMAND ${CMAKE_CTEST_COMMAND} -C "${CMAKE_BUILD_TYPE}" -L
+ "models_tests")