Commit ca317cc8 authored by Roland Gosda's avatar Roland Gosda
Browse files

Added compability for OpenSUSE 42.3 including cmake as low as 3.5.2 and fixed...

Added compability for OpenSUSE 42.3 including cmake as low as 3.5.2 and fixed wording in license sections.
parent 00e7d94d
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.5.2)
enable_language(CXX)
project(HYKOPS CXX) # TODO add VERSION
......@@ -65,7 +65,11 @@ find_package(libIGES)
if (NOT libIGES_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/external/libIGES.CMakeLists.txt.in ${CMAKE_BINARY_DIR}/libIGES-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/libIGES-download )
execute_process(COMMAND ${CMAKE_COMMAND} --build . -j WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/libIGES-download )
if(${CMAKE_VERSION} VERSION_LESS "3.12.0") # cannot pass --parallel for parallel builds with older cmake versions
execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/libIGES-download )
else()
execute_process(COMMAND ${CMAKE_COMMAND} --build . --parallel WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/libIGES-download )
endif()
# find_package(libIGES REQUIRED PATHS "${CMAKE_BINARY_DIR}/external") # TODO not working
include_directories(SYSTEM ${CMAKE_BINARY_DIR}/external/include/iges) # workaround for not finding the package by default
link_directories(${CMAKE_BINARY_DIR}/external/lib) # workaround for not finding the package by default
......@@ -135,7 +139,7 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/hykops_core ${CMAKE_SOURCE_DIR}/hykops_dat
)
install(TARGETS HYKOPS
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${HYKOPS_LIBRARIES_INSTALL_DIR}
)
# Define an uninstall target
......
......@@ -76,11 +76,20 @@ find_package(libIGES)
if (NOT libIGES_FOUND)
configure_file(${CMAKE_CURRENT_LIST_DIR}/external/libIGES.CMakeLists.txt.in ${CMAKE_BINARY_DIR}/libIGES-download/CMakeLists.txt)
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/libIGES-download )
execute_process(COMMAND ${CMAKE_COMMAND} --build . -j WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/libIGES-download )
if(${CMAKE_VERSION} VERSION_LESS "3.12.0") # cannot pass --parallel for parallel builds with older cmake versions
execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/libIGES-download )
else()
execute_process(COMMAND ${CMAKE_COMMAND} --build . --parallel WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/libIGES-download )
endif()
# find_package(libIGES REQUIRED PATHS "${CMAKE_BINARY_DIR}/external") # TODO not working
include_directories(SYSTEM ${CMAKE_BINARY_DIR}/external/include/iges) # workaround for not finding the package by default
target_link_directories(HYKOPS INTERFACE ${CMAKE_BINARY_DIR}/external/lib) # workaround for not finding the package by default
target_link_directories(HYKOPS INTERFACE ${CMAKE_BINARY_DIR}/external/bin) # workaround for not finding the package by default on windows, where for some reason the library is installed in the folder bin
if(${CMAKE_VERSION} VERSION_LESS "3.13.0") # cannot link directories to an interface target prior to cmake 3.13
link_directories(${CMAKE_BINARY_DIR}/external/lib) # workaround for not finding the package by default
link_directories(${CMAKE_BINARY_DIR}/external/bin) # workaround for not finding the package by default on windows, where for some reason the library is installed in the folder bin
else()
target_link_directories(HYKOPS INTERFACE ${CMAKE_BINARY_DIR}/external/lib) # workaround for not finding the package by default
target_link_directories(HYKOPS INTERFACE ${CMAKE_BINARY_DIR}/external/bin) # workaround for not finding the package by default on windows, where for some reason the library is installed in the folder bin
endif()
endif()
target_link_libraries(HYKOPS INTERFACE iges)
......
......@@ -28,7 +28,6 @@ cmake --build . --target install
To uninstall the HYKOPS library go to the build folder and execute the following command.
```
cmake ..
cmake --build . --target uninstall
```
Please note, that the deinstallation process only works if you did not modify the installation by hand or modified the file `install_manifest.txt` in your build folder. Afterwards you may delete the build folder.
......@@ -47,7 +46,7 @@ The HYKOPS library is build using [cmake](https://cmake.org). To build your own
Below, you may find a minimal example for a `CMakeLists.txt` for your project.
```
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.5.2)
enable_language(CXX)
project(project_name CXX)
......@@ -66,4 +65,4 @@ cmake --build .
assuming you start in the directory, where your `CMakeLists.txt` lies.
### Linking under Windows
Under Windows additional step need to be taken to be able to run a successfully build executable. On Windows the necessary dynamically linked libraries (DLLs) are usually not in the path. Therefore, the DLLs of HYKOPS (if it was build as a shared library), Boost-filesystem and iges have to be placed in the path, e.g. the directory the executuable is located in. To find out which exact DLLs are required, call `dumpbin.exe /dependents whatever.exe` from a developer shell.
Under Windows an additional step needs to be performed to be able to run a successfully build executable. On Windows the necessary dynamically linked libraries (DLLs) are usually not in the path. Therefore, the DLLs of HYKOPS (if it was build as a shared library), Boost-filesystem and iges have to be placed in the path, e.g. the directory the executable is located in. To find out which exact DLLs are required, call `dumpbin.exe /dependents whatever.exe` from a developer shell.
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 2.8.2)
project(GeometricTools-download NONE)
......@@ -7,7 +7,6 @@ ExternalProject_Add(GeometricTools
GIT_REPOSITORY https://github.com/davideberly/GeometricTools.git
GIT_TAG GTE-version-5.14
SOURCE_DIR "${CMAKE_BINARY_DIR}/GeometricTools-src"
SOURCE_SUBDIR "GTE"
BINARY_DIR "${CMAKE_BINARY_DIR}/GeometricTools-build"
BUILD_COMMAND ""
INSTALL_COMMAND ""
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// This file combines all headers from HYKOPS into one.
......@@ -25,7 +25,6 @@
#include "ExternalSTLParser.h"
#include "HPolyLine.h"
#include "HSpline.h"
#include "HykopsCore.h"
#include "LoftElementSupport.h"
#include "MapKeys.h"
#include "MatrixOps.h"
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#include "AbstractGeometryFactory.h"
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#pragma once
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#include "AssembleFactory.h"
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#ifndef ASSEMBLEFACTORY_H
#define ASSEMBLEFACTORY_H
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#pragma once
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#include "CompositionFactory.h"
#include "HComposition.h"
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#ifndef COMPOSITIONFACTORY_H
#define COMPOSITIONFACTORY_H
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#include "CompositionSerializer.h"
#include "domreader.h"
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#ifndef CompositionSerializer_H
#define CompositionSerializer_H
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#include "CoordinateTransformation.h"
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#ifndef COORDINATETRANSFORMATION_H
#define COORDINATETRANSFORMATION_H
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#include "CurveUtil.h"
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#ifndef CURVEUTIL_H
#define CURVEUTIL_H
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#include <boost/filesystem.hpp>
#include "CurvilinearCoordinateSystemSupport.h"
......
// This file is part of the HYKOPS framework
//
// HYKOPS is subject to the terms of the Lesser GNU Public License version 3.0.
// If a copy of the LGPL v3.0 was not distributed with this file, you can
// obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
// HYKOPS is subject to the terms of the GNU Lesser General Public License
// version 3.0. If a copy of the LGPL v3.0 was not distributed with this file,
// you can obtain one at https://www.gnu.org/licenses/lgpl-3.0.html.
#ifndef CURVILINEARCOORDINATESYSTEMSUPPORT_H
#define CURVILINEARCOORDINATESYSTEMSUPPORT_H
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment