diff --git a/.github/workflows/actions/windows/getLibpack/action.yml b/.github/workflows/actions/windows/getLibpack/action.yml deleted file mode 100644 index 1d9431ab..00000000 --- a/.github/workflows/actions/windows/getLibpack/action.yml +++ /dev/null @@ -1,76 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later -# *************************************************************************** -# * * -# * Copyright (c) 2023 0penBrain. * -# * * -# * This file is part of ISIMPA. * -# * * -# * ISIMPA 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. * -# * * -# * ISIMPA 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 ISIMPA. If not, see * -# * . * -# * * -# *************************************************************************** - -# This action aims at speeding up CI and reduce dependency to external resources -# by creating a cache of Libpack needed files then using it for CI runs rather -# than downloading every time. -# -# If it needs to be updated to another version, the process it to change -# 'downloadpath' and 'version' inputs below then delete the existing cache -# from Github interface so a new one is generated using new values. - -name: getLibpack -description: "Windows: tries to get a cached version of Libpack and create one if fails" - -inputs: - libpackdir: - description: "Directory where libpack files shall be stored" - required: true -# Below inputs shall generally not be provided as they won't be used if a cached version exists -# They are mainly used because Github do not support adding env variables in a composite action - libpackdownloadurl: - description: "URL where to download libpack" - required: false - default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/3.0.0RC4/LibPack-1.0.0-v3.0.0RC4-Release.7z - libpackname: - description: "Libpack name (once downloaded)" - required: false - default: LibPack-1.0.0-v3.0.0RC4-Release - -runs: - using: "composite" - steps: - - name: Create destination directory - shell: bash - run: | - mkdir -p ${{ inputs.libpackdir }} - - name: Get cached version - uses: actions/cache/restore@v4 - id: getCached - with: - path: ${{ inputs.libpackdir }} - key: libpackforwin-${{ inputs.libpackname }} - - name: Download libpack - shell: bash - if: steps.getCached.outputs.cache-hit != 'true' - run: | - curl -L -o libpack.7z ${{ inputs.libpackdownloadurl }} - 7z x libpack.7z -o"libpacktemp" -r -y - mv libpacktemp/${{ inputs.libpackname }}/* ${{ inputs.libpackdir }} - rm -rf libpacktemp - - name: Save version to cache - if: steps.getCached.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - path: ${{ inputs.libpackdir }} - key: ${{ steps.getCached.outputs.cache-primary-key }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 85dac525..8015f316 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,14 +9,6 @@ project (isimpa VERSION 1.3.4) # a better way to load dependencies include(cmake/CPM.cmake) -# include helper functions/macros -add_subdirectory(cmake/ISIMPA_Helpers) - -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake") - -InitializeISIMPABuildOptions() -ISIMPALibpackChecks() - # convert path of a .lib file into a .dll file # findboost does not store .dll locations macro(LIB_TO_DLL LIBPATH DLL_PATH) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake deleted file mode 100644 index 8a3490ce..00000000 --- a/cmake/ConfigureChecks.cmake +++ /dev/null @@ -1,60 +0,0 @@ - -include(CheckIncludeFile) -include(CheckIncludeFiles) -include(CheckSymbolExists) -include(CheckFunctionExists) -include(CheckLibraryExists) -include(CheckTypeSize) -include(CheckCSourceCompiles) -include(CheckIncludeFileCXX) -include(CheckCXXSourceCompiles) - -check_include_file(GL/gl.h HAVE_GL_GL_H) - -# i/o streams -check_include_file_cxx(istream HAVE_ISTREAM) -check_include_file_cxx(ostream HAVE_OSTREAM) -check_include_file_cxx(fstream HAVE_FSTREAM) -check_include_file_cxx(sstream HAVE_SSTREAM) -check_include_file_cxx(ios HAVE_IOS) -check_include_file_cxx(iostream HAVE_IOSTREAM) -check_include_file_cxx(iomanip HAVE_IOMANIP) - -include(TestForANSIStreamHeaders) -IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS) - SET(HAVE_STD_IOSTREAM 1) - SET(USE_STD_IOSTREAM 1) -ENDIF(NOT CMAKE_NO_ANSI_STREAM_HEADERS) - -include(TestForSTDNamespace) -IF(NOT CMAKE_NO_ANSI_STRING_STREAM) - SET(HAVE_NAMESPACES 1) -ENDIF(NOT CMAKE_NO_ANSI_STRING_STREAM) - -SET(HAVE_QGLFORMAT_EQ_OP 1) -SET(HAVE_QGLFORMAT_SETOVERLAY 1) -SET(HAVE_QGLWIDGET_SETAUTOBUFFERSWAP 1) -SET(HAVE_QT_KEYPAD_DEFINE 1) -SET(HAVE_QWIDGET_SHOWFULLSCREEN 1) - - -file(WRITE ${CMAKE_BINARY_DIR}/backtrace.cpp - "#include \n" - "#include \n\n" - "int main() {\n" - " void *callstack[128];\n" - " size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]);\n" - " size_t nFrames = backtrace(callstack, nMaxFrames);\n" - " char **symbols = backtrace_symbols(callstack, nFrames);\n" - " return 0;\n" - "}" -) - -try_compile( - RESULT_VAR - ${CMAKE_BINARY_DIR} - SOURCES - ${CMAKE_BINARY_DIR}/backtrace.cpp -) - -SET(HAVE_BACKTRACE_SYMBOLS ${RESULT_VAR}) diff --git a/cmake/FindCoin3DDoc.cmake b/cmake/FindCoin3DDoc.cmake deleted file mode 100644 index 70ae9e15..00000000 --- a/cmake/FindCoin3DDoc.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# Try to find Coin3D Doc -# If found, this will define -# -# COIN3D_DOC_FOUND - we have access to Coin3D doc, either locally -# or on the net -# COIN3D_DOC_TAGFILE - full name of the tag file -# COIN3D_DOC_PATH - path to html Coin3D doc - -SET( COIN3D_DOC_FOUND "NO" ) - -IF (COIN3D_FOUND) - IF (WIN32) - IF (CYGWIN) - # Not yet implemented - ELSE (CYGWIN) - # Not yet implemented - ENDIF (CYGWIN) - ELSE (WIN32) - IF(APPLE) - # Not yet implemented - ELSE(APPLE) - # Unix systems - find_path(COIN3D_DOC_PATH index.html - /usr/share/doc/libcoin80-doc/html - /usr/share/doc/coin/html - /usr/share/doc/Coin/html - ) - IF( EXISTS ${COIN3D_DOC_PATH}) - message(STATUS "Coin3D doc is installed") - find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag - PATHS ${COIN3D_DOC_PATH} - ) - IF( EXISTS ${COIN3D_DOC_TAGFILE}) - SET( COIN3D_DOC_FOUND "YES" - ) - ELSE( EXISTS ${COIN3D_DOC_TAGFILE}) - find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz - PATHS ${COIN3D_DOC_PATH} - ) - IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ}) - message(STATUS " Found ${COIN3D_DOC_TAGFILE_GZ}") - message(STATUS " You should uncompress this file if you want to use it for source doc generation") - ENDIF( EXISTS ${COIN3D_DOC_TAGFILE_GZ}) - - ENDIF( EXISTS ${COIN3D_DOC_TAGFILE}) - - ELSE( EXISTS ${COIN3D_DOC_PATH}) - #fallback: tries to use online coin doc - message(STATUS "Coin3D doc is not installed") - SET(COIN3D_DOC_PATH - http://doc.coin3d.org/Coin - ) - find_file(COIN3D_DOC_TAGFILE coin.tag - ${CMAKE_BINARY_DIR}/src/Doc - ) - IF( EXISTS ${COIN3D_DOC_TAGFILE}) - SET( COIN3D_DOC_FOUND "YES" ) - ENDIF( EXISTS ${COIN3D_DOC_TAGFILE}) - ENDIF( EXISTS ${COIN3D_DOC_PATH}) - ENDIF(APPLE) - ENDIF(WIN32) -ENDIF(COIN3D_FOUND) - -if(COIN3D_DOC_FOUND) - message(STATUS " Tag file: ${COIN3D_DOC_TAGFILE}") - message(STATUS " Location: ${COIN3D_DOC_PATH}") -endif(COIN3D_DOC_FOUND) - -# export for others -SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available") diff --git a/cmake/FindEigen3.cmake b/cmake/FindEigen3.cmake deleted file mode 100644 index eda81431..00000000 --- a/cmake/FindEigen3.cmake +++ /dev/null @@ -1,65 +0,0 @@ -# - Try to find Eigen3 lib -# -# This module supports requiring a minimum version, e.g. you can do -# find_package(Eigen3 3.1.2) -# to require version 3.1.2 or newer of Eigen3. -# -# Once done this will define -# -# EIGEN3_FOUND - system has eigen lib with correct version -# EIGEN3_INCLUDE_DIR - the eigen include directory -# EIGEN3_VERSION - eigen version - -# Copyright (c) 2006, 2007 Montel Laurent, -# Copyright (c) 2008, 2009 Gael Guennebaud, -# Copyright (c) 2009 Benoit Jacob -# Redistribution and use is allowed according to the terms of the 2-clause BSD license. - -if(NOT Eigen3_FIND_VERSION) - set(Eigen3_FIND_VERSION_MAJOR 3) - set(Eigen3_FIND_VERSION_MINOR 0) - set(Eigen3_FIND_VERSION_PATCH 0) - set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}") -endif(NOT Eigen3_FIND_VERSION) - -macro(_eigen3_check_version) - file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) - - string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") - set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") - set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") - set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}") - - set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}) - if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - set(EIGEN3_VERSION_OK FALSE) - message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, " - "but at least version ${Eigen3_FIND_VERSION} is required") - else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - set(EIGEN3_VERSION_OK TRUE) - endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) -endmacro(_eigen3_check_version) - -if (EIGEN3_INCLUDE_DIR) - # in cache already - _eigen3_check_version() - set(EIGEN3_FOUND ${EIGEN3_VERSION_OK}) -else (EIGEN3_INCLUDE_DIR) - - find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library - PATHS - ${CMAKE_INSTALL_PREFIX}/include - ${KDE4_INCLUDE_DIR} - PATH_SUFFIXES eigen3 eigen - ) - - if(EIGEN3_INCLUDE_DIR) - _eigen3_check_version() - endif(EIGEN3_INCLUDE_DIR) - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Eigen3 REQUIRED_VARS EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK VERSION_VAR EIGEN3_VERSION) - mark_as_advanced(EIGEN3_INCLUDE_DIR) - -endif(EIGEN3_INCLUDE_DIR) diff --git a/cmake/FindKDL.cmake b/cmake/FindKDL.cmake deleted file mode 100644 index 65bd9ddf..00000000 --- a/cmake/FindKDL.cmake +++ /dev/null @@ -1,58 +0,0 @@ -# Locate KDL install directory - -# This module defines -# KDL_INSTALL where to find include, lib, bin, etc. -# KDL_FOUND, is set to true - -#INCLUDE (${PROJECT_SOURCE_DIR}/config/FindPkgConfig.cmake) - -IF ( CMAKE_PKGCONFIG_EXECUTABLE ) - - MESSAGE( STATUS "Detecting KDL" ) - - SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/") - MESSAGE( "Looking for KDL in: ${KDL_INSTALL}") - PKGCONFIG( "orocos-kdl >= 0.99" KDL_FOUND KDL_INCLUDE_DIRS KDL_DEFINES KDL_LINK_DIRS KDL_LIBS ) - - IF( KDL_FOUND ) - MESSAGE(" Includes in: ${KDL_INCLUDE_DIRS}") - MESSAGE(" Libraries in: ${KDL_LINK_DIRS}") - MESSAGE(" Libraries: ${KDL_LIBS}") - MESSAGE(" Defines: ${KDL_DEFINES}") - - INCLUDE_DIRECTORIES( ${KDL_INCLUDE_DIRS} ) - LINK_DIRECTORIES( ${KDL_LINK_DIRS}) - #OROCOS_PKGCONFIG_INCPATH("${KDLTK_INCLUDE_DIRS}") - #OROCOS_PKGCONFIG_LIBS("${KDL_LIBS}") - #OROCOS_PKGCONFIG_LIBPATH("${KDL_LINK_DIRS}") - - SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:${OROCOS_INSTALL}/lib/pkgconfig") - MESSAGE( "Looking for KDL Toolkit in: ${PKG_CONFIG_PATH}") - PKGCONFIG( "orocos-kdltk-${OROCOS_TARGET} >= 0.99" KDLTK_FOUND KDLTK_INCLUDE_DIRS KDLTK_DEFINES KDLTK_LINK_DIRS KDLTK_LIBS ) - IF(KDLTK_FOUND) - INCLUDE_DIRECTORIES( ${KDLTK_INCLUDE_DIRS} ) - LINK_DIRECTORIES( ${KDLTK_LINK_DIRS}) - OROCOS_PKGCONFIG_INCPATH("${KDLTK_INCLUDE_DIRS}") - OROCOS_PKGCONFIG_LIBPATH("${KDLTK_LINK_DIRS}") - OROCOS_PKGCONFIG_LIBS("${KDLTK_LIBS}") - IF(CORBA_ENABLED) - SET(ENV{PKG_CONFIG_PATH} "${KDL_INSTALL}/lib/pkgconfig/:${OROCOS_INSTALL}/lib/pkgconfig") - MESSAGE("Looking for KDL Toolkit CORBA extension in ${PKG_CONFIG_PATH}") - PKGCONFIG( "orocos-kdltk-corba-${OROCOS_TARGET} >= 0.99" KDLTKCORBA_FOUND KDLTKCORBA_INCLUDE_DIRS KDLTKCORBA_DEFINES KDLTKCORBA_LINK_DIRS KDLTKCORBA_LIBS ) - IF(KDLTKCORBA_FOUND) - INCLUDE_DIRECTORIES( ${KDLTKCORBA_INCLUDE_DIRS} ) - LINK_DIRECTORIES( ${KDLTKCORBA_LINK_DIRS}) - OROCOS_PKGCONFIG_INCPATH("${KDLTKCORBA_INCLUDE_DIRS}") - OROCOS_PKGCONFIG_LIBPATH("${KDLTKCORBA_LINK_DIRS}") - OROCOS_PKGCONFIG_LIBS("${KDLTKCORBA_LIBS}") - ENDIF ( KDLTKCORBA_FOUND ) - ENDIF(CORBA_ENABLED) - ENDIF ( KDLTK_FOUND ) - ENDIF ( KDL_FOUND ) - -ELSE ( CMAKE_PKGCONFIG_EXECUTABLE ) - - # Can't find pkg-config -- have to search manually - MESSAGE( FATAL_ERROR "Can't find KDL without pkgconfig !") - -ENDIF ( CMAKE_PKGCONFIG_EXECUTABLE ) diff --git a/cmake/FindMEDFile.cmake b/cmake/FindMEDFile.cmake deleted file mode 100644 index 13af50bc..00000000 --- a/cmake/FindMEDFile.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# - Find MED file installation -# -# The following variable are set: -# MEDFILE_INCLUDE_DIRS -# MEDFILE_LIBRARIES -# MEDFILE_C_LIBRARIES -# MEDFILE_F_LIBRARIES -# MEDFILE_VERSION -# -# The CMake (or environment) variable MEDFILE_ROOT_DIR can be set to -# guide the detection and indicate a root directory to look into. -# -############################################################################ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, 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 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 -# - -# ------ - -MESSAGE(STATUS "Check for medfile (libmed and libmedc) ...") - -# ------ - -SET(MEDFILE_ROOT_DIR $ENV{MEDFILE_ROOT_DIR} CACHE PATH "Path to the MEDFile.") -IF(MEDFILE_ROOT_DIR) - LIST(APPEND CMAKE_PREFIX_PATH "${MEDFILE_ROOT_DIR}") -ENDIF(MEDFILE_ROOT_DIR) - -FIND_PATH(MEDFILE_INCLUDE_DIRS med.h PATH_SUFFIXES med) -FIND_FILE(meddotH med.h PATHS ${MEDFILE_INCLUDE_DIRS} NO_DEFAULT_PATH) -IF(NOT meddotH) - MESSAGE(FATAL_ERROR "med.h not found, please install development header-files for libmedc") -ENDIF(NOT meddotH) -#FIND_PROGRAM(MDUMP mdump) -FIND_LIBRARY(MEDFILE_C_LIBRARIES NAMES medC) -FIND_LIBRARY(MEDFILE_F_LIBRARIES NAMES med) -IF(MEDFILE_F_LIBRARIES) - SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES} ${MEDFILE_F_LIBRARIES}) -ELSE(MEDFILE_F_LIBRARIES) - SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES}) -ENDIF(MEDFILE_F_LIBRARIES) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(MEDFile REQUIRED_VARS MEDFILE_INCLUDE_DIRS MEDFILE_LIBRARIES) - -IF(meddotH) - FILE(READ "${meddotH}" _med_h) - STRING(REGEX MATCH "define[ \t]+MED_MAJOR_NUM[ \t]+([0-9?])" _med_major_version_match "${_med_h}") - SET(MED_MAJOR_VERSION "${CMAKE_MATCH_1}") - STRING(REGEX MATCH "define[ \t]+MED_MINOR_NUM[ \t]+([0-9?])" _med_minor_version_match "${_med_h}") - SET(MED_MINOR_VERSION "${CMAKE_MATCH_1}") - STRING(REGEX MATCH "define[ \t]+MED_RELEASE_NUM[ \t]+([0-9?])" _med_release_version_match "${_med_h}") - SET(MED_RELEASE_VERSION "${CMAKE_MATCH_1}") - SET(MEDFILE_VERSION "${MED_MAJOR_VERSION}.${MED_MINOR_VERSION}.${MED_RELEASE_VERSION}") -ENDIF() diff --git a/cmake/FindMatplotlib.cmake b/cmake/FindMatplotlib.cmake deleted file mode 100644 index 9c441e98..00000000 --- a/cmake/FindMatplotlib.cmake +++ /dev/null @@ -1,45 +0,0 @@ -# - Find the matplotlib libraries -# This module finds IF matplotlib is installed, and sets the following variables -# indicating where it is. -# -# MATPLOTLIB_FOUND - was matplotlib found -# MATPLOTLIB_VERSION - the version of matplotlib found as a string -# MATPLOTLIB_VERSION_MAJOR - the major version number of matplotlib -# MATPLOTLIB_VERSION_MINOR - the minor version number of matplotlib -# MATPLOTLIB_VERSION_PATCH - the patch version number of matplotlib -# MATPLOTLIB_PATH_DIRS - path to the matplotlib include files - -IF(Python3_Interpreter_FOUND) - # Try to import matplotlib into Python interpreter. Python - # interpreter was found previously as required package, so - # don't take care about this. - execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" - "import matplotlib as m; print(m.__version__); print(m.__path__[0]);" - RESULT_VARIABLE _MATPLOTLIB_SEARCH_SUCCESS - OUTPUT_VARIABLE _MATPLOTLIB_VALUES - ERROR_VARIABLE _MATPLOTLIB_ERROR_VALUE - OUTPUT_STRIP_TRAILING_WHITESPACE) - - IF(_MATPLOTLIB_SEARCH_SUCCESS MATCHES 0) - set(MATPLOTLIB_FOUND TRUE) - - # Convert the process output into a list - string(REGEX REPLACE ";" "\\\\;" _MATPLOTLIB_VALUES ${_MATPLOTLIB_VALUES}) - string(REGEX REPLACE "\n" ";" _MATPLOTLIB_VALUES ${_MATPLOTLIB_VALUES}) - list(GET _MATPLOTLIB_VALUES 0 MATPLOTLIB_VERSION) - list(GET _MATPLOTLIB_VALUES 1 MATPLOTLIB_PATH_DIRS) - - # Make sure all directory separators are '/' - string(REGEX REPLACE "\\\\" "/" MATPLOTLIB_PATH_DIRS ${MATPLOTLIB_PATH_DIRS}) - - # Get the major and minor version numbers - string(REGEX REPLACE "\\." ";" _MATPLOTLIB_VERSION_LIST ${MATPLOTLIB_VERSION}) - list(GET _MATPLOTLIB_VERSION_LIST 0 MATPLOTLIB_VERSION_MAJOR) - list(GET _MATPLOTLIB_VERSION_LIST 1 MATPLOTLIB_VERSION_MINOR) - list(GET _MATPLOTLIB_VERSION_LIST 2 MATPLOTLIB_VERSION_PATCH) - ELSE() - set(MATPLOTLIB_FOUND FALSE) - ENDIF() -ELSE() - set(MATPLOTLIB_FOUND FALSE) -ENDIF() diff --git a/cmake/FindNETGEN.cmake b/cmake/FindNETGEN.cmake deleted file mode 100644 index 8162adfb..00000000 --- a/cmake/FindNETGEN.cmake +++ /dev/null @@ -1,149 +0,0 @@ -# Try to find nglib/netgen -# -# Optional input NETGENDATA is path to the netgen libsrc source tree - this is -# required due to some headers not being installed by netgen. -# -# Once done this will define -# -# NGLIB_INCLUDE_DIR - where the nglib include directory can be found -# NGLIB_LIBRARIES - Link this to use nglib -# NETGEN_INCLUDE_DIRS - where the netgen include directories can be found -# NETGEN_DEFINITIONS - C++ compiler defines required to use netgen/nglib -# -# See also: http://git.salome-platform.org/gitweb/?p=NETGENPLUGIN_SRC.git;a=summary - - -find_package(Netgen CONFIG) -IF (Netgen_FOUND) - set(NGLIB_INCLUDE_DIR ${NETGEN_INCLUDE_DIRS}) - set(NGLIB_LIBRARIES nglib) - set(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY) - # for external smesh only the following two variables are needed: - set(NETGEN_FOUND True) - set(NETGEN_INCLUDE_DIRS ${NETGEN_INCLUDE_DIRS}) - -ELSE () - - SET(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY) - - IF (WIN32) - FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR}) - SET(NETGEN_LIBS nglib mesh occ interface) - SET(NGLIB_LIBRARIES "") - FOREACH (it ${NETGEN_LIBS}) - FIND_LIBRARY(NGLIB ${it} PATHS ${NETGEN_LIBDIR}) - FIND_LIBRARY(NGLIBD ${it}d PATHS ${NETGEN_LIBDIR}) - IF (NGLIBD AND NGLIB) - SET(NG_LIB optimized ${NGLIB} - debug ${NGLIBD}) - SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NG_LIB}) - UNSET(NGLIB CACHE) - UNSET(NGLIBD CACHE) - ELSEIF (NGLIB) - SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB}) - UNSET(NGLIB CACHE) - ENDIF () - ENDFOREACH () - - IF (NOT NETGENDATA) - SET(NETGENDATA netgen) - ENDIF (NOT NETGENDATA) - - ELSEIF (DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX) - IF (NETGEN_ROOT) - SET(NETGEN_INCLUDEDIR ${NETGEN_ROOT}/include) - SET(NETGEN_LIBDIR ${NETGEN_ROOT}/lib) - # allow to customize if NETGEN_ROOT is used - IF (NOT NETGENDATA) - SET(NETGENDATA ${NETGEN_ROOT}/libsrc) - ENDIF () - ENDIF () - - FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR} /usr/include /usr/include/netgen-mesher) - FIND_LIBRARY(NGLIB_LIBNGLIB nglib PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib) - SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB}) - FIND_LIBRARY(NGLIB_LIBMESH NAMES mesh ngmesh PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib) - IF (NGLIB_LIBMESH) - SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBMESH}) - ENDIF () - FIND_LIBRARY(NGLIB_LIBOCC NAMES occ ngocc PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib) - IF (NGLIB_LIBOCC) - SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBOCC}) - ENDIF () - FIND_LIBRARY(NGLIB_LIBINTERFACE NAMES interface nginterface PATHS ${NETGEN_LIBDIR} /usr/lib /usr/lib64 /usr/local/lib) - IF (NGLIB_LIBINTERFACE) - SET(NGLIB_LIBRARIES ${NGLIB_LIBRARIES} ${NGLIB_LIBINTERFACE}) - ENDIF () - - IF (NOT NETGENDATA) - SET(NETGENDATA /usr/share/netgen/libsrc) - ENDIF () - ENDIF () - - FIND_PATH(NETGEN_DIR_include NAMES mydefs.hpp NO_DEFAULT_PATH PATHS ${NGLIB_INCLUDE_DIR}/include ${NETGENDATA}/include ${NETGEN_INCLUDEDIR} ${NGLIB_INCLUDE_DIR}) - - IF (NOT NGLIB_INCLUDE_DIR AND NOT NETGEN_DIR_include) - MESSAGE(STATUS "Cannot find NETGEN header files.") - ELSEIF (NOT NETGEN_VERSION) - file(STRINGS ${NETGEN_DIR_include}/mydefs.hpp NETGEN_VERSION REGEX "#define PACKAGE_VERSION.*") - ENDIF () - - IF (NOT NGLIB_LIBRARIES) - MESSAGE(STATUS "Cannot find NETGEN library.") - ENDIF () - - IF (NGLIB_INCLUDE_DIR AND NGLIB_LIBRARIES) - SET(Netgen_FOUND TRUE) - SET(NETGEN_INCLUDE_DIRS ${NETGEN_DIR_include} ${NGLIB_INCLUDE_DIR}) - LIST(REMOVE_DUPLICATES NETGEN_INCLUDE_DIRS) - ELSE () - SET(Netgen_FOUND FALSE) - ENDIF () -ENDIF () - -# Package-provided cMake file is not enough -IF (Netgen_FOUND) - IF (NOT NETGEN_VERSION_MAJOR) - IF (NETGEN_VERSION) - string(REGEX MATCHALL "[0-9]+" NETGEN_VERSION_expr ${NETGEN_VERSION}) - list(LENGTH NETGEN_VERSION_expr NETGEN_VERSION_COUNT) - list(GET NETGEN_VERSION_expr 0 NETGEN_VERSION_MAJOR) - IF (NETGEN_VERSION_COUNT GREATER 1) - list(GET NETGEN_VERSION_expr 1 NETGEN_VERSION_MINOR) - ELSE () - set(NETGEN_VERSION_MINOR 0) - ENDIF () - ELSE () # workaround for netgen 6.2 and newer. currently there is no easy way to detect the version - # better use "find_package(netgen CONFIG REQUIRED)" - set(NETGEN_VERSION_MAJOR 6) - set(NETGEN_VERSION_MINOR 2) - ENDIF () - set(NETGEN_VERSION_PATCH 0) - ENDIF () - - MATH(EXPR NETGEN_VERSION_C "(${NETGEN_VERSION_MAJOR} << 16) + (${NETGEN_VERSION_MINOR} << 8) + (${NETGEN_VERSION_PATCH})") - MATH(EXPR NETGEN_VERSION_62 "(6 << 16) + (2 << 8)") - MATH(EXPR NETGEN_VERSION_62_2004 "(6 << 16) + (2 << 8) + (2004)") - IF (NOT NETGEN_VERSION_C LESS NETGEN_VERSION_62) # Version >= 6.2 - IF (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - # Clang sometimes fails to include - include(CMakePushCheckState) - cmake_push_check_state(RESET) - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${NETGEN_CXX_FLAGS}") - check_cxx_source_compiles("#include \nint main(){}" CSTDIO_INCLUDE_TRY1) - IF (NOT CSTDIO_INCLUDE_TRY1) - # Ugly hack to make building gets function - set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -U__cplusplus -D__cplusplus=201103L") - check_cxx_source_compiles("#include \nint main(){}" CSTDIO_INCLUDE_TRY2) - IF (NOT CSTDIO_INCLUDE_TRY2) - message(FATAL_ERROR "Cannot #include .") - ELSE () - set(NETGEN_CXX_FLAGS "${NETGEN_CXX_FLAGS} -U__cplusplus -D__cplusplus=201103L") - ENDIF () - ENDIF () - cmake_pop_check_state() - ENDIF () - ENDIF () - MESSAGE(STATUS "Found NETGEN version ${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}, calculated: ${NETGEN_VERSION_C}") - LIST(APPEND NETGEN_DEFINITIONS -DNETGEN_VERSION=${NETGEN_VERSION_C}) -ENDIF () diff --git a/cmake/FindOCC.cmake b/cmake/FindOCC.cmake deleted file mode 100644 index b8ff81c7..00000000 --- a/cmake/FindOCC.cmake +++ /dev/null @@ -1,170 +0,0 @@ -# Try to find OCE / OCC -# Once done this will define -# -# OCC_FOUND - system has OCC - OpenCASCADE -# OCC_INCLUDE_DIR - where the OCC include directory can be found -# OCC_LIBRARY_DIR - where the OCC library directory can be found -# OCC_LIBRARIES - Link this to use OCC -# OCC_OCAF_LIBRARIES - Link this to use OCC OCAF framework - -# First try to find OpenCASCADE Community Edition -if(NOT DEFINED OCE_DIR) - # Check for OSX needs to come first because UNIX evaluates to true on OSX - if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - if(DEFINED MACPORTS_PREFIX) - find_package(OCE QUIET HINTS ${MACPORTS_PREFIX}/Library/Frameworks) - elseif(DEFINED HOMEBREW_PREFIX) - find_package(OCE QUIET HINTS ${HOMEBREW_PREFIX}/Cellar/oce/*) - endif() - elseif(UNIX) - set(OCE_DIR "/usr/local/share/cmake/") - elseif(WIN32) - set(OCE_DIR "c:/OCE-0.4.0/share/cmake") - endif() -endif() - -if(${ISIMPA_USE_OCC_VARIANT} MATCHES "Community Edition") - find_package(OCE QUIET) -endif() - -if(OCE_FOUND) - message(STATUS "-- OpenCASCADE Community Edition has been found.") - # Disable this define. For more details see bug #0001872 - #add_definitions (-DHAVE_CONFIG_H) - set(OCC_INCLUDE_DIR ${OCE_INCLUDE_DIRS}) - #set(OCC_LIBRARY_DIR ${OCE_LIBRARY_DIR}) -else(OCE_FOUND) #look for OpenCASCADE - # we first try to find opencascade directly: - if(NOT OCCT_CMAKE_FALLBACK) - find_package(OpenCASCADE CONFIG QUIET) - if(NOT (CMAKE_VERSION VERSION_LESS 3.6.0)) - get_property(flags DIRECTORY PROPERTY COMPILE_DEFINITIONS) - # OCCT 7.5 adds this define that causes hundreds of compiler warnings with Qt5.x, so remove it again - list(FILTER flags EXCLUDE REGEX [[GL_GLEXT_LEGACY]]) - set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${flags}) - endif() - endif(NOT OCCT_CMAKE_FALLBACK) - if(OpenCASCADE_FOUND) - set(OCC_FOUND ${OpenCASCADE_FOUND}) - set(OCC_INCLUDE_DIR ${OpenCASCADE_INCLUDE_DIR}) - set(OCC_LIBRARY_DIR ${OpenCASCADE_LIBRARY_DIR}) - set(OCC_LIBRARIES ${OpenCASCADE_LIBRARIES}) - set(OCC_OCAF_LIBRARIES TKCAF TKXCAF) - else(OpenCASCADE_FOUND) - if(WIN32) - if(CYGWIN OR MINGW) - FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx - /usr/include/opencascade - /usr/local/include/opencascade - /opt/opencascade/include - /opt/opencascade/inc - ) - FIND_LIBRARY(OCC_LIBRARY TKernel - /usr/lib - /usr/local/lib - /opt/opencascade/lib - ) - else(CYGWIN OR MINGW) - FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include" - ) - FIND_LIBRARY(OCC_LIBRARY TKernel - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib" - ) - endif(CYGWIN OR MINGW) - else(WIN32) - FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx - /usr/include/occt - /usr/include/opencascade - /usr/local/include/opencascade - /opt/opencascade/include - /opt/opencascade/inc - ) - FIND_LIBRARY(OCC_LIBRARY TKernel - /usr/lib - /usr/local/lib - /opt/opencascade/lib - ) - endif(WIN32) - if(OCC_LIBRARY) - GET_FILENAME_COMPONENT(OCC_LIBRARY_DIR ${OCC_LIBRARY} PATH) - IF(NOT OCC_INCLUDE_DIR) - FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx - ${OCC_LIBRARY_DIR}/../inc - ) - ENDIF() - endif(OCC_LIBRARY) - endif(OpenCASCADE_FOUND) -endif(OCE_FOUND) - -if(OCC_INCLUDE_DIR) - file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAJOR - REGEX "#define OCC_VERSION_MAJOR.*" - ) - string(REGEX MATCH "[0-9]+" OCC_MAJOR ${OCC_MAJOR}) - file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MINOR - REGEX "#define OCC_VERSION_MINOR.*" - ) - string(REGEX MATCH "[0-9]+" OCC_MINOR ${OCC_MINOR}) - file(STRINGS ${OCC_INCLUDE_DIR}/Standard_Version.hxx OCC_MAINT - REGEX "#define OCC_VERSION_MAINTENANCE.*" - ) - string(REGEX MATCH "[0-9]+" OCC_MAINT ${OCC_MAINT}) - - set(OCC_VERSION_STRING "${OCC_MAJOR}.${OCC_MINOR}.${OCC_MAINT}") -endif(OCC_INCLUDE_DIR) - -# handle the QUIETLY and REQUIRED arguments and set OCC_FOUND to TRUE if -# all listed variables are TRUE -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING) - -if(OCC_FOUND) - set(OCC_LIBRARIES - TKFillet - TKMesh - TKernel - TKG2d - TKG3d - TKMath - TKShHealing - TKXSBase - TKBool - TKBO - TKBRep - TKTopAlgo - TKGeomAlgo - TKGeomBase - TKOffset - TKPrim - TKHLR - TKFeat - ) - set(OCC_OCAF_LIBRARIES - TKBin - TKBinL - TKCAF - TKXCAF - TKLCAF - TKVCAF - TKCDF - TKMeshVS - TKService - TKV3d - ) - - if(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0) - list(APPEND OCC_OCAF_LIBRARIES TKRWMesh) - endif(NOT OCC_VERSION_STRING VERSION_LESS 7.5.0) - if(OCC_VERSION_STRING VERSION_LESS 7.8.0) - list(APPEND OCC_LIBRARIES TKIGES TKSTL TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP) - list(APPEND OCC_OCAF_LIBRARIES TKXDESTEP TKXDEIGES) - else(OCC_VERSION_STRING VERSION_LESS 7.8.0) - list(APPEND OCC_LIBRARIES TKDESTEP TKDEIGES TKDEGLTF TKDESTL) - endif(OCC_VERSION_STRING VERSION_LESS 7.8.0) - message(STATUS "-- Found OCE/OpenCASCADE version: ${OCC_VERSION_STRING}") - message(STATUS "-- OCE/OpenCASCADE include directory: ${OCC_INCLUDE_DIR}") - message(STATUS "-- OCE/OpenCASCADE shared libraries directory: ${OCC_LIBRARY_DIR}") -else(OCC_FOUND) - #message(SEND_ERROR "Neither OpenCASCADE Community Edition nor OpenCasCade were found: will not build CAD modules!") -endif(OCC_FOUND) diff --git a/cmake/FindOpenCV.cmake b/cmake/FindOpenCV.cmake deleted file mode 100644 index e5f2d37d..00000000 --- a/cmake/FindOpenCV.cmake +++ /dev/null @@ -1,249 +0,0 @@ -# - Try to find OpenCV library installation -# See http://sourceforge.net/projects/opencvlibrary/ -# -# The following variables are optionally searched for defaults -# OpenCV_ROOT_DIR: Base directory of OpenCv tree to use. -# OpenCV_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..) -# compatible interface. typically CV CXCORE CVAUX HIGHGUI CVCAM .. etc. -# -# The following are set after configuration is done: -# OpenCV_FOUND -# OpenCV_INCLUDE_DIR -# OpenCV_LIBRARIES -# OpenCV_LINK_DIRECTORIES -# -# deprecated: -# OPENCV_* uppercase replaced by case sensitive OpenCV_* -# OPENCV_EXE_LINKER_FLAGS -# OPENCV_INCLUDE_DIR : replaced by plural *_DIRS -# -# 2004/05 Jan Woetzel, Friso, Daniel Grest -# 2006/01 complete rewrite by Jan Woetzel -# 1006/09 2nd rewrite introducing ROOT_DIR and PATH_SUFFIXES -# to handle multiple installed versions gracefully by Jan Woetzel -# -# tested with: -# -OpenCV 0.97 (beta5a): MSVS 7.1, gcc 3.3, gcc 4.1 -# -OpenCV 0.99 (1.0rc1): MSVS 7.1 -# -# www.mip.informatik.uni-kiel.de/~jw -# -------------------------------- - - -MACRO(DBG_MSG _MSG) - # MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}):\n${_MSG}") -ENDMACRO(DBG_MSG) - - - -# required cv components with header and library if COMPONENTS unspecified -IF (NOT OpenCV_FIND_COMPONENTS) - # default - SET(OpenCV_FIND_REQUIRED_COMPONENTS CV CXCORE CVAUX HIGHGUI ) - IF (WIN32) - LIST(APPEND OpenCV_FIND_REQUIRED_COMPONENTS CVCAM ) # WIN32 only actually - ENDIF(WIN32) -ENDIF (NOT OpenCV_FIND_COMPONENTS) - - -# typical root dirs of installations, exactly one of them is used -SET (OpenCV_POSSIBLE_ROOT_DIRS - "${OpenCV_ROOT_DIR}" - "$ENV{OpenCV_ROOT_DIR}" - "$ENV{OPENCV_DIR}" # only for backward compatibility deprecated by ROOT_DIR - "$ENV{OPENCV_HOME}" # only for backward compatibility - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Intel(R) Open Source Computer Vision Library_is1;Inno Setup: App Path]" - "$ENV{ProgramFiles}/OpenCV" - /usr/local - /usr - ) - - -# MIP Uni Kiel /opt/net network installation -# get correct prefix for current gcc compiler version for gcc 3.x 4.x -IF (${CMAKE_COMPILER_IS_GNUCXX}) - IF (NOT OpenCV_FIND_QUIETLY) - MESSAGE(STATUS "Checking GNUCXX version 3/4 to determine OpenCV /opt/net/ path") - ENDIF (NOT OpenCV_FIND_QUIETLY) - EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE CXX_COMPILER_VERSION) - IF (CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*") - SET(IS_GNUCXX3 TRUE) - LIST(APPEND OpenCV_POSSIBLE_ROOT_DIRS /opt/net/gcc33/OpenCV ) - ENDIF(CXX_COMPILER_VERSION MATCHES ".*3\\.[0-9].*") - IF (CXX_COMPILER_VERSION MATCHES ".*4\\.[0-9].*") - SET(IS_GNUCXX4 TRUE) - LIST(APPEND OpenCV_POSSIBLE_ROOT_DIRS /opt/net/gcc41/OpenCV ) - ENDIF(CXX_COMPILER_VERSION MATCHES ".*4\\.[0-9].*") -ENDIF (${CMAKE_COMPILER_IS_GNUCXX}) - -#DBG_MSG("DBG (OpenCV_POSSIBLE_ROOT_DIRS=${OpenCV_POSSIBLE_ROOT_DIRS}") - -# -# select exactly ONE OpenCV base directory/tree -# to avoid mixing different version headers and libs -# -FIND_PATH(OpenCV_ROOT_DIR - NAMES - cv/include/cv.h # windows - include/opencv/cv.h # linux /opt/net - include/cv/cv.h - include/cv.h - PATHS ${OpenCV_POSSIBLE_ROOT_DIRS}) -DBG_MSG("OpenCV_ROOT_DIR=${OpenCV_ROOT_DIR}") - - -# header include dir suffixes appended to OpenCV_ROOT_DIR -SET(OpenCV_INCDIR_SUFFIXES - include - include/cv - include/opencv - cv/include - cxcore/include - cvaux/include - otherlibs/cvcam/include - otherlibs/highgui - otherlibs/highgui/include - otherlibs/_graphics/include - ) - -# library linkdir suffixes appended to OpenCV_ROOT_DIR -SET(OpenCV_LIBDIR_SUFFIXES - lib - OpenCV/lib - otherlibs/_graphics/lib - ) -#DBG_MSG("OpenCV_LIBDIR_SUFFIXES=${OpenCV_LIBDIR_SUFFIXES}") - - -# -# find incdir for each lib -# -FIND_PATH(OpenCV_CV_INCLUDE_DIR - NAMES cv.h - PATHS ${OpenCV_ROOT_DIR} - PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} ) -FIND_PATH(OpenCV_CXCORE_INCLUDE_DIR - NAMES cxcore.h - PATHS ${OpenCV_ROOT_DIR} - PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} ) -FIND_PATH(OpenCV_CVAUX_INCLUDE_DIR - NAMES cvaux.h - PATHS ${OpenCV_ROOT_DIR} - PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} ) -FIND_PATH(OpenCV_HIGHGUI_INCLUDE_DIR - NAMES highgui.h - PATHS ${OpenCV_ROOT_DIR} - PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} ) -FIND_PATH(OpenCV_CVCAM_INCLUDE_DIR - NAMES cvcam.h - PATHS ${OpenCV_ROOT_DIR} - PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} ) - -# -# find sbsolute path to all libraries -# some are optionally, some may not exist on Linux -# -FIND_LIBRARY(OpenCV_CV_LIBRARY - NAMES cv opencv - PATHS ${OpenCV_ROOT_DIR} - PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} ) -FIND_LIBRARY(OpenCV_CVAUX_LIBRARY - NAMES cvaux - PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} ) -FIND_LIBRARY(OpenCV_CVCAM_LIBRARY - NAMES cvcam - PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} ) -FIND_LIBRARY(OpenCV_CVHAARTRAINING_LIBRARY - NAMES cvhaartraining - PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} ) -FIND_LIBRARY(OpenCV_CXCORE_LIBRARY - NAMES cxcore - PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} ) -FIND_LIBRARY(OpenCV_CXTS_LIBRARY - NAMES cxts - PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} ) -FIND_LIBRARY(OpenCV_HIGHGUI_LIBRARY - NAMES highgui - PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} ) -FIND_LIBRARY(OpenCV_ML_LIBRARY - NAMES ml - PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} ) -FIND_LIBRARY(OpenCV_TRS_LIBRARY - NAMES trs - PATHS ${OpenCV_ROOT_DIR} PATH_SUFFIXES ${OpenCV_LIBDIR_SUFFIXES} ) - - - -# -# Logic selecting required libs and headers -# -SET(OpenCV_FOUND ON) -DBG_MSG("OpenCV_FIND_REQUIRED_COMPONENTS=${OpenCV_FIND_REQUIRED_COMPONENTS}") -FOREACH(NAME ${OpenCV_FIND_REQUIRED_COMPONENTS} ) - - # only good if header and library both found - IF (OpenCV_${NAME}_INCLUDE_DIR AND OpenCV_${NAME}_LIBRARY) - LIST(APPEND OpenCV_INCLUDE_DIRS ${OpenCV_${NAME}_INCLUDE_DIR} ) - LIST(APPEND OpenCV_LIBRARIES ${OpenCV_${NAME}_LIBRARY} ) - #DBG_MSG("appending for NAME=${NAME} ${OpenCV_${NAME}_INCLUDE_DIR} and ${OpenCV_${NAME}_LIBRARY}" ) - ELSE (OpenCV_${NAME}_INCLUDE_DIR AND OpenCV_${NAME}_LIBRARY) - DBG_MSG("OpenCV component NAME=${NAME} not found! " - "\nOpenCV_${NAME}_INCLUDE_DIR=${OpenCV_${NAME}_INCLUDE_DIR} " - "\nOpenCV_${NAME}_LIBRARY=${OpenCV_${NAME}_LIBRARY} ") - SET(OpenCV_FOUND OFF) - ENDIF (OpenCV_${NAME}_INCLUDE_DIR AND OpenCV_${NAME}_LIBRARY) - -ENDFOREACH(NAME) - -DBG_MSG("OpenCV_INCLUDE_DIRS=${OpenCV_INCLUDE_DIRS}") -DBG_MSG("OpenCV_LIBRARIES=${OpenCV_LIBRARIES}") - -# get the link directory for rpath to be used with LINK_DIRECTORIES: -IF (OpenCV_CV_LIBRARY) - GET_FILENAME_COMPONENT(OpenCV_LINK_DIRECTORIES ${OpenCV_CV_LIBRARY} PATH) -ENDIF (OpenCV_CV_LIBRARY) - -MARK_AS_ADVANCED( - OpenCV_ROOT_DIR - OpenCV_INCLUDE_DIRS - OpenCV_CV_INCLUDE_DIR - OpenCV_CXCORE_INCLUDE_DIR - OpenCV_CVAUX_INCLUDE_DIR - OpenCV_CVCAM_INCLUDE_DIR - OpenCV_HIGHGUI_INCLUDE_DIR - OpenCV_LIBRARIES - OpenCV_CV_LIBRARY - OpenCV_CXCORE_LIBRARY - OpenCV_CVAUX_LIBRARY - OpenCV_CVCAM_LIBRARY - OpenCV_CVHAARTRAINING_LIBRARY - OpenCV_CXTS_LIBRARY - OpenCV_HIGHGUI_LIBRARY - OpenCV_ML_LIBRARY - OpenCV_TRS_LIBRARY - ) - - -# be backward compatible: -SET(OPENCV_LIBRARIES ${OpenCV_LIBRARIES} ) -SET(OPENCV_INCLUDE_DIR ${OpenCV_INCLUDE_DIRS} ) -SET(OPENCV_FOUND ${OpenCV_FOUND}) - - - -# display help message -IF(NOT OpenCV_FOUND) - # make FIND_PACKAGE friendly - IF(NOT OpenCV_FIND_QUIETLY) - IF(OpenCV_FIND_REQUIRED) - MESSAGE(FATAL_ERROR - "OpenCV required but some headers or libs not found. Please specify it's location with OpenCV_ROOT_DIR env. variable.") - ELSE(OpenCV_FIND_REQUIRED) - MESSAGE(STATUS - "ERROR: OpenCV was not found.") - ENDIF(OpenCV_FIND_REQUIRED) - ENDIF(NOT OpenCV_FIND_QUIETLY) -ENDIF(NOT OpenCV_FOUND) - - - diff --git a/cmake/FindPyCXX.cmake b/cmake/FindPyCXX.cmake deleted file mode 100644 index e37b08ee..00000000 --- a/cmake/FindPyCXX.cmake +++ /dev/null @@ -1,128 +0,0 @@ -# Locate PyCXX headers and source files - -# This module defines -# PYCXX_INCLUDE_DIR -# PYCXX_SOURCE_DIR -# PYCXX_FOUND -# PYCXX_SOURCES -# PYCXX_VERSION -# -# The PYCXX_*_DIR variables can be set to tell this module where -# the files are. - - -# There's no standard location for PyCXX. -# -# The authors' example is to put it in "~\" [sic]. -# -# Ubuntu puts the includes into /usr/include/python2.7/CXX and sources into -# /usr/share/python2.7/CXX. -# -# The Zultron Fedora RPM does the same as Ubuntu. - -set(PYCXX_FOUND "YES") - -# find the header directory -if(PYCXX_INCLUDE_DIR) - # headers better be in there - if(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx") - if(PyCXX_FIND_REQUIRED) - MESSAGE(FATAL_ERROR - "PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR " - "${PYCXX_INCLUDE_DIR}") - else(PyCXX_FIND_REQUIRED) - MESSAGE(WARNING - "PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR " - "${PYCXX_INCLUDE_DIR}") - unset(PYCXX_FOUND) - endif(PyCXX_FIND_REQUIRED) - endif(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx") -else(PYCXX_INCLUDE_DIR) - # check in 'standard' places - find_path(PYCXX_INCLUDE_DIR CXX/Config.hxx - ${PYTHON_INCLUDE_DIR} - "${CMAKE_CURRENT_LIST_DIR}/..") - if(NOT PYCXX_INCLUDE_DIR) - if(PyCXX_FIND_REQUIRED) - MESSAGE(FATAL_ERROR - "PyCXX not found; please set PYCXX_INCLUDE_DIR to " - "the location of CXX/Config.hxx") - else(PyCXX_FIND_REQUIRED) - MESSAGE(STATUS "PyCXX not found") - unset(PYCXX_FOUND) - endif(PyCXX_FIND_REQUIRED) - endif(NOT PYCXX_INCLUDE_DIR) -endif(PYCXX_INCLUDE_DIR) - -# find the sources directory -if(PYCXX_SOURCE_DIR) - # source directory specified, they'd better be there - if(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c") - if(PyCXX_FIND_REQUIRED) - MESSAGE(FATAL_ERROR - "PyCXX: cxxextensions.c not found in PYCXX_SOURCE_DIR " - "${PYCXX_SOURCE_DIR}") - else(PyCXX_FIND_REQUIRED) - MESSAGE(WARNING - "PyCXX: cxxextensions.c not found in PYCXX_SOURCE_DIR " - "${PYCXX_SOURCE_DIR}") - unset(PYCXX_FOUND) - endif(PyCXX_FIND_REQUIRED) - endif(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c") -else(PYCXX_SOURCE_DIR) - # check in 'standard' places - find_path(PYCXX_SOURCE_DIR cxxextensions.c - "${PYCXX_INCLUDE_DIR}/CXX" - "${PYCXX_INCLUDE_DIR}/Src" - "${PYTHON_INCLUDE_DIR}/CXX" - "${PYTHON_INCLUDE_DIR}/Src" - "${CMAKE_CURRENT_LIST_DIR}/../Src" - "${CMAKE_CURRENT_LIST_DIR}/../CXX") - if(NOT PYCXX_SOURCE_DIR) - if(PyCXX_FIND_REQUIRED) - MESSAGE(FATAL_ERROR - "PyCXX not found; please set PYCXX_SOURCE_DIR to " - "the location of cxxextensions.c") - else(PyCXX_FIND_REQUIRED) - MESSAGE(STATUS "PyCXX not found") - unset(PYCXX_FOUND) - endif(PyCXX_FIND_REQUIRED) - endif(NOT PYCXX_SOURCE_DIR) -endif(PYCXX_SOURCE_DIR) - -# Find PyCXX Version -if(PYCXX_INCLUDE_DIR AND PYCXX_SOURCE_DIR) - file(READ ${PYCXX_INCLUDE_DIR}/CXX/Version.hxx PYCXX_VERSION_H) - foreach(item IN ITEMS MAJOR MINOR PATCH) - string(REGEX REPLACE - ".*#define[ \t]+PYCXX_VERSION_${item}[ \t]+([0-9]+).*" - "\\1" PYCXX_VERSION_${item} - "${PYCXX_VERSION_H}" - ) - endforeach() - set(PYCXX_VERSION ${PYCXX_VERSION_MAJOR}.${PYCXX_VERSION_MINOR}.${PYCXX_VERSION_PATCH}) -endif() - -# see what we've got -if(PYCXX_FOUND) - MESSAGE(STATUS "PyCXX found:") - MESSAGE(STATUS " Headers: ${PYCXX_INCLUDE_DIR}") - MESSAGE(STATUS " Sources: ${PYCXX_SOURCE_DIR}") - MESSAGE(STATUS " Version: ${PYCXX_VERSION}") - - # Build the list of sources for convenience - set(PYCXX_SOURCES - ${PYCXX_SOURCE_DIR}/cxxextensions.c - ${PYCXX_SOURCE_DIR}/cxx_extensions.cxx - ${PYCXX_SOURCE_DIR}/cxxsupport.cxx - ${PYCXX_SOURCE_DIR}/IndirectPythonInterface.cxx - ) - - #set old 6.2 pycxx compatibility - list(APPEND PYCXX_SOURCES ${PYCXX_SOURCE_DIR}/cxx_exceptions.cxx) - add_definitions(-DPYCXX_6_2_COMPATIBILITY) - #end old compatibility -else(PYCXX_FOUND) - MESSAGE(STATUS "PyCXX not found") -endif(PYCXX_FOUND) - diff --git a/cmake/FindPySide2Tools.cmake b/cmake/FindPySide2Tools.cmake deleted file mode 100644 index b4ce0fa4..00000000 --- a/cmake/FindPySide2Tools.cmake +++ /dev/null @@ -1,52 +0,0 @@ -# Try to find PySide2 utilities, PYSIDE2UIC and PYSIDE2RCC: -# PYSIDE_UIC_EXECUTABLE - Location of PYSIDE2UIC executable -# PYSIDE_RCC_EXECUTABLE - Location of PYSIDE2RCC executable -# PYSIDE_TOOLS_FOUND - PySide2 utilities found. - -if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - #pyside2 tools are often in same location as python interpreter - get_filename_component(PYTHON_BIN_DIR ${PYTHON_EXECUTABLE} PATH) - set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR}) -endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - -# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option -# We test Qt5Core version to act accordingly - -FIND_PACKAGE(Qt5 COMPONENTS Core Widgets) - -IF(Qt5Core_VERSION VERSION_LESS 5.14) - # Legacy (< 5.14) - FIND_PROGRAM(PYSIDE2_UIC_EXECUTABLE NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyuic5 HINTS ${PYSIDE_BIN_DIR}) - FIND_PROGRAM(PYSIDE2_RCC_EXECUTABLE NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} pyrcc5 HINTS ${PYSIDE_BIN_DIR}) - set(UICOPTIONS "") - set(RCCOPTIONS "") -ELSE() - # New (>= 5.14) - if (TARGET Qt::uic) - get_property(PYSIDE2_UIC_EXECUTABLE TARGET Qt::uic PROPERTY LOCATION) - set(UICOPTIONS "--generator=python") - endif() - if (TARGET Qt::rcc) - get_property(PYSIDE2_RCC_EXECUTABLE TARGET Qt::rcc PROPERTY LOCATION) - set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1") - endif() -ENDIF() - -set(PYSIDE_RCC_EXECUTABLE ${PYSIDE2_RCC_EXECUTABLE}) -set(PYSIDE_UIC_EXECUTABLE ${PYSIDE2_UIC_EXECUTABLE}) -set(PySideTools_VERSION 2) - -if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE) - set(PYSIDE_TOOLS_FOUND TRUE) - if (NOT PySide2Tools_FIND_QUIETLY) - message(STATUS "Found PySide2 tools: ${PYSIDE_UIC_EXECUTABLE}, ${PYSIDE_RCC_EXECUTABLE}") - endif (NOT PySide2Tools_FIND_QUIETLY) -else() - if(PySide2Tools_FIND_REQUIRED) - message(FATAL_ERROR "PySide2 tools could not be found, but are required.") - else(PySide2Tools_FIND_REQUIRED) - if (NOT PySide2Tools_FIND_QUIETLY) - message(STATUS "PySide2 tools: not found.") - endif (NOT PySide2Tools_FIND_QUIETLY) - endif(PySide2Tools_FIND_REQUIRED) -endif() diff --git a/cmake/FindPySide6.cmake b/cmake/FindPySide6.cmake deleted file mode 100644 index 2b0a5806..00000000 --- a/cmake/FindPySide6.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# The Qt for Python project officially recommends using pip to install PySide, so we expect to find PySide in the -# site-packages directory. The library will be called "PySide6.abi3.*", and there will be an "include" directory inside -# the site-packages/PySide6. Over time some distros may provide custom versions, so we also support using a more normal -# cMake find_package() call - -find_package(PySide6 CONFIG QUIET) -if(NOT PySide6_FOUND) - if(NOT PySide6_INCLUDE_DIR AND TARGET PySide6::pyside6) - get_property(PySide6_INCLUDE_DIR TARGET PySide6::pyside6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES) - endif() - - if(NOT PySide6_INCLUDE_DIR) - find_pip_package(PySide6) - if (PySide6_FOUND) - set(PYSIDE_INCLUDE_DIR ${PySide6_INCLUDE_DIRS} CACHE INTERNAL "") - set(PYSIDE_LIBRARY ${PySide6_LIBRARIES} CACHE INTERNAL "") - set(PYSIDE_FOUND TRUE CACHE BOOL OFF) - set(PYSIDE_MAJOR_VERSION 6 CACHE INTERNAL 6) - endif() - endif() - -endif() diff --git a/cmake/FindPySide6Tools.cmake b/cmake/FindPySide6Tools.cmake deleted file mode 100644 index 2c4b8c02..00000000 --- a/cmake/FindPySide6Tools.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# Try to find PYSIDE6 utilities, PYSIDE6UIC and PYSIDE6RCC: -# PYSIDE_UIC_EXECUTABLE - Location of PYSIDE6UIC executable -# PYSIDE_RCC_EXECUTABLE - Location of PYSIDE6RCC executable -# PYSIDE_TOOLS_FOUND - PYSIDE6 utilities found. - -if (TARGET Qt6::uic) - get_target_property(PYSIDE6_UIC_EXECUTABLE Qt6::uic LOCATION) - set(UICOPTIONS "--generator=python") -endif() -if (TARGET Qt6::rcc) - get_target_property(PYSIDE6_RCC_EXECUTABLE Qt6::rcc LOCATION) - set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1") -endif() - -set(PYSIDE_RCC_EXECUTABLE ${PYSIDE6_RCC_EXECUTABLE}) -set(PYSIDE_UIC_EXECUTABLE ${PYSIDE6_UIC_EXECUTABLE}) -set(PySideTools_VERSION 6) - -if(PYSIDE_RCC_EXECUTABLE AND PYSIDE_UIC_EXECUTABLE) - set(PYSIDE_TOOLS_FOUND TRUE) - if (NOT PYSIDE6Tools_FIND_QUIETLY) - message(STATUS "Found PYSIDE6 tools: ${PYSIDE_UIC_EXECUTABLE}, ${PYSIDE_RCC_EXECUTABLE}") - endif () -else() - if(PYSIDE6Tools_FIND_REQUIRED) - message(FATAL_ERROR "PYSIDE6 tools could not be found, but are required.") - else() - if (NOT PYSIDE6Tools_FIND_QUIETLY) - message(STATUS "PYSIDE6 tools: not found.") - endif () - endif() -endif() diff --git a/cmake/FindRift.cmake b/cmake/FindRift.cmake deleted file mode 100644 index 8082e8da..00000000 --- a/cmake/FindRift.cmake +++ /dev/null @@ -1,100 +0,0 @@ -# Find OCULUS -# -# This module defines -# OCULUS_FOUND -# OCULUS_INCLUDE_DIRS -# OCULUS_LIBRARIES -# -# Copyright (c) 2012 I-maginer -# -# This program 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 of the License, or (at your option) any later -# version. -# -# This program 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 program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place - Suite 330, Boston, MA 02111-1307, USA, or go to -# http://www.gnu.org/copyleft/lesser.txt -# - -# On a new cmake run, we do not need to be verbose -IF(OCULUS_INCLUDE_DIR AND OCULUS_LIBRARY) - SET(OCULUS_FIND_QUIETLY FALSE) -ENDIF() - -# If OCULUS_ROOT was defined in the environment, use it. -if (NOT OCULUS_ROOT) - if(NOT "$ENV{OCULUS_ROOT}" STREQUAL "") - set(OCULUS_ROOT $ENV{OCULUS_ROOT}) - else() - set(OCULUS_ROOT $ENV{SCOL_DEPENDENCIES_PATH}/oculus/LibOVR) - endif() -endif() - -# concat all the search paths -IF(OCULUS_ROOT) - SET(OCULUS_INCLUDE_SEARCH_DIRS - ${OCULUS_INCLUDE_SEARCH_DIRS} - ${OCULUS_ROOT}/include - ) - SET(OCULUS_LIBRARY_SEARCH_RELEASE_DIRS - ${OCULUS_LIBRARY_SEARCH_DIRS} - ${OCULUS_ROOT}/Lib/x64/VS2012 - ) - SET(OCULUS_LIBRARY_SEARCH_DEBUG_DIRS - ${OCULUS_LIBRARY_SEARCH_DIRS} - ${OCULUS_ROOT}/Lib/x64/VS2012 - ) -ENDIF() - -# log message -IF (NOT OCULUS_FIND_QUIETLY) - MESSAGE(STATUS "Checking for OCULUS library") -ENDIF() - -# Search for header files -FIND_PATH(OCULUS_INCLUDE_DIR OVR.h - PATHS ${OCULUS_INCLUDE_SEARCH_DIRS}) - -# Search for libraries files (release mode) -FIND_LIBRARY(OCULUS_LIBRARY_RELEASE libovr64 - PATHS ${OCULUS_LIBRARY_SEARCH_RELEASE_DIRS}) - -# Search for libraries files (debug mode) -FIND_LIBRARY(OCULUS_LIBRARY_DEBUG libovr64d - PATHS ${OCULUS_LIBRARY_SEARCH_DEBUG_DIRS}) - -# Configure libraries for debug/release -SET(OCULUS_INCLUDE_DIRS ${OCULUS_INCLUDE_DIR} CACHE PATH "Directory containing OCULUS header files") -SET(OCULUS_LIBRARY debug ${OCULUS_LIBRARY_DEBUG} optimized ${OCULUS_LIBRARY_RELEASE}) -SET(OCULUS_LIBRARIES ${OCULUS_LIBRARY} CACHE STRING "OCULUS libraries files") - -#IF(OCULUS_INCLUDE_DIR AND OCULUS_LIBRARY) - SET(OCULUS_FOUND TRUE) -#ENDIF() - -# Hide those variables in GUI -SET(OCULUS_INCLUDE_DIR ${OCULUS_INCLUDE_DIR} CACHE INTERNAL "") -SET(OCULUS_LIBRARY_RELEASE ${OCULUS_LIBRARY_RELEASE} CACHE INTERNAL "") -SET(OCULUS_LIBRARY_DEBUG ${OCULUS_LIBRARY_DEBUG} CACHE INTERNAL "") -SET(OCULUS_LIBRARY ${OCULUS_LIBRARY} CACHE INTERNAL "") - -# log find result -IF(OCULUS_FOUND) - IF(NOT OCULUS_FIND_QUIETLY) - MESSAGE(STATUS " libraries: ${OCULUS_LIBRARIES}") - MESSAGE(STATUS " includes: ${OCULUS_INCLUDE_DIRS}") - ENDIF() -ELSE(OCULUS_FOUND) - IF(NOT OCULUS_LIBRARIES) - MESSAGE(STATUS, "OCULUS library or one of it dependencies could not be found.") - ENDIF() - IF(NOT OCULUS_INCLUDE_DIRS) - MESSAGE(STATUS "OCULUS include files could not be found.") - ENDIF() -ENDIF(OCULUS_FOUND) \ No newline at end of file diff --git a/cmake/FindSMESH.cmake b/cmake/FindSMESH.cmake deleted file mode 100644 index fa48982c..00000000 --- a/cmake/FindSMESH.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# Try to find Salome SMESH -# Once done this will define -# -# SMESH_FOUND - system has Salome SMESH -# SMESH_INCLUDE_DIR - where the Salome SMESH include directory can be found -# SMESH_LIBRARIES - Link this to use Salome SMESH -# - -# SMESH needs VTK -find_package(VTK REQUIRED) - -# If this definition is not set, linker errors will occur against SMESH on 64 bit machines. -if(CMAKE_SIZEOF_VOID_P EQUAL 8) - add_definitions(-DSALOME_USE_64BIT_IDS) -endif(CMAKE_SIZEOF_VOID_P EQUAL 8) - -IF (CMAKE_COMPILER_IS_GNUCC) - FIND_PATH(SMESH_INCLUDE_DIR SMESH_Mesh.hxx - # These are default search paths, why specify them? - PATH_SUFFIXES smesh SMESH smesh/SMESH - ) - FIND_LIBRARY(SMESH_LIBRARY SMESH) -ELSE (CMAKE_COMPILER_IS_GNUCC) - # Not yet implemented -ENDIF (CMAKE_COMPILER_IS_GNUCC) - -IF(SMESH_INCLUDE_DIR) - SET(SMESH_INC_ROOT "${SMESH_INCLUDE_DIR}/..") - # Append extra include dirs - SET(SMESH_INCLUDE_DIR - "${SMESH_INCLUDE_DIR}; - ${SMESH_INC_ROOT}/Controls; - ${SMESH_INC_ROOT}/Driver; - ${SMESH_INC_ROOT}/DriverDAT; - ${SMESH_INC_ROOT}/DriverGMF; - ${SMESH_INC_ROOT}/DriverSTL; - ${SMESH_INC_ROOT}/DriverUNV; - ${SMESH_INC_ROOT}/Geom; - ${SMESH_INC_ROOT}/Kernel; - ${SMESH_INC_ROOT}/MEFISTO2; - ${SMESH_INC_ROOT}/MeshVSLink; - ${SMESH_INC_ROOT}/Netgen; - ${SMESH_INC_ROOT}/NETGENPlugin; - ${SMESH_INC_ROOT}/SMDS; - ${SMESH_INC_ROOT}/SMESHDS; - ${SMESH_INC_ROOT}/SMESHUtils; - ${SMESH_INC_ROOT}/StdMeshers;") -ELSE(SMESH_INCLUDE_DIR) - message(FATAL_ERROR "SMESH include directories not found!") -ENDIF(SMESH_INCLUDE_DIR) - -SET(SMESH_FOUND FALSE) -IF(SMESH_LIBRARY) - SET(SMESH_FOUND TRUE) - GET_FILENAME_COMPONENT(SMESH_LIBRARY_DIR ${SMESH_LIBRARY} PATH) - set(SMESH_LIBRARIES - ${SMESH_LIBRARY_DIR}/libDriver.so - ${SMESH_LIBRARY_DIR}/libDriverDAT.so - ${SMESH_LIBRARY_DIR}/libDriverSTL.so - ${SMESH_LIBRARY_DIR}/libDriverUNV.so - ${SMESH_LIBRARY_DIR}/libSMDS.so - ${SMESH_LIBRARY_DIR}/libSMESH.so - ${SMESH_LIBRARY_DIR}/libSMESHDS.so - ${SMESH_LIBRARY_DIR}/libStdMeshers.so - ) - set(EXTERNAL_SMESH_LIBS ${SMESH_LIBRARIES}) -ELSE(SMESH_LIBRARY) - message(FATAL_ERROR "SMESH libraries NOT FOUND!") -ENDIF(SMESH_LIBRARY) - diff --git a/cmake/FindShiboken6.cmake b/cmake/FindShiboken6.cmake deleted file mode 100644 index a9fbaffd..00000000 --- a/cmake/FindShiboken6.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# The Qt for Python project officially recommends using pip to install Shiboken, so we expect to find Shiboken in the -# site-packages directory. ISIMPA also requires shiboken6_generator, so this find script also locates that package -# and ensures the inclusion of its include directory when using the pip finding mechanism - - -find_package(Shiboken6 CONFIG QUIET) -if(NOT Shiboken6_FOUND) - if(NOT Shiboken6_INCLUDE_DIR AND TARGET Shiboken6::Shiboken6) - get_property(Shiboken6_INCLUDE_DIR TARGET Shiboken6::Shiboken6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES) - endif() - if(NOT Shiboken6_INCLUDE_DIR) - find_pip_package(Shiboken6) - if (Shiboken6_FOUND) - set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES} CACHE INTERNAL "") - set(SHIBOKEN_MAJOR_VERSION 6 CACHE INTERNAL 6) - set(SHIBOKEN_FOUND ON CACHE BOOL OFF) - endif() - # The include directory we actually want is part of shiboken6-generator - find_pip_package(shiboken6_generator) - if (shiboken6_generator_FOUND) - set(SHIBOKEN_INCLUDE_DIR ${shiboken6_generator_INCLUDE_DIRS} CACHE PATH "") - endif() - endif() -else() - set(SHIBOKEN_INCLUDE_DIR ${Shiboken6_INCLUDE_DIRS} CACHE PATH "") - set(SHIBOKEN_LIBRARY ${Shiboken6_LIBRARIES} CACHE INTERNAL "") - set(SHIBOKEN_FOUND ON CACHE BOOL OFF) -endif() diff --git a/cmake/FindSpnav.cmake b/cmake/FindSpnav.cmake deleted file mode 100644 index a9d234f2..00000000 --- a/cmake/FindSpnav.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# Find the spnav library and header. -# -# Sets the usual variables expected for find_package scripts: -# -# SPNAV_INCLUDE_DIR - header location -# SPNAV_LIBRARIES - library to link against -# SPNAV_FOUND - true if pugixml was found. - -IF(UNIX) - - FIND_PATH(SPNAV_INCLUDE_DIR spnav.h) - - FIND_LIBRARY(SPNAV_LIBRARY - NAMES - spnav libspnav - ) - -# Support the REQUIRED and QUIET arguments, and set SPNAV_FOUND if found. -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Spnav DEFAULT_MSG SPNAV_LIBRARY - SPNAV_INCLUDE_DIR) - -if(SPNAV_FOUND) - set(SPNAV_LIBRARIES ${SPNAV_LIBRARY}) -endif() - -mark_as_advanced(SPNAV_LIBRARY SPNAV_INCLUDE_DIR) - -ENDIF(UNIX) diff --git a/cmake/FreeCadMacros.cmake b/cmake/FreeCadMacros.cmake deleted file mode 100644 index fdf3d93d..00000000 --- a/cmake/FreeCadMacros.cmake +++ /dev/null @@ -1,325 +0,0 @@ -include (CheckCXXSourceRuns) - -# ================================================================================ -# == Macros, mostly for special targets ========================================== - -MACRO (fc_copy_sources target_name outpath) - if(BUILD_VERBOSE_GENERATION) - set(fc_details " (fc_copy_sources called from ${CMAKE_CURRENT_SOURCE_DIR})") - else() - set(fc_details "") - endif() - foreach(it ${ARGN}) - get_filename_component(infile ${it} ABSOLUTE) - get_filename_component(outfile "${outpath}/${it}" ABSOLUTE) - add_file_dependencies("${infile}" "${outfile}") - ADD_CUSTOM_COMMAND( - COMMAND "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}" - OUTPUT "${outfile}" - COMMENT "Copying ${infile} to ${outfile}${fc_details}" - MAIN_DEPENDENCY "${infile}" - ) - endforeach(it) - ADD_CUSTOM_COMMAND( - TARGET ${target_name} - DEPENDS ${ARGN} - ) -ENDMACRO(fc_copy_sources) - -MACRO (fc_copy_file_if_different inputfile outputfile) - if (EXISTS ${inputfile}) - if (EXISTS ${outputfile}) - execute_process( - COMMAND ${CMAKE_COMMAND} -E compare_files ${inputfile} - ${outputfile} - RESULT_VARIABLE DIFFERENT_FILES - OUTPUT_QUIET - ERROR_QUIET - ) - - if (DIFFERENT_FILES) - execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${inputfile}" - "${outputfile}") - endif() - else() - execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${inputfile}" - "${outputfile}") - endif() - endif() -ENDMACRO(fc_copy_file_if_different) - -MACRO (fc_target_copy_resource target_name inpath outpath) -# Macro to copy a list of files into a nested directory structure -# Arguments - -# target_name - name of the target the files will be added to -# inpath - name of the source directory -# outpath - name of the destination directory -# ARGN - a list of relative file names that will be copied -# -# If a relative file name is foo/bar.txt then the foo directory -# part will be kept so that the destination file name will be -# ${outpath}/foo/bar.txt -# - if(BUILD_VERBOSE_GENERATION) - set(fc_details " (fc_target_copy_resource called from ${CMAKE_CURRENT_SOURCE_DIR})") - else() - set(fc_details "") - endif() - foreach(it ${ARGN}) - get_filename_component(infile "${inpath}/${it}" ABSOLUTE) - get_filename_component(outfile "${outpath}/${it}" ABSOLUTE) - add_file_dependencies("${infile}" "${outfile}") - ADD_CUSTOM_COMMAND( - COMMAND "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}" - OUTPUT "${outfile}" - COMMENT "Copying ${infile} to ${outfile}${fc_details}" - MAIN_DEPENDENCY "${infile}" - ) - endforeach(it) - ADD_CUSTOM_COMMAND( - TARGET ${target_name} - DEPENDS ${ARGN} - ) -ENDMACRO(fc_target_copy_resource) - -MACRO (fc_target_copy_resource_flat target_name inpath outpath) -# Macro to copy a list of files into a flat directory structure -# Arguments - -# target_name - name of the target the files will be added to -# inpath - name of the source directory -# outpath - name of the destination directory -# ARGN - a list of relative file names that will be copied -# -# If a relative file name is foo/bar.txt then the foo directory -# part will be removed so that the destination file name will be -# ${outpath}/bar.txt -# - if(BUILD_VERBOSE_GENERATION) - set(fc_details " (fc_target_copy_resource_flat called from ${CMAKE_CURRENT_SOURCE_DIR})") - else() - set(fc_details "") - endif() - foreach(it ${ARGN}) - get_filename_component(infile "${inpath}/${it}" ABSOLUTE) - get_filename_component(outfile "${it}" NAME) - get_filename_component(outfile "${outpath}/${outfile}" ABSOLUTE) - add_file_dependencies("${infile}" "${outfile}") - ADD_CUSTOM_COMMAND( - COMMAND "${CMAKE_COMMAND}" -E copy "${infile}" "${outfile}" - OUTPUT "${outfile}" - COMMENT "Copying ${infile} to ${outfile}${fc_details}" - MAIN_DEPENDENCY "${infile}" - ) - endforeach(it) - ADD_CUSTOM_COMMAND( - TARGET ${target_name} - DEPENDS ${ARGN} - ) -ENDMACRO(fc_target_copy_resource_flat) - -# It would be a bit cleaner to generate these files in ${CMAKE_CURRENT_BINARY_DIR} - -macro(generate_from_xml BASE_NAME) - set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/generate.py") - file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH) - file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.xml" SOURCE_NATIVE_PATH) - - set(SOURCE_CPP_PATH "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.cpp" ) - - # BASE_NAME may include also a path name - GET_FILENAME_COMPONENT(OUTPUT_PATH "${SOURCE_CPP_PATH}" PATH) - file(TO_NATIVE_PATH "${OUTPUT_PATH}" OUTPUT_NATIVE_PATH) - if(NOT EXISTS "${SOURCE_CPP_PATH}") - # assures the source files are generated at least once - message(STATUS "${SOURCE_CPP_PATH}") - execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - ) - endif() - add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.h" "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.cpp" - COMMAND ${PYTHON_EXECUTABLE} "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" ${BASE_NAME}.xml - MAIN_DEPENDENCY "${BASE_NAME}.xml" - DEPENDS - "${CMAKE_SOURCE_DIR}/src/Tools/generateTemplates/templateClassPyExport.py" - "${TOOL_PATH}" - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Building ${BASE_NAME}.h/.cpp out of ${BASE_NAME}.xml" - ) -endmacro(generate_from_xml) - -macro(generate_from_py BASE_NAME OUTPUT_FILE) - set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py") - file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH) - file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.py" SOURCE_NATIVE_PATH) - add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}" - COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}" - MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_NAME}.py" - DEPENDS "${TOOL_PATH}" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - COMMENT "Building files out of ${BASE_NAME}.py") -endmacro(generate_from_py) - -macro(generate_from_any INPUT_FILE OUTPUT_FILE VARIABLE) - set(TOOL_PATH "${CMAKE_SOURCE_DIR}/src/Tools/PythonToCPP.py") - file(TO_NATIVE_PATH "${TOOL_PATH}" TOOL_NATIVE_PATH) - file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE}" SOURCE_NATIVE_PATH) - add_custom_command( - OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}" - COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}" "${OUTPUT_FILE}" "${VARIABLE}" - MAIN_DEPENDENCY "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE}" - DEPENDS "${TOOL_PATH}" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - COMMENT "Building files out of ${INPUT_FILE}") -endmacro(generate_from_any) - - - -MACRO(ADD_MSVC_PRECOMPILED_HEADER TargetName PrecompiledHeader PrecompiledSource SourcesVar) - IF(MSVC) - GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE) - IF(MSVC_IDE) - SET(PrecompiledBinary "$(IntDir)\\$(TargetName).pch") - ELSE(MSVC_IDE) - SET(PrecompiledBinary ${CMAKE_CURRENT_BINARY_DIR}/${TargetName}.pch) - ENDIF(MSVC_IDE) - SET(Sources ${${SourcesVar}}) - - SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource} - PROPERTIES COMPILE_FLAGS "/Yc\"${PrecompiledHeader}\" /Fp\"${PrecompiledBinary}\"" - OBJECT_OUTPUTS "${PrecompiledBinary}") - SET_SOURCE_FILES_PROPERTIES(${Sources} - PROPERTIES COMPILE_FLAGS "/Yu\"${PrecompiledHeader}\" /FI\"${PrecompiledBinary}\" /Fp\"${PrecompiledBinary}\"" - OBJECT_DEPENDS "${PrecompiledBinary}") - # Add precompiled header to SourcesVar - LIST(APPEND ${SourcesVar} ${PrecompiledSource}) - ENDIF(MSVC) -ENDMACRO(ADD_MSVC_PRECOMPILED_HEADER) - -MACRO(GET_MSVC_PRECOMPILED_SOURCE PrecompiledSource SourcesVar) - IF(MSVC) - FOREACH (it ${ARGN}) - GET_FILENAME_COMPONENT(file_ext ${it} EXT) - GET_FILENAME_COMPONENT(file_name ${it} NAME) - STRING(COMPARE EQUAL ${it} ${PrecompiledSource} pch) - IF (NOT pch) - # get c++ source files - STRING(REGEX MATCH "^(.cpp|.cc|.cxx)$" cpp_file ${file_ext}) - # ignore any generated source files from Qt - STRING(REGEX MATCH "^(moc_|qrc_|ui_)" gen_file ${file_name}) - IF(cpp_file AND NOT gen_file) - LIST(APPEND ${SourcesVar} ${it}) - ENDIF(cpp_file AND NOT gen_file) - ENDIF(NOT pch) - ENDFOREACH (it) - ENDIF(MSVC) -ENDMACRO(GET_MSVC_PRECOMPILED_SOURCE) - -# Macro to replace all the binary output locations. Takes 2 optional parameters. -# ${ARGVN} is zero based so the 3rd element is ${ARGV2}. When the 3rd element is missing, -# Runtime and Lib directories default to /bin and /lib. When present, the 3rd element -# specifies both Runtime and Lib directories. 4th specifies linux install path. -MACRO(SET_BIN_DIR ProjectName OutputName) - set_target_properties(${ProjectName} PROPERTIES OUTPUT_NAME ${OutputName}) - if(${ARGC} GREATER 2) - # VS_IDE (and perhaps others) make Release and Debug subfolders. This removes them. - set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}${ARGV2}) - set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}${ARGV2}) - set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}${ARGV2}) - set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}${ARGV2}) - set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}${ARGV2}) - set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}${ARGV2}) - else(${ARGC} GREATER 2) - set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin) - set_target_properties(${ProjectName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin) - set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) - set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/lib) - set_target_properties(${ProjectName} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib) - endif(${ARGC} GREATER 2) - - if(WIN32) - set_target_properties(${ProjectName} PROPERTIES DEBUG_OUTPUT_NAME ${OutputName}_d) - else(WIN32) - # ISIMPABase, SMDS, Driver and MEFISTO2 libs don't depend on parts from CMAKE_INSTALL_LIBDIR - if(NOT ${ProjectName} MATCHES "^(ISIMPABase|SMDS|Driver|MEFISTO2)$") - if(${ARGC} STREQUAL 4) - set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${ARGV3}) - elseif(NOT IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) - set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) - else() - set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR}) - endif() - endif() - endif(WIN32) -ENDMACRO(SET_BIN_DIR) - -# Set python prefix & suffix together -MACRO(SET_PYTHON_PREFIX_SUFFIX ProjectName) - if(NOT MSVC) - set_target_properties(${ProjectName} PROPERTIES PREFIX "") - endif(NOT MSVC) - - if(WIN32) - set_target_properties(${ProjectName} PROPERTIES SUFFIX ".pyd") - # 0000661: cmake build on Mac OS: dealing with dylib versus so - elseif(APPLE) - set_target_properties(${ProjectName} PROPERTIES SUFFIX ".so") - endif(WIN32) -ENDMACRO(SET_PYTHON_PREFIX_SUFFIX) - -# Locate the include directory for a pip-installed package -- uses pip show to find the base pip -# install directory, and then appends the package name and "/include" to the end -macro(find_pip_package PACKAGE) - execute_process( - COMMAND ${PYTHON_EXECUTABLE} -m pip show ${PACKAGE} - RESULT_VARIABLE FAILURE - OUTPUT_VARIABLE PRINT_OUTPUT - ) - if(NOT FAILURE) - # Extract Name: and Location: lines and use them to construct the include directory - string(REPLACE "\n" ";" PIP_OUTPUT_LINES ${PRINT_OUTPUT}) - foreach(LINE IN LISTS PIP_OUTPUT_LINES) - STRING(FIND "${LINE}" "Name: " NAME_STRING_LOCATION) - STRING(FIND "${LINE}" "Location: " LOCATION_STRING_LOCATION) - if(${NAME_STRING_LOCATION} EQUAL 0) - STRING(SUBSTRING "${LINE}" 6 -1 PIP_PACKAGE_NAME) - STRING(STRIP "${PIP_PACKAGE_NAME}" PIP_PACKAGE_NAME) - STRING(REPLACE "-" "_" PIP_PACKAGE_NAME "${PIP_PACKAGE_NAME}") - elseif(${LOCATION_STRING_LOCATION} EQUAL 0) - STRING(SUBSTRING "${LINE}" 9 -1 PIP_PACKAGE_LOCATION) - STRING(STRIP "${PIP_PACKAGE_LOCATION}" PIP_PACKAGE_LOCATION) - endif() - endforeach() - file(TO_CMAKE_PATH "${PIP_PACKAGE_LOCATION}" PIP_PACKAGE_LOCATION) - if(EXISTS "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/include") - set(INCLUDE_DIR "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/include") - endif() - # There are many different library naming schemes, but basically we are looking for things that look like - # PACKAGE*.lib/so or PACKAGE_d*.lib/so - if(WIN32) - file(GLOB OPT_LIBRARIES "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/${PIP_PACKAGE_NAME}.*.lib") - file(GLOB DEBUG_LIBRARIES "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/${PIP_PACKAGE_NAME}_d.*.lib") - else() - string(TOLOWER ${PIP_PACKAGE_NAME} PIP_LIB_NAME) - file(GLOB OPT_LIBRARIES "${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}/*${PIP_LIB_NAME}*.so.*") - endif() - if (OPT_LIBRARIES AND DEBUG_LIBRARIES) - set(${PACKAGE}_LIBRARIES optimized ${OPT_LIBRARIES} debug ${DEBUG_LIBRARIES} CACHE PATH "") - elseif(OPT_LIBRARIES) - set(${PACKAGE}_LIBRARIES ${OPT_LIBRARIES} CACHE PATH "") - elseif(DEBUG_LIBRARIES) - set(${PACKAGE}_LIBRARIES ${DEBUG_LIBRARIES} CACHE PATH "") - endif() - set(${PACKAGE}_INCLUDE_DIRS ${INCLUDE_DIR} CACHE PATH "") - set(${PACKAGE}_FOUND ON CACHE BOOL OFF) - message(STATUS "Found pip-installed ${PACKAGE} in ${PIP_PACKAGE_LOCATION}/${PIP_PACKAGE_NAME}") - endif() -endmacro() - -function(target_compile_warn_error ProjectName) - if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) - target_compile_options(${ProjectName} PRIVATE -Werror) - endif() -endfunction() diff --git a/cmake/ISIMPA_Helpers/CMakeLists.txt b/cmake/ISIMPA_Helpers/CMakeLists.txt deleted file mode 100644 index dd2d1afa..00000000 --- a/cmake/ISIMPA_Helpers/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -file(GLOB ISIMPA_HELPER_CMAKE_FILES ./*.cmake) - -foreach(_CMAKE_FILE ${ISIMPA_HELPER_CMAKE_FILES}) - get_filename_component(_FILENAME ${_CMAKE_FILE} NAME) - if (NOT _FILENAME IN_LIST _SKIP_FILES) - include(${_CMAKE_FILE}) - endif() -endforeach(_CMAKE_FILE ${ISIMPA_HELPER_CMAKE_FILES}) diff --git a/cmake/ISIMPA_Helpers/CreatePackagingTargets.cmake b/cmake/ISIMPA_Helpers/CreatePackagingTargets.cmake deleted file mode 100644 index de8b52c6..00000000 --- a/cmake/ISIMPA_Helpers/CreatePackagingTargets.cmake +++ /dev/null @@ -1,41 +0,0 @@ -macro(CreatePackagingTargets) - # ================================================================================ - # == Packaging =================================================================== - # - #add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) - add_custom_target(dist-git - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py - --bindir=${CMAKE_BINARY_DIR} - --major=${PACKAGE_VERSION_MAJOR} - --minor=${PACKAGE_VERSION_MINOR} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - add_custom_target(distdfsg-git - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py - --bindir=${CMAKE_BINARY_DIR} - --major=${PACKAGE_VERSION_MAJOR} - --minor=${PACKAGE_VERSION_MINOR} - --dfsg - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX OR MINGW) - add_custom_target(distcheck-git - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py - --bindir=${CMAKE_BINARY_DIR} - --major=${PACKAGE_VERSION_MAJOR} - --minor=${PACKAGE_VERSION_MINOR} - --check - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - add_custom_target(distcheckdfsg-git - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/Tools/makedist.py - --bindir=${CMAKE_BINARY_DIR} - --major=${PACKAGE_VERSION_MAJOR} - --minor=${PACKAGE_VERSION_MINOR} - --dfsg - --check - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - endif() - -endmacro(CreatePackagingTargets) diff --git a/cmake/ISIMPA_Helpers/ISIMPALibpackChecks.cmake b/cmake/ISIMPA_Helpers/ISIMPALibpackChecks.cmake deleted file mode 100644 index abe6b2ad..00000000 --- a/cmake/ISIMPA_Helpers/ISIMPALibpackChecks.cmake +++ /dev/null @@ -1,44 +0,0 @@ -macro(ISIMPALibpackChecks) - # ============================================================================== - - if(ISIMPA_LIBPACK_USE) - - # checking for a unique file in LibPack location to make sure the right version of the LibPack is there - find_file(ISIMPA_LIBPACK_CHECKFILE_CLBUNDLER MANIFEST.db PATHS ${ISIMPA_LIBPACK_DIR} NO_DEFAULT_PATH NO_CACHE) - find_file(ISIMPA_LIBPACK_CHECKFILE_VERSION FREECAD_LIBPACK_VERSION PATHS ${ISIMPA_LIBPACK_DIR} NO_DEFAULT_PATH NO_CACHE) - - # don't show them in the GUI - set(ISIMPA_LIBPACK_CHECKFILE_CLBUNDLER "${ISIMPA_LIBPACK_CHECKFILE_CLBUNDLER}" CACHE INTERNAL "Find libpack") - set(ISIMPA_LIBPACK_CHECKFILE_VERSION "${ISIMPA_LIBPACK_CHECKFILE_VERSION}" CACHE INTERNAL "Find libpack v3+") - - if (ISIMPA_LIBPACK_CHECKFILE_CLBUNDLER) - set(ISIMPA_LIBPACK_VERSION "CLbundler" CACHE STRING "Displays if the libpack has been found" FORCE) - message("Found LibPack v2 (CLBundler) via ${ISIMPA_LIBPACK_CHECKFILE_CLBUNDLER}") - include(cMake/UseLibPackCLbundler.cmake) - elseif (ISIMPA_LIBPACK_CHECKFILE_VERSION) - file(READ ${ISIMPA_LIBPACK_CHECKFILE_VERSION} ISIMPA_LIBPACK_VERSION) - set(ISIMPA_LIBPACK_VERSION "${ISIMPA_LIBPACK_VERSION}" CACHE STRING "Version of the LibPack, if found" FORCE) - message("Found LibPack " ${ISIMPA_LIBPACK_VERSION}) - include(cMake/UseLibPack3.cmake) - else(ISIMPA_LIBPACK_CHECKFILE_CLBUNDLER) - set(ISIMPA_LIBPACK_VERSION "NOTFOUND" CACHE STRING "Displays if the libpack has been found" FORCE) - message(SEND_ERROR "Could not find LibPack in specified location: " ${ISIMPA_LIBPACK_DIR}) - file(GLOB found_files LIST_DIRECTORIES true "${ISIMPA_LIBPACK_DIR}/*") - foreach(found_file ${found_files}) - message("${found_file}") - endforeach() - endif(ISIMPA_LIBPACK_CHECKFILE_CLBUNDLER) - -# -------------------------------- Swig ---------------------------------- - - find_package(SWIG) - - if(NOT SWIG_FOUND) - message("==================================================\n" - "SWIG not found, don't build SWIG binding for pivy.\n" - "==================================================\n") - endif(NOT SWIG_FOUND) - - endif(ISIMPA_LIBPACK_USE) - -endmacro(ISIMPALibpackChecks) diff --git a/cmake/ISIMPA_Helpers/InitializeISIMPABuildOptions.cmake b/cmake/ISIMPA_Helpers/InitializeISIMPABuildOptions.cmake deleted file mode 100644 index 1ad8692f..00000000 --- a/cmake/ISIMPA_Helpers/InitializeISIMPABuildOptions.cmake +++ /dev/null @@ -1,66 +0,0 @@ -macro(InitializeISIMPABuildOptions) - # ============================================================================== - # ================= All the options for the build process ================= - # ============================================================================== - - option(BUILD_FORCE_DIRECTORY "The build directory must be different to the source directory." OFF) - option(SKIPISIMPA "Do not build ISIMPA Gui." OFF) - - # == Win32 is default behaviour use the LibPack copied in Source tree ========== - if(MSVC) - option(ISIMPA_RELEASE_PDB "Create PDB files for Release version." ON) - option(ISIMPA_RELEASE_SEH "Enable Structured Exception Handling for Release version." ON) - option(ISIMPA_LIBPACK_USE "Use the LibPack to Build ISIMPA (only Win32 so far)." ON) - option(ISIMPA_USE_PCH "Activate precompiled headers where it's used." ON) - - if (DEFINED ENV{ISIMPA_LIBPACK_DIR}) - set(ISIMPA_LIBPACK_DIR $ENV{ISIMPA_LIBPACK_DIR} CACHE PATH "Directory of the ISIMPA LibPack") - message(STATUS "Found libpack env variable: ${ISIMPA_LIBPACK_DIR}") - else() - set(ISIMPA_LIBPACK_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Directory of the ISIMPA LibPack") - endif() - - set(LIBPACK_FOUND OFF ) - if (EXISTS ${ISIMPA_LIBPACK_DIR}/plugins/imageformats/qsvg.dll) - set(LIBPACK_FOUND ON ) - set(COPY_LIBPACK_BIN_TO_BUILD OFF ) - # Create install commands for dependencies for INSTALL target in ISIMPA solution - option(ISIMPA_INSTALL_DEPEND_DIRS "Create install dependency commands for the INSTALL target found - in the ISIMPA solution." ON) - # Copy libpack smaller dependency folders to build folder per user request - if non-existent at destination - if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/imageformats/qsvg.dll) - option(ISIMPA_COPY_DEPEND_DIRS_TO_BUILD "Copy smaller libpack dependency directories to build directory." OFF) - endif() - # Copy libpack 'bin' directory contents to build 'bin' per user request - only IF NOT EXISTS already - if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/DLLs) - set(COPY_LIBPACK_BIN_TO_BUILD ON ) - option(ISIMPA_COPY_LIBPACK_BIN_TO_BUILD "Copy larger libpack dependency 'bin' folder to the build directory." OFF) - # Copy only the minimum number of files to get a working application - option(ISIMPA_COPY_PLUGINS_BIN_TO_BUILD "Copy plugins to the build directory." OFF) - endif() - else() - message(WARNING Could not locate ${ISIMPA_LIBPACK_DIR}/plugins/imageformats/qsvg.dll) - message("Libpack NOT found.\nIf you intend to use a Windows libpack, set the ISIMPA_LIBPACK_DIR to the libpack directory.") - message(STATUS "Visit: https://github.com/ISIMPA/ISIMPA-Libpack/releases/ for Windows libpack downloads.") - endif() - elseif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) - option(ISIMPA_WARN_ERROR "Make all warnings into errors. " OFF) - else(MSVC) - option(ISIMPA_LIBPACK_USE "Use the LibPack to Build ISIMPA (only Win32 so far)." OFF) - set(ISIMPA_LIBPACK_DIR "" CACHE PATH "Directory of the ISIMPA LibPack") - endif(MSVC) - - # for Windows the minimum required cmake version is 3.4.3 to build the CAM module - if(WIN32 AND CMAKE_VERSION VERSION_LESS 3.4.3) - message(WARNING "Disable CAM, requires cmake >= 3.4.3 in order to build this module") - set(BUILD_CAM OFF ) - endif() - - # force build directory to be different to source directory - if (BUILD_FORCE_DIRECTORY) - if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) - message(FATAL_ERROR "The build directory (${CMAKE_BINARY_DIR}) must be different to the source directory (${CMAKE_SOURCE_DIR}).\n" - "Please choose another build directory! Or disable the option BUILD_FORCE_DIRECTORY.") - endif() - endif() -endmacro(InitializeISIMPABuildOptions) diff --git a/cmake/ISIMPA_Helpers/SetupBoost.cmake b/cmake/ISIMPA_Helpers/SetupBoost.cmake deleted file mode 100644 index 0bb1343c..00000000 --- a/cmake/ISIMPA_Helpers/SetupBoost.cmake +++ /dev/null @@ -1,31 +0,0 @@ -macro(SetupBoost) -# -------------------------------- Boost -------------------------------- - - set(_boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS}) - - set (BOOST_COMPONENTS filesystem program_options regex system thread date_time) - find_package(Boost ${BOOST_MIN_VERSION} - COMPONENTS ${BOOST_COMPONENTS} REQUIRED) - - if(UNIX AND NOT APPLE) - # Boost.Thread 1.67+ headers reference pthread_condattr_* - list(APPEND Boost_LIBRARIES pthread) - endif() - - if(NOT Boost_FOUND) - set (NO_BOOST_COMPONENTS) - foreach (comp ${BOOST_COMPONENTS}) - string(TOUPPER ${comp} uppercomp) - if (NOT Boost_${uppercomp}_FOUND) - list(APPEND NO_BOOST_COMPONENTS ${comp}) - endif() - endforeach() - message(FATAL_ERROR "=============================================\n" - "Required components:\n" - " ${BOOST_COMPONENTS}\n" - "Not found, install the components:\n" - " ${NO_BOOST_COMPONENTS}\n" - "=============================================\n") - endif(NOT Boost_FOUND) - -endmacro(SetupBoost) diff --git a/cmake/ISIMPA_Helpers/SetupDoxygen.cmake b/cmake/ISIMPA_Helpers/SetupDoxygen.cmake deleted file mode 100644 index a10829da..00000000 --- a/cmake/ISIMPA_Helpers/SetupDoxygen.cmake +++ /dev/null @@ -1,12 +0,0 @@ -macro(SetupDoxygen) -# -------------------------------- Doxygen ---------------------------------- - - find_package(Doxygen) - - if (NOT DOXYGEN_FOUND) - message("=====================================================\n" - "Doxygen not found, will not build documentation. \n" - "=====================================================\n") - endif(NOT DOXYGEN_FOUND) - -endmacro(SetupDoxygen) diff --git a/cmake/ISIMPA_Helpers/SetupOpenGL.cmake b/cmake/ISIMPA_Helpers/SetupOpenGL.cmake deleted file mode 100644 index 4ce39248..00000000 --- a/cmake/ISIMPA_Helpers/SetupOpenGL.cmake +++ /dev/null @@ -1,16 +0,0 @@ -macro(SetupOpenGL) -# -------------------------------- OpenGL -------------------------------- - - find_package(OpenGL) - include(FindPackageMessage) - if(OPENGL_GLU_FOUND) - find_package_message(OPENGL_GLU - "Found OpenGLU: ${OPENGL_glu_LIBRARY}" - "[${OPENGL_glu_LIBRARY}][${OPENGL_INCLUDE_DIR}]") - else(OPENGL_GLU_FOUND) - message(FATAL_ERROR "======================\n" - "GLU library not found.\n" - "======================\n") - endif(OPENGL_GLU_FOUND) - -endmacro(SetupOpenGL) diff --git a/cmake/ISIMPA_Helpers/SetupPybind11.cmake b/cmake/ISIMPA_Helpers/SetupPybind11.cmake deleted file mode 100644 index 7edf9a67..00000000 --- a/cmake/ISIMPA_Helpers/SetupPybind11.cmake +++ /dev/null @@ -1,10 +0,0 @@ -macro(SetupPybind11) -# -------------------------------- PyBind11 ----------------------------- - - # necessary for flat-mesh feature - option(ISIMPA_USE_PYBIND11 "Use pybind11" OFF) - if (ISIMPA_USE_PYBIND11) - find_package(pybind11 REQUIRED) - endif() - -endmacro(SetupPybind11) diff --git a/cmake/ISIMPA_Helpers/SetupPython.cmake b/cmake/ISIMPA_Helpers/SetupPython.cmake deleted file mode 100644 index 7cc27a11..00000000 --- a/cmake/ISIMPA_Helpers/SetupPython.cmake +++ /dev/null @@ -1,21 +0,0 @@ -macro(SetupPython) -# -------------------------------- Python -------------------------------- - - find_package(Python3 COMPONENTS Interpreter Development REQUIRED) - - # For backwards compatibility with old CMake scripts - set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) - set(PYTHON_LIBRARIES ${Python3_LIBRARIES}) - set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS}) - set(PYTHON_LIBRARY_DIRS ${Python3_LIBRARY_DIRS}) - set(PYTHON_VERSION_STRING ${Python3_VERSION}) - set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR}) - set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR}) - set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH}) - set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND}) - - if (${PYTHON_VERSION_STRING} VERSION_LESS "3.8") - message(FATAL_ERROR "To build I-SIMPA you need at least Python 3.8\n") - endif() - -endmacro(SetupPython) diff --git a/cmake/ISIMPA_Helpers/SetupSwig.cmake b/cmake/ISIMPA_Helpers/SetupSwig.cmake deleted file mode 100644 index 9319d88a..00000000 --- a/cmake/ISIMPA_Helpers/SetupSwig.cmake +++ /dev/null @@ -1,12 +0,0 @@ -macro(SetupSwig) -# -------------------------------- Swig ---------------------------------- - - find_package(SWIG) - - if (NOT SWIG_FOUND) - message("=====================================================\n" - "SWIG not found, will not build SWIG binding for pivy.\n" - "=====================================================\n") - endif(NOT SWIG_FOUND) - -endmacro(SetupSwig) diff --git a/cmake/UseLibPack3.cmake b/cmake/UseLibPack3.cmake deleted file mode 100644 index cc7a1ddb..00000000 --- a/cmake/UseLibPack3.cmake +++ /dev/null @@ -1,17 +0,0 @@ -set(ENV{PATH} "${ISIMPA_LIBPACK_DIR};$ENV{PATH}") -list(PREPEND CMAKE_PREFIX_PATH "${ISIMPA_LIBPACK_DIR}") - -set (Python3_EXECUTABLE ${ISIMPA_LIBPACK_DIR}/bin/python.exe) -find_package(Python3 COMPONENTS Interpreter Development REQUIRED) - -# Make sure we are using the shared versions of Boost here: the LibPack includes both -set(Boost_USE_STATIC_LIBS OFF) -find_package(Boost COMPONENTS system REQUIRED PATHS ${ISIMPA_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH) - -set(OCE_DIR ${ISIMPA_LIBPACK_DIR}/lib/cmake CACHE PATH "" FORCE) - -set(SWIG_EXECUTABLE ${ISIMPA_LIBPACK_DIR}/bin/swig.exe CACHE FILEPATH "Swig" FORCE) - -set (HDF5_DIR ${ISIMPA_LIBPACK_DIR}/share/cmake) - -link_directories (${ISIMPA_LIBPACK_DIR}/lib) diff --git a/cmake/UseLibPackCLbundler.cmake b/cmake/UseLibPackCLbundler.cmake deleted file mode 100644 index 93c5b394..00000000 --- a/cmake/UseLibPackCLbundler.cmake +++ /dev/null @@ -1,60 +0,0 @@ -set(ENV{PATH} "${ISIMPA_LIBPACK_DIR};$ENV{PATH}") -set(ENV{CMAKE_PREFIX_PATH} ${ISIMPA_LIBPACK_DIR}) - -set(Boost_INCLUDE_DIR ${ISIMPA_LIBPACK_DIR}/include CACHE PATH "" FORCE) - -set(OCE_DIR ${ISIMPA_LIBPACK_DIR}/lib/cmake CACHE PATH "" FORCE) - -set(SWIG_EXECUTABLE ${ISIMPA_LIBPACK_DIR}/bin/swig/swig.exe CACHE FILEPATH "Swig" FORCE) - - -# Set paths to cmake config files for each Qt module -set(Qt5_ROOT_DIR ${ISIMPA_LIBPACK_DIR} CACHE PATH "") - -set (Qt5_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5 CACHE PATH "") -set (Qt5AxBase_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5AxBase CACHE PATH "") -set (Qt5AxContainer_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5AxContainer CACHE PATH "") -set (Qt5AxServer_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5AxServer CACHE PATH "") -set (Qt5Concurrent_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Concurrent CACHE PATH "") -set (Qt5Core_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Core CACHE PATH "") -set (Qt5DBus_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5DBus CACHE PATH "") -set (Qt5Designer_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Designer CACHE PATH "") -set (Qt5Gui_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Gui CACHE PATH "") -set (Qt5Help_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Help CACHE PATH "") -set (Qt5LinguistTools_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5LinguistTools CACHE PATH "") -set (Qt5Multimedia_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Multimedia CACHE PATH "") -set (Qt5MultimediaWidgets_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5MultimediaWidgets CACHE PATH "") -set (Qt5Network_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Network CACHE PATH "") -set (Qt5OpenGL_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5OpenGL CACHE PATH "") -set (Qt5OpenGLExtensions_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5OpenGLExtensions CACHE PATH "") -set (Qt5PrintSupport_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5PrintSupport CACHE PATH "") -set (Qt5Qml_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Qml CACHE PATH "") -set (Qt5Quick_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Quick CACHE PATH "") -set (Qt5QuickTest_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5QuickTest CACHE PATH "") -set (Qt5QuickWidgets_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5QuickWidgets CACHE PATH "") -set (Qt5Sql_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Sql CACHE PATH "") -set (Qt5Svg_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Svg CACHE PATH "") -set (Qt5Test_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Test CACHE PATH "") -set (Qt5UiPlugin_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5UiPlugin CACHE PATH "") -set (Qt5UiTools_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5UiTools CACHE PATH "") -set (Qt5Widgets_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Widgets CACHE PATH "") -set (Qt5Xml_DIR ${Qt5_ROOT_DIR}/lib/cmake/Qt5Xml CACHE PATH "") - -find_library(XercesC_LIBRARY_RELEASE xerces-c_3 "${ISIMPA_LIBPACK_DIR}/lib") -find_library(XercesC_LIBRARY_DEBUG xerces-c_3D "${ISIMPA_LIBPACK_DIR}/lib") -set (XercesC_LIBRARIES debug ${XercesC_LIBRARY_DEBUG} optimized ${XercesC_LIBRARY_RELEASE}) -set(XercesC_FOUND TRUE) - -find_library(COIN3D_LIBRARY_RELEASE coin4 "${ISIMPA_LIBPACK_DIR}/lib") -find_library(COIN3D_LIBRARY_DEBUG coin4d "${ISIMPA_LIBPACK_DIR}/lib") -set(COIN3D_LIBRARIES optimized ${COIN3D_LIBRARY_RELEASE} - debug ${COIN3D_LIBRARY_DEBUG}) -set(COIN3D_FOUND TRUE) - -set(NETGENDATA ${ISIMPA_LIBPACK_DIR}/include/netgen) - -if(ISIMPA_USE_FREETYPE) - set(FREETYPE_INCLUDE_DIR_freetype2 ${ISIMPA_LIBPACK_DIR}/include/freetype2) -endif(ISIMPA_USE_FREETYPE) - -link_directories(${ISIMPA_LIBPACK_DIR}/lib) diff --git a/src/isimpa/3dengine/OpenGLApp.h b/src/isimpa/3dengine/OpenGLApp.h index 36e0de62..fab7cbaf 100644 --- a/src/isimpa/3dengine/OpenGLApp.h +++ b/src/isimpa/3dengine/OpenGLApp.h @@ -43,8 +43,7 @@ #include #include #include -#include - +#include "GL/opengl_inc.h" /** * Contient les information d'un animateur */ diff --git a/src/isimpa/CMakeLists.txt b/src/isimpa/CMakeLists.txt index cad46941..e577a21b 100644 --- a/src/isimpa/CMakeLists.txt +++ b/src/isimpa/CMakeLists.txt @@ -371,6 +371,18 @@ source_group( "" FILES ${ISIMPA_SOURCES} ) # Find package for generation FIND_PACKAGE(PythonInterp REQUIRED) +find_package(OpenGL) +include(FindPackageMessage) +if(OPENGL_GLU_FOUND) + find_package_message(OPENGL_GLU + "Found OpenGLU: ${OPENGL_glu_LIBRARY}" + "[${OPENGL_glu_LIBRARY}][${OPENGL_INCLUDE_DIR}]") +else(OPENGL_GLU_FOUND) + message(FATAL_ERROR "======================\n" + "GLU library not found.\n" + "======================\n") +endif(OPENGL_GLU_FOUND) + # Ask make to call python in order to use element.h to produce enum_def.cpp ADD_CUSTOM_COMMAND( PRE_BUILD diff --git a/src/isimpa/GL/opengl_inc.h b/src/isimpa/GL/opengl_inc.h index e28819f2..c99b648e 100644 --- a/src/isimpa/GL/opengl_inc.h +++ b/src/isimpa/GL/opengl_inc.h @@ -37,5 +37,10 @@ #include // Header File For The GLUT Library #include // Header file fot the glx libraries. #endif +#if defined(__APPLE__) +#include +#include +#else #include #include +#endif diff --git a/src/isimpa/data_manager/drawable_element.cpp b/src/isimpa/data_manager/drawable_element.cpp index 39cb3c68..ec853929 100644 --- a/src/isimpa/data_manager/drawable_element.cpp +++ b/src/isimpa/data_manager/drawable_element.cpp @@ -29,8 +29,8 @@ * ----------------------------------------------------------------------*/ #include "drawable_element.h" +#include "GL/opengl_inc.h" #include -#include #include "data_manager/appconfig.h" #include "last_cpp_include.hpp" diff --git a/src/spps/CMakeLists.txt b/src/spps/CMakeLists.txt index 6920b2d5..a0c2515d 100644 --- a/src/spps/CMakeLists.txt +++ b/src/spps/CMakeLists.txt @@ -67,13 +67,13 @@ link_directories( ${Boost_LIBRARY_DIRS} ) include_directories( ${Boost_INCLUDE_DIRS} ) # Check for clock_gettime function -if (UNIX) +if (CMAKE_SYSTEM_NAME EQUAL "LINUX") include(CheckLibraryExists) check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME ) if(NOT HAVE_CLOCK_GETTIME) message(FATAL_ERROR "clock_gettime not found") endif(NOT HAVE_CLOCK_GETTIME) -endif(UNIX) +endif() configure_file(sppsVersion.h.in ${CMAKE_CURRENT_BINARY_DIR}/generated/sppsVersion.h ) @@ -101,9 +101,9 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") else() message(STATUS " SPPS release build enable multi threading") target_link_libraries (spps ${CMAKE_THREAD_LIBS_INIT}) - if(UNIX) + if (CMAKE_SYSTEM_NAME EQUAL "LINUX") target_link_libraries (spps rt) - endif(UNIX) + endif() endif() #--------------#