Commit Graph

141 Commits

Author SHA1 Message Date
David G Yu
287cb80619
Merge pull request #1242 from theblackunknown/cmake-config
Add CMake Config
2022-09-15 09:26:03 -07:00
David G Yu
3f054c7410 Updated cmake config export paths and target names
The cmake config export paths are now more consistent
with other vfx platform projects.

The target names are now more consistent with existing
opensubdiv static and dynamic library names.
2022-09-15 02:34:02 -07:00
David G Yu
cb1657be17 Implemented alternate Python 'stringify' tool
This simplifies build dependencies when cross-compiling
or when building multi-architecture binaries.

For backward compatibility with earlier releases, the compiled
C++ version of this tool is used when no Python interpreter is found.
2022-09-12 17:19:27 -07:00
David G Yu
d13501eeb3 Fixed broken public headers dependency
Fixes a doc build error resulting from the CMake minimum version update.
2022-09-11 18:22:41 -07:00
David G Yu
e627e4827e Updated CMake minimum version to 3.12 2022-09-09 09:11:37 -07:00
David G Yu
141cd19673
Merge branch 'dev' into dev-no-framework-option 2022-09-02 18:10:23 -07:00
MACHIZAUD Andréa
ee4d4e9f60 Add CMake Config 2022-05-09 09:41:23 +02:00
Thomas Thomassen
beb095d7e3 Add option to not generate frameworks under macOS. Ref #1236 2021-10-20 20:35:40 +02:00
Thomas Thomassen
53ee16c66c Move cmake_minimum_required to be the first thing in CMakeLists.txt. 2021-10-09 09:27:52 +02:00
David G Yu
87d2db0ffc Additional renaming fix missed in previous commit 2021-02-04 14:49:38 -08:00
David G Yu
37e8468207 Updated for rename of 'master' branch to 'release'
Documentation and build scripts have been updated
to accommodate this renaming.
2021-02-04 10:09:42 -08:00
David G Yu
84e0e3de6b
Merge pull request #1206 from thomthom/cmake-sub-project
Adjustments to CMake config for use as a sub-project.
2021-02-03 11:35:16 -08:00
David G Yu
654a539638 Fixed link dependency on dl library
This fixes a missing link dependency in the GL API Loader
on platforms like Linux that require linking with '-ldl'.
2021-02-03 10:11:00 -08:00
Thomas Thomassen
ce90f0fca7 Adjustments to CMake config for use as a sub-project. 2021-02-03 14:06:23 +01:00
David G Yu
e7dfecc3bf Additional fixes for dynamic and static linking
Updated to link the GL loader objects directly
along with the osd GPU objects for both static
and dynamic libraries.
2020-04-01 21:54:21 -07:00
David G Yu
b93725be26 Fixed static library linking on Windows
Changed the glLoader library to an object library
instead of a static library to improve generating
opensubdiv static libraries.
2020-04-01 12:13:36 -07:00
David G Yu
cb596ffb8a Added option to control building shared libraries
This adds support for the standard global option
  BUILD_SHARED_LIBS
to select whether to build shared libraries.

Note that building shared DLL libraries is still
not yet supported on Windows.
2020-03-09 17:50:49 -07:00
David G Yu
b5cdfe380b Disabled use of GLEW by default. 2020-03-06 11:37:55 -08:00
David G Yu
f3f28995a5 Enabled internal GL API loader as GLEW alternative
At build time, the preprocessor symbols: OSD_USES_GLEW or
OSD_USES_INTERNAL_GLAPILOADER determine the GL API loader
that will be used by the OSD library.
2020-03-06 11:37:55 -08:00
David G Yu
28f2574bc5 Moved GLEW dependencies to glLoader wrapper
This introduces an internal glLoader library which allows
most of the implementation to be agnostic about the
implementation of the GL loading library.  Specifically,
this removes references to the GLEW headers and libraries
from the rest of the source code and build system.
2020-03-03 17:10:30 -08:00
David G Yu
16a5c3993f Moved GL version check out of FindGLEW.cmake
This allows us to make use of this even when
we are not using GLEW.
2020-03-03 15:04:24 -08:00
David G Yu
081028ca10 Fixed CMP0054 warnings in top-level CMakeLists.txt 2020-02-24 10:59:51 -08:00
George ElKoura
92341f7c1e Prefix OpenSubdiv CMake macros
This fixes issue #1157 by adding "osd" as a prefix to public macros.
2019-08-17 16:44:30 -07:00
George ElKoura
45a03a460b Turn on C++11 in clang when building with Metal
The example code that uses Metal forces C++11 features, therefore
we have to turn it on clang so that we can enable the building of
compatible code that can be used by Metal and GL at the same time.
2019-03-09 11:42:45 -08:00
George ElKoura
08c04c9a61 Turn off CUDA deprecation warnings until addressed
As mentioned in issue #997, OpenSubdiv still uses CUDA functionality
that is being deprecated.  When warnings are treated as errors, this
can make OpenSubdiv fail to compile.  For now, we turn off these
deprecation warnings until we can address them.
2019-03-01 22:40:26 -08:00
barry
c424594625 Major step towards consistent use of include paths in source files:
- changed the main OPENSUBDIV_INCLUDE_DIR to exclude ./opensubdiv
    - updated CMakeLists.txt files in non-examples to use only this path
    - updated CMakeLists.txt files in examples to append ./opensubdiv to path
    - updated source in regression/common to use #include <opensubdiv/...>
    - updated source in examples/common to use #include <opensubdiv/...>
    - deferred source in examples to be updated on a case-by-case basis
2018-10-09 10:51:31 -07:00
David G Yu
3e640239f7 Added build options: NO_GLFW NO_GLFW_X11 2017-07-28 11:28:07 -07:00
Michael Harris
30cd2df37c Added Metal support 2017-04-19 16:49:53 -07:00
Takahito Tejima
044b25e818 Merge pull request #918 from davidgyu/dev_fix_spelling_731
Fixed spelling errors and typos in comments
2017-01-26 13:18:01 -08:00
Mike Erwin
0beb654f0b spelling
Noticed a few typos when browsing comments. Proceeded with a "manual
spell check", reading all comments and tweaking spelling, grammar,
punctuation.

Didn't bother with Hbr library.

Comments only, no functional changes.
2017-01-11 12:40:49 -08:00
Thomas Thomassen
cd6cedc1ac Added option to build using MSVC with static CRT. 2017-01-10 15:42:59 -08:00
Jeremy Cowles
ff380188e6 WIN32 Glew fixes to CMakeLists.txt
Previously, glew was forced to static linkage on windows, even when
dynamic Glew libraries were linked which would result in linker errors.

In this change, static glew libraries are detected by looking for the "s"
suffix convention on the library (though, maybe this should be handled in
the FindGlew module).
2017-01-06 09:52:19 -08:00
Nicholas Yue
1f6dc6c949 Fix find_package for zlib which requires all upper case ZLIB 2016-10-13 19:59:22 -07:00
David G Yu
838fce27ab Exposed control for Gregory derivative weight eval
The symbol OPENSUBDIV_GREGORY_EVAL_TRUE_DERIVATIVES
determines the method used to compute derivative weights
for Gregory basis patches.

Setting this symbol during CMake configuration (and
hence during C++ and shader compilation) will enable
the use of true derivative weights.

The default behavior is to use a simpler approximation
for consistency with earlier releases.
2016-10-11 18:50:25 -07:00
David G Yu
c824dc34e0 Fixed CUDA build with newer SDKs
Recent CUDA SDKs no longer support the "compute_11"
gpu architecture. We now fallback to "compute_20"
instead for newer SDK versions. Additionally, this
behavior can be overriden using the new CMake list
variable OSD_CUDA_NVCC_FLAGS so that it is easier
for clients to target newer architectures and specify
additional arguments.
2016-09-29 21:04:42 -07:00
David G Yu
8babf1e12b Removed mayaPolySmooth example
Also removed the remaining Maya dependencies. These
were most useful during the early days of OpenSubdiv.
Now OpenSubdiv has been integrated directly into Maya
and these examples serve little purpose.
2016-09-06 17:08:05 -07:00
George ElKoura
d856975ef3 No longer use CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR
As mentioned in issue #814, avoiding the use of CMAKE_SOURCE_DIR makes it easier to integrate OpenSubdiv as a submodule in other projects.

Fixes #814.
2016-07-08 22:45:33 -07:00
David G. Yu
cf0c75cc4f iso-646 fix remove obsolete compiler defines
Fixes #779
2016-07-07 12:31:48 -07:00
Thomas Thomassen
aa0599b4bc Merge branch 'dev'
Conflicts:
	opensubdiv/far/patchTableFactory.cpp
2016-06-24 23:30:44 +02:00
George ElKoura
923d60ca74 Use cmake's folder feature on platforms that support it.
We now make use of folders where they are supported.  In particular, on Visual Studio, this produces much nicer solutions to navigate.
2016-06-09 17:04:26 -07:00
Thomas Thomassen
c422a79031 Rename and, or and not to &&, || and ! to address compilers that don't support them out of the box without extra headers. 2016-02-21 15:47:11 +01:00
manuelk
4926fd2c3e Ptex fixes:
- fix build compiling & linking to accomodate recent code churn in Ptex
- fix FindPTex.cmake module to correctly extract version number
- fix dxPtexViewer & glPtexViewer source to compile with new Ptex namespace changes
- add alpha channel padding function to ptexMipmapLoader as a workaround to the absence of 3-channel DXGI formats
- mirror ptex memory limit function from glPtexViewer to dxPtexViewer
2016-02-19 16:58:56 -08:00
manuelk
423d7eff79 Comment out CMake logic that attempts to copy glfw3 dll's, which fails in some cases.
Fixes #774
2016-01-13 11:47:24 -08:00
manuelk
6a19a2aeec Make sure Windows DLL dependencies exist before trying to copy them (some may be static libs)
Fixes #768
2015-12-18 15:12:15 -08:00
David G Yu
e897a1c0e5 Merge pull request #702 from daz3d/cmake_error_on_no_gpu
Fixes cmake projects for non-gpu use case
2015-08-04 08:00:58 -07:00
Takahito Tejima
e84acde258 cmakefile: degrade the gcc version error to warning. 2015-07-30 10:24:25 -07:00
Takahito Tejima
8a8771c97d Revert "Add ISPC limit surface evaluation" 2015-07-20 17:13:51 -07:00
Sheng Fu
d3f8725e79 Add ISPC limit surface evaluation 2015-07-20 14:12:11 -07:00
Christopher Jones
87dc09e769 Fix cmake projects to not require GLFW when NO_OPENGL provided and not build gpu lib if not needed. 2015-07-15 23:55:14 -06:00
Takahito Tejima
5c54962d3b Improve OpenCL/DX interop configuration
build osd and examples with DX/CL interop only of cmake finds
cl_d3d11.h or cl_d3d11_ext.h.
2015-06-02 16:20:59 -07:00