#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# Project name, upper case
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
# Project name, upper case
STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
# Find KERNEL
# ===========
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
# Find KERNEL
# ===========
IF(EXISTS ${KERNEL_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
INCLUDE(SalomeMacros)
FIND_PACKAGE(SalomeKERNEL REQUIRED)
IF(EXISTS ${KERNEL_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
INCLUDE(SalomeMacros)
FIND_PACKAGE(SalomeKERNEL REQUIRED)
ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
ELSE(EXISTS ${KERNEL_ROOT_DIR})
ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
ELSE(EXISTS ${KERNEL_ROOT_DIR})
IF(EXISTS ${GEOM_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${GEOM_ROOT_DIR}/adm_local/cmake_files")
FIND_PACKAGE(SalomeGEOM REQUIRED)
ADD_DEFINITIONS(${GEOM_DEFINITIONS})
INCLUDE_DIRECTORIES(${GEOM_INCLUDE_DIRS})
ELSE(EXISTS ${GEOM_ROOT_DIR})
IF(EXISTS ${GEOM_ROOT_DIR})
LIST(APPEND CMAKE_MODULE_PATH "${GEOM_ROOT_DIR}/adm_local/cmake_files")
FIND_PACKAGE(SalomeGEOM REQUIRED)
ADD_DEFINITIONS(${GEOM_DEFINITIONS})
INCLUDE_DIRECTORIES(${GEOM_INCLUDE_DIRS})
ELSE(EXISTS ${GEOM_ROOT_DIR})
-SET(SALOME_BUILD_GUI ${SALOME_GEOM_BUILD_GUI})
+# User options
+# ============
+OPTION(SALOME_BUILD_GUI "Enable GUI" ${SALOME_GEOM_BUILD_GUI})
+OPTION(SALOME_BUILD_DOC "Generate SALOME XTPLUGIN documentation" ON)
+OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
+OPTION(XT_READ_LICENSE "OCCT Parasolid read license key" "")
ADD_DEFINITIONS(${GUI_DEFINITIONS})
INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
ELSE(EXISTS ${GUI_ROOT_DIR})
ADD_DEFINITIONS(${GUI_DEFINITIONS})
INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS})
ELSE(EXISTS ${GUI_ROOT_DIR})
FIND_PACKAGE(SalomeCAS REQUIRED)
FIND_PACKAGE(SalomeXT REQUIRED)
FIND_PACKAGE(SalomeOmniORB REQUIRED)
FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
IF(SALOME_BUILD_GUI)
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
FIND_PACKAGE(SalomeCAS REQUIRED)
FIND_PACKAGE(SalomeXT REQUIRED)
FIND_PACKAGE(SalomeOmniORB REQUIRED)
FIND_PACKAGE(SalomeOmniORBPy REQUIRED)
IF(SALOME_BUILD_GUI)
FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
# Directories
# ===========
SET(SALOME_INSTALL_BINS bin/salome CACHE PATH "Install path: SALOME binaries")
SET(SALOME_INSTALL_LIBS lib/salome CACHE PATH "Install path: SALOME libs")
# Directories
# ===========
SET(SALOME_INSTALL_BINS bin/salome CACHE PATH "Install path: SALOME binaries")
SET(SALOME_INSTALL_LIBS lib/salome CACHE PATH "Install path: SALOME libs")
SET(SALOME_INSTALL_HEADERS include/salome CACHE PATH "Install path: SALOME headers")
SET(SALOME_INSTALL_CMAKE_LOCAL adm_local/cmake_files CACHE PATH
"Install path: local SALOME CMake files")
SET(SALOME_INSTALL_HEADERS include/salome CACHE PATH "Install path: SALOME headers")
SET(SALOME_INSTALL_CMAKE_LOCAL adm_local/cmake_files CACHE PATH
"Install path: local SALOME CMake files")
SET(SALOME_XTPLUGIN_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/xtplugin" CACHE PATH.
"Install path: SALOME XTPLUGIN specific data")
SET(SALOME_XTPLUGIN_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/xtplugin" CACHE PATH.
"Install path: SALOME XTPLUGIN specific data")
# Accumulate environment variables for XTPLUGIN module
SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON})
SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
# Sources
# Accumulate environment variables for XTPLUGIN module
SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON})
SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
# Sources
WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
VERSION ${${PROJECT_NAME_UC}_VERSION}
COMPATIBILITY AnyNewerVersion)
WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
VERSION ${${PROJECT_NAME_UC}_VERSION}
COMPATIBILITY AnyNewerVersion)