IF(UNIX)
IF(CMAKE_COMPILER_IS_GNUCC)
- #C++11 is not supported on some platforms, disable it
+ #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)
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.
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)
+IF(${HAVE_SALOME})
+ 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_API bin/salome CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_PYTHON_FILES bin/salome CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_SWIG bin/salome 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)
+ELSE(${HAVE_SALOME})
+ SET(SHAPER_INSTALL_ADDONS addons CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_BIN bin CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_PLUGIN_FILES plugins CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_PYTHON_API PythonAPI CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_PYTHON_FILES plugins CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_RESOURCES resources CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_SWIG swig CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_QM_RESOURCES bin CACHE INTERNAL "" FORCE)
+ SET(SHAPER_INSTALL_XML_RESOURCES plugins CACHE INTERNAL "" FORCE)
+ENDIF(${HAVE_SALOME})
+
#IF(CMAKE_BUILD_TYPE MATCHES Release)
ADD_SUBDIRECTORY (doc)
#ENDIF(CMAKE_BUILD_TYPE MATCHES Release)
)
)
-@SET SHAPER_CONFIG_FILE=%ROOT_DIR%\install\plugins
+@SET SHAPER_CONFIG_FILE=%ROOT_DIR%\install\share\salome\resources\shaper
@SET SHAPER_ROOT_DIR=%ROOT_DIR%\install
-@SET PATH=%SHAPER_ROOT_DIR%\swig;%SHAPER_ROOT_DIR%\plugins;%SHAPER_ROOT_DIR%\bin;%PATH%
-@SET PYTHONPATH=%SHAPER_ROOT_DIR%\swig;%SHAPER_ROOT_DIR%\plugins;%SHAPER_ROOT_DIR%\addons;%SHAPER_ROOT_DIR%\pythonAPI;%PYTHONPATH%
+@SET PATH=%SHAPER_ROOT_DIR%\bin\salome;%SHAPER_ROOT_DIR%\lib\salome;%PATH%
+@SET PYTHONPATH=%SHAPER_ROOT_DIR%\bin\salome;%SHAPER_ROOT_DIR%\lib\salome;%PYTHONPATH%
-@SET LightAppConfig=%%SHAPER_ROOT_DIR%\share\salome\resources\shaper;%GUI_ROOT_DIR%\share\salome\resources\gui
-@SET SHAPERResources=%SHAPER_ROOT_DIR%\resources
+@SET LightAppConfig=%SHAPER_ROOT_DIR%\share\salome\resources\shaper;%GUI_ROOT_DIR%\share\salome\resources\gui
+@SET SHAPERResources=%SHAPER_ROOT_DIR%\share\salome\resources\shaper
##
#------ SHAPER ------
-export PATH=${SHAPER_ROOT_DIR}/bin:${SHAPER_ROOT_DIR}/plugins:${PATH}
-export PYTHONPATH=${SHAPER_ROOT_DIR}/swig:${SHAPER_ROOT_DIR}/plugins:${SHAPER_ROOT_DIR}/addons:${SHAPER_ROOT_DIR}/PythonAPI:${PYTHONPATH}
-export LD_LIBRARY_PATH=${SHAPER_ROOT_DIR}/bin:${SHAPER_ROOT_DIR}/swig:${SHAPER_ROOT_DIR}/plugins:${LD_LIBRARY_PATH}
-export SHAPER_CONFIG_FILE=${SHAPER_ROOT_DIR}/plugins
-export SHAPERResources=${SHAPER_ROOT_DIR}/resources
+export PATH=${SHAPER_ROOT_DIR}/bin/salome:${SHAPER_ROOT_DIR}/lib/salome:${PATH}
+export PYTHONPATH=${SHAPER_ROOT_DIR}//bin/salome:${SHAPER_ROOT_DIR}/lib/salome:${PYTHONPATH}
+export LD_LIBRARY_PATH=${SHAPER_ROOT_DIR}/bin/salome:${SHAPER_ROOT_DIR}/lib/salome:${LD_LIBRARY_PATH}
+export SHAPER_CONFIG_FILE=${SHAPER_ROOT_DIR}/share/salome/resources/shaper
+export SHAPERResources=${SHAPER_ROOT_DIR}/share/salome/resources/shaper
+++ /dev/null
-@echo off
-
-@REM Load local settings from file localenv.bat that should be located in the root directory
-if "%ROOT_DIR%" == "" (
- set ROOT_DIR=%~dp0..
-)
-if exist "%ROOT_DIR%\localenv.bat" (
- echo Setting local environment from %ROOT_DIR%\localenv.bat
- call "%ROOT_DIR%\localenv.bat"
-) else (
- echo Warning: file %ROOT_DIR%\localenv.bat does not exist; using default environment
-)
-
-rem --------------- Configuration --------------
-
-rem --------------- Products path --------------
-if "%PDIR%" == "" (
- set PDIR=%ROOT_DIR%\products
-)
-
-rem --------------- cmake 2.8.7 --------------
-if "%CMAKEDIR%" == "" (
- set CMAKEDIR=%PDIR%\cmake-2.8.12.2
-)
-set PATH=%CMAKEDIR%\bin;%PATH%
-
-@REM -------------------------
-@REM CASCADE
-@SET CAS_ROOT_DIR=%PDIR%\OCCT-6.9.1
-@SET CASROOT=%CAS_ROOT_DIR%
-@REM -------------------------
-
-@REM -------------------------
-@REM CASCADE
-@SET PATH=%CASROOT%;%CASROOT%\win32\bin%OCC_LIB_PREFIX%;%PATH%
-@SET LIB=%CASROOT%\win32\lib%OCC_LIB_PREFIX%;%LIB%
-@set CSF_MDTVFontDirectory=%CASROOT%\src\FontMFT
-@set CSF_LANGUAGE=us
-@set MMGT_CLEAR=1
-@set CSF_EXCEPTION_PROMPT=1
-@set CSF_SHMessage=%CASROOT%\src\SHMessage
-@set CSF_MDTVTexturesDirectory=%CASROOT%\src\Textures
-@set CSF_XSMessage=%CASROOT%\src\XSMessage
-@set CSF_StandardDefaults=%CASROOT%\src\StdResource
-@set CSF_PluginDefaults=%CASROOT%\src\StdResource
-@set CSF_XCAFDefaults=%CASROOT%\src\StdResource
-@set CSF_StandardLiteDefaults=%CASROOT%\src\StdResource
-@set CSF_UnitsLexicon=%CASROOT%\src\UnitsAPI\Lexi_Expr.dat
-@set CSF_UnitsDefinition=%CASROOT%\src\UnitsAPI\Units.dat
-@set CSF_IGESDefaults=%CASROOT%\src\XSTEPResource
-@set CSF_STEPDefaults=%CASROOT%\src\XSTEPResource
-@set CSF_XmlOcafResource=%CASROOT%\src\XmlOcafResource
-@REM -------------------------
-
-
-@REM -------------------------
-@REM FREEIMAGE (Used by OCCT and Graphviz)
-@SET PATH=%PDIR%\freeimage-3.16.0\dll;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@REM FTGL (Used by OCCT)
-@SET PATH=%PDIR%\ftgl-2.1.3\bin;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@REM FREETYPE (Used by OCCT)
-@SET FREETYPE_ROOT_DIR=%PDIR%\freetype-2.4.11
-@SET PATH=%FREETYPE_ROOT_DIR%\bin;%PATH%
-@REM -------------------------
-@REM -------------------------
-
-@REM -------------------------
-@REM GL2PS (Used by OCCT AND PARAVIEW)
-@SET PATH=%PDIR%\gl2ps-1.3.8\bin;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@REM TBB (Used by OCCT)
-@SET PATH=%PDIR%\tbb-4.2.4\bin;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@REM QT
-@SET QTDIR=%PDIR%\qt-4.8.4
-@ECHO -- Creating qt.conf... in %QTDIR%
-@ECHO [Paths] > %QTDIR%/bin/qt.conf
-@ECHO Prefix = %QTDIR:\=/% >> %QTDIR%/bin/qt.conf
-@SET PATH=%QTDIR%\bin;%PATH%
-
-@REM -------------------------
-
-@REM -------------------------
-@REM PYTHON
-@SET PYTHONHOME=%PDIR%\python-2.7.10
-@SET PYTHON_INCLUDE=%PYTHONHOME%\include
-@SET PATH=%PYTHONHOME%;%PYTHONHOME%\libs;%PATH%
-@SET PYTHONPATH=%PYTHONHOME%\Lib;%PYTHONPATH%
-@SET PYTHONPATH=%PYTHONHOME%\DLLs;%PYTHONPATH%
-@SET PYTHON_VERSION=2.7
-@REM -------------------------
-
-@REM -------------------------
-@REM ZLIB (for LIBXML2)
-@SET PATH=%PDIR%\zlib-1.2.5\dll;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@REM LIBXML2
-@SET LIBXML2_ROOT_DIR=%PDIR%\libxml2-2.9.0
-@SET PATH=%LIBXML2_ROOT_DIR%\lib;%PATH%
-@SET PATH=%LIBXML2_ROOT_DIR%\bin;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@REM SWIG
-@SET PATH=%PDIR%\swig-2.0.9\bin;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@SET SOLVESPACE_ROOT_DIR=%PDIR%\solvespace-2.1
-@SET PATH=%SOLVESPACE_ROOT_DIR%\lib;%PATH%
-@SET _NO_DEBUG_HEAP=1
-@REM -------------------------
-
-@REM -------------------------
-@SET PLANEGCS_ROOT_DIR=%PDIR%\planegcs-0.16
-@SET PATH=%PLANEGCS_ROOT_DIR%\lib;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@SET EIGEN_ROOT_DIR=%PDIR%\eigen-3.2.7
-@REM -------------------------
-
-@REM -------------------------
-@IF "%SALOME_ROOT_DIR%" == "" (
-@SET BOOST_ROOT_DIR=%PDIR%\boost-1.52.0
-) ELSE (
-@SET BOOST_ROOT_DIR=%SALOME_ROOT_DIR%\PRODUCTS%OCC_LIB_PREFIX%\boost-1.52.0
-)
-@REM -------------------------
-
-@REM -------------------------
-@REM PTHREAD
-@SET PATH=%PDIR%\pthreads-2.9.1\lib;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@REM DOXYGEN
-@SET DOXYGEN_ROOT_DIR=%PDIR%\doxygen-1.8.3.1
-@SET PATH=%DOXYGEN_ROOT_DIR%\bin;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@REM GRAPHVIZ
-@SET GRAPHVIZ_ROOT_DIR=%PDIR%\graphviz-2.38.0
-@SET GRAPHVIZHOME=%GRAPHVIZ_ROOT_DIR%
-@SET PATH=%GRAPHVIZ_ROOT_DIR%\bin;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@REM PNG library (Used by GRAPHVIZ)
-@SET PATH=%PDIR%\libpng-1.5.10\bin;%PATH%
-@REM -------------------------
-
-
-@REM -------------------------
-@REM SUIT
-@SET SUIT_DIR=%PDIR%\suit
-@SET PATH=%SUIT_DIR%\bin;%PATH%
-@REM -------------------------
-
-@REM -------------------------
-@REM OPENPARTS
-@SET SHAPER_ROOT_DIR=%ROOT_DIR%\install
-@SET SHAPER_CONFIG_FILE=%SHAPER_ROOT_DIR%\plugins
-@SET PATH=%SHAPER_ROOT_DIR%\swig;%SHAPER_ROOT_DIR%\plugins;%SHAPER_ROOT_DIR%\bin;%PATH%
-@SET PYTHONPATH=%SHAPER_ROOT_DIR%\swig;%SHAPER_ROOT_DIR%\plugins;%SHAPER_ROOT_DIR%\addons;%SHAPER_ROOT_DIR%\pythonAPI;%PYTHONPATH%
-@SET SHAPERResources=%SHAPER_ROOT_DIR%\resources
-
-rem -------- Visual Studio --------------------
-rem Detect Visual Studio (either commercial or Express edition)
-if "%VS100COMNTOOLS%" == "" (
- echo Could not find MS Visual Studio: variable VS100COMNTOOLS is not defined!
- exit 1
-) else if exist "%VS100COMNTOOLS%\..\IDE\devenv.exe" (
- set MSVC_EXE="%VS100COMNTOOLS%\..\IDE\devenv.exe"
-) else if exist "%VS100COMNTOOLS%\..\IDE\VCExpress.exe" (
- set MSVC_EXE="%VS100COMNTOOLS%\..\IDE\VCExpress.exe"
-) else (
- echo "Could not find MS Visual Studio in %VS100COMNTOOLS%\..\IDE"
- echo Check environment variable VS100COMNTOOLS!
- exit 1
-)
-call "%VS100COMNTOOLS%..\Tools\vsvars32.bat"
# check default solver in the list of solvers
LIST(FIND SOLVERS ${DEFAULT_SOLVER} INDEX)
IF(${INDEX} GREATER -1)
- MESSAGE(STATUS "Default solver: ${DEFAULT_SOLVER}")
+ 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}.")
+ 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
"${CMAKE_CURRENT_BINARY_DIR}/plugins.xml"
)
-INSTALL(TARGETS Config DESTINATION bin)
-INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
+INSTALL(TARGETS Config DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
ConnectorPlugin_ExportFeature.py
)
-SET(XML_RESSOURCES
+SET(XML_RESOURCES
plugin-Connector.xml
)
-ADD_CUSTOM_TARGET(ConnectorPlugin SOURCES ${PYTHON_FILES} ${XML_RESSOURCES})
+ADD_CUSTOM_TARGET(ConnectorPlugin SOURCES ${PYTHON_FILES} ${XML_RESOURCES})
-INSTALL(FILES ${PYTHON_FILES} ${XML_RESSOURCES} DESTINATION plugins)
+INSTALL(FILES ${PYTHON_FILES} DESTINATION ${SHAPER_INSTALL_PYTHON_FILES})
+INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
SET(PROJECT_LIBRARIES
Config
- ModelAPI
- GeomAPI
+ ModelAPI
+ GeomAPI
GeomAlgoAPI
)
ADD_LIBRARY(ConstructionPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
TARGET_LINK_LIBRARIES(ConstructionPlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS ConstructionPlugin DESTINATION plugins)
-INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
+INSTALL(TARGETS ConstructionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
INCLUDE_DIRECTORIES(
../Config
SET(PROJECT_HEADERS
Events.h
Events_Message.h
- Events_MessageGroup.h
+ Events_MessageGroup.h
Events_Listener.h
Events_Loop.h
Events_Error.h
SET_TARGET_PROPERTIES(_EventsAPI PROPERTIES DEBUG_OUTPUT_NAME _EventsAPI_d)
ENDIF(WIN32)
-INSTALL(TARGETS Events DESTINATION bin)
-INSTALL(TARGETS _EventsAPI DESTINATION swig)
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)
+INSTALL(TARGETS Events DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(TARGETS _EventsAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
TARGET_LINK_LIBRARIES(ExchangePlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS ExchangePlugin DESTINATION plugins)
-INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
+INSTALL(TARGETS ExchangePlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
ADD_UNIT_TESTS(TestImport.py TestExport.py)
ADD_LIBRARY(FeaturesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
TARGET_LINK_LIBRARIES(FeaturesPlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS FeaturesPlugin DESTINATION plugins)
-INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
+INSTALL(TARGETS FeaturesPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
ADD_UNIT_TESTS(TestExtrusion.py
TestExtrusionSketch.py
)
SET(PROJECT_LIBRARIES
- ${CAS_KERNEL}
- ${CAS_MODELER}
+ ${CAS_KERNEL}
+ ${CAS_MODELER}
${CAS_VIEWER}
${CAS_SHAPE}
${CAS_TKTopAlgo}
SET_TARGET_PROPERTIES(_GeomAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAPI_d)
ENDIF(WIN32)
-INSTALL(TARGETS _GeomAPI DESTINATION swig)
-INSTALL(TARGETS GeomAPI DESTINATION bin)
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)
+INSTALL(TARGETS _GeomAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+INSTALL(TARGETS GeomAPI DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
SET_TARGET_PROPERTIES(_GeomAlgoAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomAlgoAPI_d)
ENDIF(WIN32)
-INSTALL(TARGETS _GeomAlgoAPI DESTINATION swig)
-INSTALL(TARGETS GeomAlgoAPI DESTINATION bin)
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)
+INSTALL(TARGETS _GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+INSTALL(TARGETS GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
TARGET_LINK_LIBRARIES(GeomAlgoImpl ${PROJECT_LIBRARIES})
-INSTALL(TARGETS GeomAlgoImpl DESTINATION bin)
+INSTALL(TARGETS GeomAlgoImpl DESTINATION ${SHAPER_INSTALL_BIN})
SET(PROJECT_LIBRARIES
GeomDataAPI
- ModelAPI
- GeomAPI
+ ModelAPI
+ GeomAPI
Events
- ${CAS_OCAF}
+ ${CAS_OCAF}
${CAS_SHAPE}
)
${CAS_INCLUDE_DIRS}
)
-INSTALL(TARGETS GeomData DESTINATION bin)
+INSTALL(TARGETS GeomData DESTINATION ${SHAPER_INSTALL_BIN})
SET_TARGET_PROPERTIES(_GeomDataAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomDataAPI_d)
ENDIF(WIN32)
-INSTALL(TARGETS GeomDataAPI DESTINATION bin)
-INSTALL(TARGETS _GeomDataAPI DESTINATION swig)
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)
+INSTALL(TARGETS GeomDataAPI DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(TARGETS _GeomDataAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
ADD_UNIT_TESTS(TestConstants.py)
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
)
-INSTALL(TARGETS GeomValidators DESTINATION plugins)
+INSTALL(TARGETS GeomValidators DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
${PROJECT_SOURCE_DIR}/src/Config
${PROJECT_SOURCE_DIR}/src/ModelAPI
${PROJECT_SOURCE_DIR}/src/GeomAPI
-)
+)
SET(PROJECT_HEADERS
InitializationPlugin.h
InitializationPlugin_Plugin.h
#InitializationPlugin_OriginPlanesFeature.h
)
-
+
SET(PROJECT_SOURCES
InitializationPlugin_Plugin.cpp
#InitializationPlugin_OriginPlanesFeature.cpp
TARGET_LINK_LIBRARIES(InitializationPlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS InitializationPlugin DESTINATION plugins)
+INSTALL(TARGETS InitializationPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
#INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
)
SET(PROJECT_LIBRARIES
- ModelAPI
- Events
- Config
+ ModelAPI
+ Events
+ Config
GeomData
GeomAPI
GeomAlgoAPI
${CAS_INCLUDE_DIRS}
)
-INSTALL(TARGETS Model DESTINATION bin)
+INSTALL(TARGETS Model DESTINATION ${SHAPER_INSTALL_BIN})
SET_TARGET_PROPERTIES(ModelAPI PROPERTIES LINKER_LANGUAGE CXX)
TARGET_LINK_LIBRARIES(ModelAPI ${PROJECT_LIBRARIES})
-INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Config
+INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Config
${PROJECT_SOURCE_DIR}/src/Events
${PROJECT_SOURCE_DIR}/src/GeomAPI
${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
SET_TARGET_PROPERTIES(_ModelAPI PROPERTIES DEBUG_OUTPUT_NAME _ModelAPI_d)
ENDIF(WIN32)
-INSTALL(TARGETS _ModelAPI DESTINATION swig)
-INSTALL(TARGETS ModelAPI DESTINATION bin)
-INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)
+INSTALL(TARGETS _ModelAPI DESTINATION ${SHAPER_INSTALL_SWIG})
+INSTALL(TARGETS ModelAPI DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
ADD_UNIT_TESTS(TestConstants.py
TestUndoRedo.py
ModuleBase_ModelWidget.h
ModuleBase_Operation.h
ModuleBase_OperationAction.h
- ModuleBase_OperationDescription.h
+ ModuleBase_OperationDescription.h
ModuleBase_OperationFeature.h
ModuleBase_PageBase.h
ModuleBase_PageGroupBox.h
- ModuleBase_PageWidget.h
+ ModuleBase_PageWidget.h
ModuleBase_PagedContainer.h
ModuleBase_ParamIntSpinBox.h
ModuleBase_ParamSpinBox.h
ModuleBase_ModelWidget.cpp
ModuleBase_Operation.cpp
ModuleBase_OperationAction.cpp
- ModuleBase_OperationDescription.cpp
+ ModuleBase_OperationDescription.cpp
ModuleBase_OperationFeature.cpp
ModuleBase_PageBase.cpp
ModuleBase_PageGroupBox.cpp
${ViewerData}
)
-SET(PROJECT_AUTOMOC
+SET(PROJECT_AUTOMOC
${CMAKE_CURRENT_BINARY_DIR}/ModuleBase_automoc.cpp
)
ADD_LIBRARY(ModuleBase SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
TARGET_LINK_LIBRARIES(ModuleBase GeomAPI ${PROJECT_LIBRARIES})
-INSTALL(TARGETS ModuleBase DESTINATION bin)
-
+INSTALL(TARGETS ModuleBase DESTINATION ${SHAPER_INSTALL_BIN})
ParametersPlugin_Validators.h
ParametersPlugin_EvalListener.h
)
-
+
SET(PROJECT_SOURCES
ParametersPlugin_Plugin.cpp
ParametersPlugin_Parameter.cpp
${PROJECT_SOURCE_DIR}/src/GeomDataAPI
${SUIT_INCLUDE}
${PYTHON_INCLUDE_DIR}
-)
+)
MESSAGE(STATUS "PYTHON_LIBRARIES (ParametersPlugin): ${PYTHON_LIBRARIES}")
TARGET_LINK_LIBRARIES(ParametersPlugin ${PROJECT_LIBRARIES})
-INSTALL(TARGETS ParametersPlugin DESTINATION plugins)
-INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
+INSTALL(TARGETS ParametersPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
ADD_UNIT_TESTS(TestParameterCreation.py
TestParameterRename.py
PartSet_IconFactory.cpp
)
-SET(PROJECT_RESOURCES
+SET(PROJECT_RESOURCES
PartSet_icons.qrc
)
${CAS_SHAPE}
)
-SET(PROJECT_AUTOMOC
+SET(PROJECT_AUTOMOC
${CMAKE_CURRENT_BINARY_DIR}/PartSet_automoc.cpp
)
QT4_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
#QT4_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
-#QT4_CREATE_TRANSLATION(QM_RESOURCES
+#QT4_CREATE_TRANSLATION(QM_RESOURCES
# ${PROJECT_SOURCES}
# ${TEXT_RESOURCES}
# OPTIONS -extensions cpp -no-recursive
ENDIF(NOT ${HAVE_SALOME})
ADD_DEFINITIONS(-DPARTSET_EXPORTS ${CAS_DEFINITIONS})
-ADD_LIBRARY(PartSet SHARED
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${PROJECT_COMPILED_RESOURCES}
-# ${TEXT_RESOURCES}
+ADD_LIBRARY(PartSet SHARED
+ ${PROJECT_SOURCES}
+ ${PROJECT_HEADERS}
+ ${PROJECT_COMPILED_RESOURCES}
+# ${TEXT_RESOURCES}
# ${QM_RESOURCES}
)
ADD_DEPENDENCIES(PartSet ModuleBase)
-INSTALL(TARGETS PartSet DESTINATION bin)
+INSTALL(TARGETS PartSet DESTINATION ${SHAPER_INSTALL_BIN})
#INSTALL(FILES ${QM_RESOURCES} DESTINATION bin)
-
../GeomAPI
)
-INSTALL(TARGETS PartSetPlugin DESTINATION plugins)
-INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
+INSTALL(TARGETS PartSetPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
SET(CMAKE_AUTOMOC ON)
-INSTALL(DIRECTORY extension geom model examples DESTINATION PythonAPI)
-INSTALL(FILES shaper.py DESTINATION PythonAPI)
+INSTALL(DIRECTORY extension geom model examples DESTINATION ${SHAPER_INSTALL_PYTHON_API})
+INSTALL(FILES shaper.py DESTINATION ${SHAPER_INSTALL_PYTHON_API})
# --------- Unit tests -----------
INCLUDE(UnitTest)
SET(CMAKE_AUTOMOC ON)
-INSTALL(FILES addons_Features.py addons_Features.xml DESTINATION plugins)
+# configuration
+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"
+ )
-INSTALL(FILES __init__.py DESTINATION addons)
-INSTALL(DIRECTORY macros DESTINATION addons)
+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})
+++ /dev/null
-<plugin>
- <source path="../addons/macros/box/widget.xml"/>
- <source path="../addons/macros/rectangle/widget.xml"/>
-</plugin>
--- /dev/null
+<plugin>
+ <source path="@ADDONS_FOLDER_PATH@/macros/box/widget.xml"/>
+ <source path="@ADDONS_FOLDER_PATH@/macros/rectangle/widget.xml"/>
+</plugin>
SHAPERGUI_NestedButton.h
)
-SET(PROJECT_AUTOMOC
+SET(PROJECT_AUTOMOC
${CMAKE_CURRENT_BINARY_DIR}/SHAPERGUI_automoc.cpp
)
${CAS_INCLUDE_DIRS}
)
-ADD_LIBRARY(SHAPER SHARED
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
+ADD_LIBRARY(SHAPER SHARED
+ ${PROJECT_SOURCES}
+ ${PROJECT_HEADERS}
)
ADD_DEPENDENCIES(SHAPER XGUI)
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
TARGET_LINK_LIBRARIES(SHAPER ${PROJECT_LIBRARIES})
-INSTALL(TARGETS SHAPER DESTINATION bin)
-INSTALL(FILES ${PROJECT_RESOURCES} DESTINATION share/salome/resources/shaper )
+INSTALL(TARGETS SHAPER DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${PROJECT_RESOURCES} DESTINATION ${SHAPER_INSTALL_RESOURCES})
../SketcherPrs
)
-INSTALL(TARGETS SketchPlugin DESTINATION plugins)
-INSTALL(FILES ${XML_RESOURCES} DESTINATION plugins)
+INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
+INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
ADD_UNIT_TESTS(TestSketchPointLine.py
TestSketchArcCircle.py
TARGET_LINK_LIBRARIES(SketchSolver ${PROJECT_LIBRARIES}
)
-INSTALL(TARGETS SketchSolver DESTINATION plugins)
+INSTALL(TARGETS SketchSolver DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
# Include specific solvers
ADD_LIBRARY(PlaneGCSSolver MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS})
TARGET_LINK_LIBRARIES(PlaneGCSSolver ${PROJECT_LIBRARIES})
-INSTALL(TARGETS PlaneGCSSolver DESTINATION plugins)
+INSTALL(TARGETS PlaneGCSSolver DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
ADD_LIBRARY(SolveSpaceSolver MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS})
TARGET_LINK_LIBRARIES(SolveSpaceSolver ${PROJECT_LIBRARIES})
-INSTALL(TARGETS SolveSpaceSolver DESTINATION plugins)
+INSTALL(TARGETS SolveSpaceSolver DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
TARGET_LINK_LIBRARIES(SketcherPrs ${PROJECT_LIBRARIES})
-INSTALL(TARGETS SketcherPrs DESTINATION bin)
-INSTALL(FILES ${PROJECT_PICTURES} DESTINATION resources)
\ No newline at end of file
+INSTALL(TARGETS SketcherPrs DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${PROJECT_PICTURES} DESTINATION ${SHAPER_INSTALL_RESOURCES})
XGUI_WorkshopListener.h
)
-SET(PROJECT_AUTOMOC
+SET(PROJECT_AUTOMOC
${CMAKE_CURRENT_BINARY_DIR}/XGUI_automoc.cpp
)
XGUI_WorkshopListener.cpp
)
-SET(PROJECT_RESOURCES
+SET(PROJECT_RESOURCES
XGUI_pictures.qrc
)
ENDIF(NOT ${HAVE_SALOME})
-IF(WIN32)
+IF(WIN32)
SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
ELSE()
SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
QT4_ADD_RESOURCES(PROJECT_COMPILED_RESOURCES ${PROJECT_RESOURCES})
#QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
-QT4_CREATE_TRANSLATION(QM_RESOURCES
+QT4_CREATE_TRANSLATION(QM_RESOURCES
${PROJECT_SOURCES}
${TEXT_RESOURCES}
OPTIONS -extensions cpp -no-recursive
ADD_DEFINITIONS( -DXGUI_EXPORTS ${CAS_DEFINITIONS} )
-SET(PROJECT_INCLUDES
+SET(PROJECT_INCLUDES
${PROJECT_SOURCE_DIR}/src/Events
${PROJECT_SOURCE_DIR}/src/Config
${PROJECT_SOURCE_DIR}/src/ModelAPI
ENDIF(NOT ${HAVE_SALOME})
INCLUDE_DIRECTORIES(${PROJECT_INCLUDES})
-
+
LINK_DIRECTORIES($ENV{PYTHON_LIB_DIR})
-ADD_LIBRARY(XGUI SHARED
- ${PROJECT_SOURCES}
- ${PROJECT_HEADERS}
- ${PROJECT_COMPILED_RESOURCES}
+ADD_LIBRARY(XGUI SHARED
+ ${PROJECT_SOURCES}
+ ${PROJECT_HEADERS}
+ ${PROJECT_COMPILED_RESOURCES}
${TEXT_RESOURCES}
${QM_RESOURCES}
${PREFERENCES_XML}
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
TARGET_LINK_LIBRARIES(XGUI ${PROJECT_LIBRARIES})
-INSTALL(TARGETS XGUI DESTINATION bin)
-INSTALL(FILES ${QM_RESOURCES} DESTINATION bin)
-INSTALL(FILES ${PREFERENCES_XML} DESTINATION resources)
-
+INSTALL(TARGETS XGUI DESTINATION ${SHAPER_INSTALL_BIN})
+INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
+INSTALL(FILES ${PREFERENCES_XML} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})