forked from ruslo/hunter
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add 'occt' package * fix include order. * Build shared libs by default * dummy commit to occt... * try to install additional dependency for linux... * try with sudo... * try to source it... * debug... * debug2 * debug... * debug... * debug2 * debug3 * add osx * add another package... * bugfix * add more packages... * try freetype on osx... * build static libs by default... * fix sha * enable osx again * use an older version of osx pipeline... * remove extra comma * enable everything... * windows debug... * use latest patched occt * fix example for windows... * fix. * dummy commit to trigger ci * only release ci build on windows * fix * use latest patched occt * build windows ci unconditionally. * dummy edit to trigger build. * fix windows build of example by linking with ws2_32 * use cpp-pm repository. * remove build matrix * address change request
- Loading branch information
Showing
6 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Install additional dependencies: | ||
|
||
if [ "$(uname)" == "Darwin" ]; then | ||
# OSX | ||
: | ||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then | ||
# GNU/Linux | ||
sudo apt-get update | ||
sudo apt-get install mesa-common-dev libgl1-mesa-dev libxmu-dev libxi-dev | ||
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then | ||
# Windows x32 | ||
: | ||
elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then | ||
# Windows x64 | ||
: | ||
fi | ||
|
||
|
||
# Run normal build script: | ||
source ./.github/workflows/ci/build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) 2016-2020, Rahul Sheth, Ruslan Baratov | ||
# All rights reserved. | ||
|
||
# !!! DO NOT PLACE HEADER GUARDS HERE !!! | ||
|
||
include(hunter_add_version) | ||
include(hunter_cacheable) | ||
include(hunter_download) | ||
include(hunter_pick_scheme) | ||
include(hunter_cmake_args) | ||
|
||
hunter_add_version( | ||
PACKAGE_NAME | ||
occt | ||
VERSION | ||
7.4.0-p0 | ||
URL | ||
"https://github.com/cpp-pm/OCCT/archive/v7.4.0-p0.tar.gz" | ||
SHA1 | ||
537bb3eeaff198b1733e49e857c19429bf2f7781 | ||
) | ||
|
||
hunter_cmake_args( | ||
occt | ||
CMAKE_ARGS | ||
BUILD_MODULE_Draw=Off | ||
BUILD_DOC_Overview=Off | ||
) | ||
|
||
|
||
hunter_pick_scheme(DEFAULT url_sha1_cmake) | ||
hunter_cacheable(occt) | ||
hunter_download(PACKAGE_NAME occt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.. spelling:: | ||
|
||
occt | ||
|
||
.. index:: | ||
single: math ; occt | ||
|
||
.. _pkg.occt: | ||
|
||
occt | ||
==== | ||
OpenCascade Community Technology | ||
|
||
- `Official <https://dev.opencascade.org/>`__ | ||
- `Hunterized <https://github.com/cpp-pm/occt>`__ | ||
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/occt/CMakeLists.txt>`__ | ||
- Added by `craffael <https://github.com/craffael>`__ (`pr-295 <https://github.com/cpp-pm/hunter/pull/295>`__) | ||
|
||
.. literalinclude:: /../examples/occt/CMakeLists.txt | ||
:language: cmake | ||
:start-after: # DOCUMENTATION_START { | ||
:end-before: # DOCUMENTATION_END } | ||
|
||
.. note:: | ||
|
||
* OpenCascade consists of a number of modules. This Hunterized version supports all modules except | ||
the `Draw Test Harness <https://www.opencascade.com/doc/occt-7.4.0/overview/html/technical_overview.html#OCCT_TOVW_SECTION_8>`__. | ||
* To build shared versions of occt (recommended), please use :ref:`HUNTER_BUILD_SHARED_LIBS=ON <hunter build shared libs>` | ||
or build with :ref:`toolchain with PIC <simple toolchains>`. | ||
* On Ubuntu, make sure that you have installed the following system packages: :code:`mesa-common-dev`, :code:`libgl1-mesa-dev`, :code:`libxmu-dev`, :code:`libxi-dev` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright (c) 2016-2020, Rahul Sheth, Ruslan Baratov | ||
# All rights reserved. | ||
|
||
cmake_minimum_required(VERSION 3.2) | ||
|
||
# Emulate HunterGate: | ||
# * https://github.com/hunter-packages/gate | ||
include("../common.cmake") | ||
|
||
project(download-occt) | ||
|
||
# DOCUMENTATION_START { | ||
hunter_add_package(occt) | ||
find_package(OpenCASCADE CONFIG REQUIRED) | ||
|
||
add_executable(boo boo.cpp) | ||
target_link_libraries(boo occt::TKFillet occt::TKOffset occt::TKBool occt::TKBO occt::TKShHealing occt::TKPrim occt::TKTopAlgo occt::TKBRep occt::TKGeomAlgo occt::TKGeomBase occt::TKG3d occt::TKG2d occt::TKMath occt::TKernel) | ||
if(APPLE OR (UNIX AND NOT ANDROID)) | ||
target_link_libraries(boo pthread) | ||
elseif(WIN32) | ||
target_link_libraries(boo ws2_32) | ||
endif() | ||
# DOCUMENTATION_END } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <GC_MakeSegment.hxx> | ||
#include <gp_Pnt.hxx> | ||
#include <Standard_Failure.hxx> | ||
|
||
int main() { | ||
try { | ||
gp_Pnt a(0, 0, 0); | ||
gp_Pnt b(1, 0, 0); | ||
|
||
Handle(Geom_TrimmedCurve) edge = GC_MakeSegment(a, b); | ||
} | ||
catch (const Standard_Failure& e) { | ||
std::cout << e.GetMessageString() << std::endl; | ||
return 1; | ||
} | ||
} |