#
# !! Please read the generic detection procedure in SalomeMacros.cmake !!
#
-SET(Boost_USE_STATIC_LIBS OFF)
-SET(Boost_USE_MULTITHREADED ON)
-SET(Boost_USE_STATIC_RUNTIME OFF)
-SET(Boost_NO_BOOST_CMAKE ON)
-SET(SalomeBoost_COMPONENTS filesystem regex system thread date_time chrono serialization python3)
-SET(SalomeBoost_FIND_COMPONENTS ${SalomeBoost_COMPONENTS})
+SET(Boost_USE_STATIC_LIBS OFF)
+SET(Boost_USE_MULTITHREADED ON)
+SET(Boost_USE_STATIC_RUNTIME OFF)
+SET(Boost_NO_BOOST_CMAKE ON)
+SET(SalomeBoost_COMPONENTS filesystem regex system thread date_time chrono serialization)
+SET(SalomeBoost_FIND_COMPONENTS ${SalomeBoost_COMPONENTS})
+SET(SalomeBoost_OPTIONAL_COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} python${PYTHON_VERSION_MAJOR})
+SET(SalomeBoost_FIND_OPTIONAL_COMPONENTS ${SalomeBoost_OPTIONAL_COMPONENTS})
IF(WIN32)
# Under windows, one extra sub-directory in the boost installation hierarchy:
ENDIF()
#MARK_AS_ADVANCED()
+SET(Boost_PYTHON_LIBRARY ${Boost_PYTHON${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_LIBRARY} ${Boost_PYTHON${PYTHON_VERSION_MAJOR}_LIBRARY})
+
## Specific definitions:
IF(WIN32)
SET(BOOST_DEFINITIONS -DBOOST_DISABLE_ASSERTS -DBOOST_ALL_DYN_LINK)
# 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
+ IF(${englobPkg}_FIND_OPTIONAL_COMPONENTS)
+ FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
+ NO_MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS}
+ OPTIONAL_COMPONENTS ${${englobPkg}_FIND_OPTIONAL_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} 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)
+ ENDIF()
ELSE()
FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
NO_MODULE ${_tmp_quiet} ${_tmp_req}
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})
+ IF(${englobPkg}_FIND_OPTIONAL_COMPONENTS)
+ FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
+ MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS}
+ OPTIONAL_COMPONENTS ${${englobPkg}_FIND_OPTIONAL_COMPONENTS})
+ ELSE()
+ FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
+ MODULE ${_tmp_quiet} ${_tmp_req} COMPONENTS ${${englobPkg}_FIND_COMPONENTS})
+ ENDIF()
ELSE()
FIND_PACKAGE(${stdPkg} ${${englobPkg}_FIND_VERSION} ${_tmp_exact}
MODULE ${_tmp_quiet} ${_tmp_req})
# - _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
+# - _PREREQ_COMPO_OPT_LIST: the list of optional 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.
SET(_PREREQ_LIST)
SET(_PREREQ_DIR_LIST)
SET(_PREREQ_COMPO_LIST)
+ SET(_PREREQ_COMPO_OPT_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)
+ SALOME_APPEND_LIST_OF_LIST(_PREREQ_COMPO_OPT_LIST Salome${_prereq}_OPTIONAL_COMPONENTS)
ENDIF()
ENDFOREACH()
ENDMACRO(SALOME_CONFIGURE_PREPARE)