Imported Upstream version 0.13.2+dsfg1
This commit is contained in:
commit
fb3990e9e5
2036 changed files with 287360 additions and 0 deletions
10
.gitattributes
vendored
Normal file
10
.gitattributes
vendored
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
*.sln text eol=crlf
|
||||||
|
*.vcproj text eol=crlf
|
||||||
|
*.vcxproj text eol=crlf
|
||||||
|
*.vcxproj text eol=crlf
|
||||||
|
*.vcxproj.filters text eol=crlf
|
||||||
|
|
||||||
|
cmake/ALL_BUILD.vcxproj.user.in text eol=crlf
|
||||||
|
|
86
.gitignore
vendored
Normal file
86
.gitignore
vendored
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
#binaries
|
||||||
|
*.exe
|
||||||
|
*.dll
|
||||||
|
*.dylib
|
||||||
|
*.so
|
||||||
|
|
||||||
|
#cmake
|
||||||
|
/cmbuild/
|
||||||
|
/build/
|
||||||
|
/build32/
|
||||||
|
/build64/
|
||||||
|
/release/
|
||||||
|
/release32/
|
||||||
|
/release64/
|
||||||
|
/debug/
|
||||||
|
/debug32/
|
||||||
|
/debug64/
|
||||||
|
/builds/
|
||||||
|
*.o.d
|
||||||
|
*.ninja
|
||||||
|
.ninja*
|
||||||
|
.dirstamp
|
||||||
|
|
||||||
|
#xcode
|
||||||
|
*.xcodeproj/
|
||||||
|
|
||||||
|
#other stuff (windows stuff, qt moc stuff, etc)
|
||||||
|
Release_MD/
|
||||||
|
Release/
|
||||||
|
Debug/
|
||||||
|
x64/
|
||||||
|
ipch/
|
||||||
|
GeneratedFiles/
|
||||||
|
.moc/
|
||||||
|
|
||||||
|
/other/
|
||||||
|
|
||||||
|
#make stuff
|
||||||
|
configure
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
Makefile.in
|
||||||
|
Makefile
|
||||||
|
|
||||||
|
#random useless file stuff
|
||||||
|
*.dmg
|
||||||
|
*.app
|
||||||
|
.DS_Store
|
||||||
|
.directory
|
||||||
|
.hg
|
||||||
|
.depend
|
||||||
|
tags
|
||||||
|
*.trace
|
||||||
|
*.vsp
|
||||||
|
*.psess
|
||||||
|
*.swp
|
||||||
|
*.dat
|
||||||
|
*.clbin
|
||||||
|
*.log
|
||||||
|
*.tlog
|
||||||
|
*.sdf
|
||||||
|
*.opensdf
|
||||||
|
*.xml
|
||||||
|
*.ipch
|
||||||
|
*.css
|
||||||
|
*.xslt
|
||||||
|
*.aps
|
||||||
|
*.suo
|
||||||
|
*.ncb
|
||||||
|
*.user
|
||||||
|
*.lo
|
||||||
|
*.ilk
|
||||||
|
*.la
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
*.pdb
|
||||||
|
*.res
|
||||||
|
*.manifest
|
||||||
|
*.dep
|
||||||
|
*.zip
|
||||||
|
*.lnk
|
||||||
|
*.chm
|
||||||
|
*~
|
||||||
|
.DS_Store
|
||||||
|
*/.DS_Store
|
||||||
|
*/**/.DS_Store
|
7
.gitmodules
vendored
Normal file
7
.gitmodules
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[submodule "plugins/win-dshow/libdshowcapture"]
|
||||||
|
path = plugins/win-dshow/libdshowcapture
|
||||||
|
url = https://github.com/jp9000/libdshowcapture.git
|
||||||
|
|
||||||
|
[submodule "plugins/mac-syphon/syphon-framework"]
|
||||||
|
path = plugins/mac-syphon/syphon-framework
|
||||||
|
url = https://github.com/palana/Syphon-Framework.git
|
5
.mailmap
Normal file
5
.mailmap
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Jim <obs.jim@gmail.com>
|
||||||
|
Zachary Lund <admin@computerquip.com>
|
||||||
|
Benjamin Klettbach <b.klettbach@gmail.com>
|
||||||
|
BtbN <btbn@btbn.de>
|
||||||
|
John Bradley <jrb@turrettech.com>
|
108
CMakeLists.txt
Normal file
108
CMakeLists.txt
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
cmake_minimum_required(VERSION 2.8.12)
|
||||||
|
|
||||||
|
project(obs-studio)
|
||||||
|
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||||
|
|
||||||
|
include(ObsHelpers)
|
||||||
|
include(ObsCpack)
|
||||||
|
|
||||||
|
if(MSVC AND NOT EXISTS "${CMAKE_BINARY_DIR}/ALL_BUILD.vcxproj.user")
|
||||||
|
file(GENERATE
|
||||||
|
OUTPUT "${CMAKE_BINARY_DIR}/ALL_BUILD.vcxproj.user"
|
||||||
|
INPUT "${CMAKE_SOURCE_DIR}/cmake/ALL_BUILD.vcxproj.user.in")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE RelWithDebInfo)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(CXX11 REQUIRED)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}")
|
||||||
|
|
||||||
|
if(${CMAKE_C_COMPILER_ID} MATCHES "Clang" OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||||
|
set(CMAKE_COMPILER_IS_CLANG TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
|
||||||
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-field-initializers ${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
|
||||||
|
set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-braces -Wno-missing-field-initializers ${CMAKE_C_FLAGS} -std=gnu99 -fno-strict-aliasing")
|
||||||
|
|
||||||
|
option(USE_LIBC++ "Use libc++ instead of libstdc++" ${APPLE})
|
||||||
|
if(USE_LIBC++)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||||
|
endif()
|
||||||
|
elseif(MSVC)
|
||||||
|
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||||
|
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
|
else()
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Disable pointless constant condition warnings
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4127 /wd4201")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_definitions(-DUNICODE -D_UNICODE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set(CMAKE_C_FLAGS_DEBUG "/DDEBUG=1 /D_DEBUG=1 ${CMAKE_C_FLAGS_DEBUG}")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "/DDEBUG=1 /D_DEBUG=1 ${CMAKE_C_FLAGS_DEBUG}")
|
||||||
|
|
||||||
|
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
|
||||||
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if(MINGW)
|
||||||
|
set(CMAKE_WIDL "widl" CACHE STRING "wine IDL header file generation program")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0600 -DWINVER=0x0600")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0600 -DWINVER=0x0600")
|
||||||
|
endif()
|
||||||
|
set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=1 -D_DEBUG=1 ${CMAKE_C_FLAGS_DEBUG}")
|
||||||
|
set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG=1 -D_DEBUG=1 ${CMAKE_C_FLAGS_DEBUG}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
set(CMAKE_MACOSX_RPATH TRUE)
|
||||||
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||||
|
list(APPEND CMAKE_INSTALL_RPATH "@loader_path/" "@executable_path/")
|
||||||
|
elseif(UNIX)
|
||||||
|
option(USE_XDG "Utilize XDG Base Directory Specification" ON)
|
||||||
|
if(USE_XDG)
|
||||||
|
add_definitions(-DUSE_XDG)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT UNIX_STRUCTURE)
|
||||||
|
list(APPEND CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(BUILD_TESTS "Build test directory (includes test sources and possibly a platform test executable)" FALSE)
|
||||||
|
mark_as_advanced(BUILD_TESTS)
|
||||||
|
|
||||||
|
if(NOT INSTALLER_RUN)
|
||||||
|
add_subdirectory(deps)
|
||||||
|
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_subdirectory(libobs-d3d11)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(libobs-opengl)
|
||||||
|
add_subdirectory(libobs)
|
||||||
|
add_subdirectory(obs)
|
||||||
|
add_subdirectory(plugins)
|
||||||
|
if (BUILD_TESTS)
|
||||||
|
add_subdirectory(test)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(cmake/helper_subdir)
|
||||||
|
else()
|
||||||
|
obs_generate_multiarch_installer()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(CopyMSVCBins)
|
61
CONTRIBUTING
Normal file
61
CONTRIBUTING
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
Contributing Information:
|
||||||
|
|
||||||
|
- Our bug tracker is located at (currently linked to forum accounts):
|
||||||
|
https://obsproject.com/mantis/
|
||||||
|
|
||||||
|
- Development forums are currently located at:
|
||||||
|
https://obsproject.com/forum/list/general-development.21/
|
||||||
|
|
||||||
|
- Development IRC channel is primarily #obs-dev on QuakeNet
|
||||||
|
|
||||||
|
|
||||||
|
Contributing Guidelines:
|
||||||
|
|
||||||
|
- Code and commits will be reviewed. Reviews will be blunt and honest, and
|
||||||
|
your change probably won't go through the first time, or may be outright
|
||||||
|
rejected. It may require many revisions before changes are finally
|
||||||
|
accepted.
|
||||||
|
|
||||||
|
- If you want to avoid doing a lot of work only to have it rejected, discuss
|
||||||
|
what you want to change it in the main channels/forums/mailing lists before
|
||||||
|
actually working on it. Open source requires thick skin. Please don't be
|
||||||
|
discouraged if your changes don't go through, learn from it and get better.
|
||||||
|
|
||||||
|
- Coding style is Linux-style KNF (kernel normal form). This means K&R, 80
|
||||||
|
columns max, preferable maximum function length of approximately 42 lines, 8
|
||||||
|
character width tabs, lower_case_names, etc. I chose this for the sake of
|
||||||
|
the project. Don't argue about it, just do it. It takes no time to do.
|
||||||
|
|
||||||
|
See https://www.kernel.org/doc/Documentation/CodingStyle for a general
|
||||||
|
guideline (though not necessarily a rulebook, for example we allow the use
|
||||||
|
of boolean return values instead of ints for failure).
|
||||||
|
|
||||||
|
NOTE: C++ is an exception to the lower_case_only rule, CamelCase is
|
||||||
|
encouraged (though not required) to distinguish it from C code. Just a
|
||||||
|
personal and subjective stylistic thing on my part.
|
||||||
|
|
||||||
|
- Commits are not just changes to code; they should also be treated as
|
||||||
|
annotation to code. For that reason, do not put unrelated changes in a
|
||||||
|
single commit. Separate out different changes in to different commits, and
|
||||||
|
make separate pull requests for unrelated changes. Commits should be
|
||||||
|
formatted with the 50/72 standard, and should be descriptive and concise.
|
||||||
|
See http://chris.beams.io/posts/git-commit/ for a summary of how to make
|
||||||
|
good commit messages.
|
||||||
|
|
||||||
|
- Core code is C only (unless there's an operating system specific thing that
|
||||||
|
absolutely requires another language).
|
||||||
|
|
||||||
|
- Modules and UI may use C, C++, or Objective-C (for apple), though please try
|
||||||
|
to use C unless an API you're using requires C++ or Objective-C (such as
|
||||||
|
windows COM classes, or apple Objective-C APIs).
|
||||||
|
|
||||||
|
- If you don't quite know what to work on and just want to help, the bug
|
||||||
|
tracker has a list of things that need to be worked on.
|
||||||
|
|
||||||
|
- Try to respect the wishes of the author(s)/maintainer(s). A good maintainer
|
||||||
|
will always listen, and will often ask others on the project for their
|
||||||
|
opinions, but don't expect things to be completely democratic.
|
||||||
|
|
||||||
|
- Do not use dependencies for the sake of convenience. There's enough
|
||||||
|
dependencies as it is. Use them only if you absolutely have to depend on
|
||||||
|
them.
|
340
COPYING
Normal file
340
COPYING
Normal file
|
@ -0,0 +1,340 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU 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 General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
1
INSTALL
Normal file
1
INSTALL
Normal file
|
@ -0,0 +1 @@
|
||||||
|
For install instructions please visit https://github.com/jp9000/obs-studio/wiki/Install-Instructions
|
174
README
Normal file
174
README
Normal file
|
@ -0,0 +1,174 @@
|
||||||
|
|
||||||
|
What is OBS?
|
||||||
|
|
||||||
|
This project is a rewrite of what was formerly known as "Open Broadcaster
|
||||||
|
Software", software originally designed for recording and streaming live
|
||||||
|
video content, efficiently.
|
||||||
|
|
||||||
|
Bug Tracker: https://obsproject.com/mantis/
|
||||||
|
|
||||||
|
We are no longer using GitHub issues! Please use Mantis, and only report
|
||||||
|
bugs and major issues. Do NOT use mantis to ask questions or request
|
||||||
|
features, please keep that to the forums.
|
||||||
|
|
||||||
|
Forum accounts are now linked to Mantis Bug Tracker. To use the bug
|
||||||
|
tracker, simply log in to the forums and then go to the bug tracker link
|
||||||
|
above.
|
||||||
|
|
||||||
|
What's the goal of rewriting OBS?
|
||||||
|
|
||||||
|
- Make it multiplatform. Use multiplatform libraries/functions/classes where
|
||||||
|
possible to allow this. Multi-platform support was one of the primary
|
||||||
|
reasons for the rewrite. This also means using a UI toolkit will be
|
||||||
|
necessary for user interface. It also means allowing the use of OpenGL as
|
||||||
|
well as Direct3D.
|
||||||
|
|
||||||
|
- Separate the application from the core, allowing custom application of
|
||||||
|
the core if desired, and easier extending of the user interface.
|
||||||
|
|
||||||
|
- Simplify complex systems to not only make it easier to use, but easier to
|
||||||
|
maintain.
|
||||||
|
|
||||||
|
- Write a better core API, and design the entire system to be modular.
|
||||||
|
|
||||||
|
- Now that we have much more experience, improve the overall design of all
|
||||||
|
the subsystems/API, and minimize/eliminate design flaws. Make it so we can
|
||||||
|
do all the things we've had trouble with before, such as custom outputs,
|
||||||
|
multiple outputs at once, better handling of inputs, custom services.
|
||||||
|
|
||||||
|
- Make a better/cleaner code base, use better coding standards, use standard
|
||||||
|
libraries where possible (not just STL and C standard library, but also
|
||||||
|
things like ffmpeg as well), and improve maintainability of the project as a
|
||||||
|
whole.
|
||||||
|
|
||||||
|
- Implement a new API-independent shader/effect system allowing better and
|
||||||
|
easier shaders usage and customization without having to duplicate shader
|
||||||
|
code.
|
||||||
|
|
||||||
|
- Better device support. Again, I didn't know what I was getting into when
|
||||||
|
I originally started writing code for devices. It evolved into a totally
|
||||||
|
convoluted mess. I would have improved the existing device plugin code, but
|
||||||
|
it was just all so fundamentally bad and flawed that it would have been
|
||||||
|
detrimental to progression to continue working on it rather than rewrite it.
|
||||||
|
|
||||||
|
|
||||||
|
What was wrong with the original OBS?
|
||||||
|
|
||||||
|
The original OBS was rewritten not because it was bad, at least in terms of
|
||||||
|
optimization. Optimization and graphics are things I love. However, there
|
||||||
|
were some serious problems with the code and design that were deep and
|
||||||
|
fundamental, which prevented myself and other developers from being able to
|
||||||
|
improve/extend the application or add new features very easily.
|
||||||
|
|
||||||
|
First, the design flaws:
|
||||||
|
|
||||||
|
- The original OBS was completely and hopelessly hard-coded for windows,
|
||||||
|
and only windows. It was just totally impossible to use it on other
|
||||||
|
systems.
|
||||||
|
|
||||||
|
- All the sub-systems were written before I really knew what I was getting
|
||||||
|
into. When I started the project, I didn't really fully comprehend the
|
||||||
|
scope of what I would need or how to properly design the project. My
|
||||||
|
design and plans for the application were just to write something that
|
||||||
|
would "stream games and a webcam, with things like overlays and such."
|
||||||
|
This turned out fine for most casual gamers and streamers (and very
|
||||||
|
successful), but left anyone wanting to do anything more advanced left
|
||||||
|
massively wanting.
|
||||||
|
|
||||||
|
- Subsystems and core functionalities intermingled in such a way that it
|
||||||
|
was a nightmare to get proper custom functionality out of it. Things
|
||||||
|
like QSV had to be meshed in with the main encoding loop, and it just
|
||||||
|
made things a nightmare to deal with. Custom outputs were nigh
|
||||||
|
impossible.
|
||||||
|
|
||||||
|
- The API was poorly designed because most of it came after I originally
|
||||||
|
wrote the application, it was more of an afterthought, and plugin API
|
||||||
|
would routinely break for plugin developers due to changing C++
|
||||||
|
interfaces (one of the reasons the core is now C).
|
||||||
|
|
||||||
|
- API was intermeshed with the main executable. The OBSApi DLL was
|
||||||
|
nothing more than basically this mutant growth upon OBS.exe that allowed
|
||||||
|
plugin developers to barely write plugins, but all the important API
|
||||||
|
code was actually stored in the executable. Navigation was a total mess.
|
||||||
|
|
||||||
|
- The graphics subsystem, while not bad, was incomplete, and though far
|
||||||
|
easier to use than bare D3D, wasn't ideal, and was hard-coded for D3D
|
||||||
|
specifically.
|
||||||
|
|
||||||
|
- The devices and audio code was poor, I had no idea what I was getting into
|
||||||
|
when I started writing them in. I did not realize beforehand all the
|
||||||
|
device-specific quirks that each device/system could have. Some devices
|
||||||
|
had bad timing and quirks that I never aniticipated while writing them.
|
||||||
|
I struggled with devices, and my original design for the audio subsystem
|
||||||
|
for example morphed over and over into an abomination that, though works,
|
||||||
|
is basically this giant duct-taped zombie monster.
|
||||||
|
|
||||||
|
- Shaders were difficult to customize because they had to be duplicated if
|
||||||
|
you wanted slightly different functionality that required more than just
|
||||||
|
changing shader constants.
|
||||||
|
|
||||||
|
- Orientation of sources was fixed, and required special code for each
|
||||||
|
source to do any custom modification of rotation/position/scale/etc.
|
||||||
|
This is one of those fundamental flaws that I look back on and regret, as
|
||||||
|
it was a stupid idea from the beginning. I originally thought I could
|
||||||
|
get more accurate source position/sizes, but it just turned out to be
|
||||||
|
totally bad. Should have been matrices from the beginning just like with
|
||||||
|
a regular 3D engine.
|
||||||
|
|
||||||
|
Second, the coding flaws:
|
||||||
|
|
||||||
|
- The coding style was inconsistent.
|
||||||
|
|
||||||
|
- C++98, C-Style C++, there was no exception usage, no STL. C++ used
|
||||||
|
poorly.
|
||||||
|
|
||||||
|
- Not Invented Here Syndrome everywhere. Custom string functions/classes,
|
||||||
|
custom templates, custom everything everywhere. To be fair, it was all
|
||||||
|
hand-me-down code from the early 2000s that I had become used to, but
|
||||||
|
that was no excuse -- C-standard libraries and the STL should have been
|
||||||
|
used from the beginning over anything else. That doesn't mean to say
|
||||||
|
that using custom stuff is always bad, but doing it to the extent I did
|
||||||
|
definitely was. Made it horrible to maintain as well, required extra
|
||||||
|
knowledge for plugin developers and anyone messing with the code.
|
||||||
|
|
||||||
|
- Giant monolithic classes everywhere, the main OBS class was paricularly
|
||||||
|
bad in this regard. This meant navigation was a nightmare, and no one
|
||||||
|
really knew where to go or where to add/change things.
|
||||||
|
|
||||||
|
- Giant monolithic functions everywhere. This was particularly bad
|
||||||
|
because it meant that functions became harder to debug and harder to
|
||||||
|
keep track of what was going on in any particular function at any given
|
||||||
|
time. These large functions, though not inefficient, were delicate and
|
||||||
|
easily breakable. (See OBS::MainCaptureLoop for a nightmarish example,
|
||||||
|
or the listbox subclass window procedure in WindowStuff.cpp)
|
||||||
|
|
||||||
|
- Very large file sizes with everything clumped up into single files (for
|
||||||
|
another particularly nightmarish example, see WindowStuff.cpp)
|
||||||
|
|
||||||
|
- Bad formatting. Code could go beyond 200 columns in some cases, making
|
||||||
|
it very unpleasant to read with many editors. Spaces instead of tabs,
|
||||||
|
K&R mixed with allman (which was admittedly my fault).
|
||||||
|
|
||||||
|
|
||||||
|
New (actual) coding guidelines
|
||||||
|
|
||||||
|
- For the C code (especially in the core), guidelines are pretty strict K&R,
|
||||||
|
kernel style. See the linux kernel "CodingStyle" document for more
|
||||||
|
information. That particular coding style guideline is for more than just
|
||||||
|
style, it actually helps produce a better overall code base.
|
||||||
|
|
||||||
|
- For C++ code, I still use CamelCase instead of all_lowercase just because
|
||||||
|
I prefer it that way, it feels right with C++ for some reason. It also
|
||||||
|
helps make it distinguishable from C code.
|
||||||
|
|
||||||
|
- I've started using 8-column tabs for almost everything -- I really
|
||||||
|
personally like it over 4-column tabs. I feel that 8-column tabs are very
|
||||||
|
helpful in preventing large amounts of indentation. A self-imposed
|
||||||
|
limitation, if you will. I also use actual tabs now, instead of spaces.
|
||||||
|
Also, I feel that the K&R style looks much better/cleaner when viewed with
|
||||||
|
8-column tabs.
|
||||||
|
|
||||||
|
- Preferred maximum columns: 80. I've also been doing this because in
|
||||||
|
combination with 8-column tabs, it further prevents large/bad functions
|
||||||
|
with high indentation. Another self-imposed limitation. Also, it makes
|
||||||
|
for much cleaner viewing in certain editors that wrap (like vim).
|
16
additional_install_files/.gitignore
vendored
Normal file
16
additional_install_files/.gitignore
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
||||||
|
!data/
|
||||||
|
!exec32/
|
||||||
|
!exec32r/
|
||||||
|
!exec32d/
|
||||||
|
!exec64/
|
||||||
|
!exec64r/
|
||||||
|
!exec64d/
|
||||||
|
!libs32/
|
||||||
|
!libs32r/
|
||||||
|
!libs32d/
|
||||||
|
!libs64/
|
||||||
|
!libs64r/
|
||||||
|
!libs64d/
|
||||||
|
!misc/
|
2
additional_install_files/data/.gitignore
vendored
Normal file
2
additional_install_files/data/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/exec32/.gitignore
vendored
Normal file
2
additional_install_files/exec32/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/exec32d/.gitignore
vendored
Normal file
2
additional_install_files/exec32d/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/exec32r/.gitignore
vendored
Normal file
2
additional_install_files/exec32r/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/exec64/.gitignore
vendored
Normal file
2
additional_install_files/exec64/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/exec64d/.gitignore
vendored
Normal file
2
additional_install_files/exec64d/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/exec64r/.gitignore
vendored
Normal file
2
additional_install_files/exec64r/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/libs32/.gitignore
vendored
Normal file
2
additional_install_files/libs32/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/libs32d/.gitignore
vendored
Normal file
2
additional_install_files/libs32d/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/libs32r/.gitignore
vendored
Normal file
2
additional_install_files/libs32r/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/libs64/.gitignore
vendored
Normal file
2
additional_install_files/libs64/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/libs64d/.gitignore
vendored
Normal file
2
additional_install_files/libs64d/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/libs64r/.gitignore
vendored
Normal file
2
additional_install_files/libs64r/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/misc/.gitignore
vendored
Normal file
2
additional_install_files/misc/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*
|
||||||
|
!.gitignore
|
43
cmake/ALL_BUILD.vcxproj.user.in
Normal file
43
cmake/ALL_BUILD.vcxproj.user.in
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
|
||||||
|
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe</LocalDebuggerCommand>
|
||||||
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\64bit</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe</LocalDebuggerCommand>
|
||||||
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\64bit</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe</LocalDebuggerCommand>
|
||||||
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\64bit</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|x64'">
|
||||||
|
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe</LocalDebuggerCommand>
|
||||||
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\64bit</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
|
||||||
|
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe</LocalDebuggerCommand>
|
||||||
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\32bit</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe</LocalDebuggerCommand>
|
||||||
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\32bit</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe</LocalDebuggerCommand>
|
||||||
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\32bit</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='MinSizeRel|Win32'">
|
||||||
|
<LocalDebuggerCommand>$(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe</LocalDebuggerCommand>
|
||||||
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)rundir\$(Configuration)\bin\32bit</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
38
cmake/Modules/CheckForPthreads.c
Normal file
38
cmake/Modules/CheckForPthreads.c
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
void* runner(void*);
|
||||||
|
|
||||||
|
int res = 0;
|
||||||
|
#ifdef __CLASSIC_C__
|
||||||
|
int main(){
|
||||||
|
int ac;
|
||||||
|
char*av[];
|
||||||
|
#else
|
||||||
|
int main(int ac, char*av[]){
|
||||||
|
#endif
|
||||||
|
pthread_t tid[2];
|
||||||
|
pthread_create(&tid[0], 0, runner, (void*)1);
|
||||||
|
pthread_create(&tid[1], 0, runner, (void*)2);
|
||||||
|
|
||||||
|
#if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.)
|
||||||
|
usleep(1); // for strange behavior on single-processor sun
|
||||||
|
#endif
|
||||||
|
|
||||||
|
pthread_join(tid[0], 0);
|
||||||
|
pthread_join(tid[1], 0);
|
||||||
|
if(ac > 1000){return *av[0];}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* runner(void* args)
|
||||||
|
{
|
||||||
|
int cc;
|
||||||
|
for ( cc = 0; cc < 10; cc ++ )
|
||||||
|
{
|
||||||
|
printf("%d CC: %d\n", (int)args, cc);
|
||||||
|
}
|
||||||
|
res ++;
|
||||||
|
return 0;
|
||||||
|
}
|
243
cmake/Modules/CopyMSVCBins.cmake
Normal file
243
cmake/Modules/CopyMSVCBins.cmake
Normal file
|
@ -0,0 +1,243 @@
|
||||||
|
# Doesn't realy make sense anywhere else
|
||||||
|
if(NOT MSVC)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Internal variable to avoid copying more than once
|
||||||
|
if(COPIED_DEPENDENCIES)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(COPY_DEPENDENCIES "Automaticaly try copying all dependencies" OFF)
|
||||||
|
if(NOT COPY_DEPENDENCIES)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_bin_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_bin_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(Libavcodec QUIET)
|
||||||
|
find_package(Libx264 QUIET)
|
||||||
|
find_package(Libfdk QUIET)
|
||||||
|
find_package(ssl QUIET)
|
||||||
|
find_package(Qt5Core QUIET)
|
||||||
|
|
||||||
|
file(GLOB FFMPEG_BIN_FILES
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin/avcodec-*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin${_bin_suffix}/avcodec-*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin${_bin_suffix}/avcodec-*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_avformat_INCLUDE_DIR}/../bin/avformat-*.dll"
|
||||||
|
"${FFMPEG_avformat_INCLUDE_DIR}/../bin${_bin_suffix}/avformat-*.dll"
|
||||||
|
"${FFMPEG_avformat_INCLUDE_DIR}/bin${_bin_suffix}/avformat-*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_avutil_INCLUDE_DIR}/../bin/avutil-*.dll"
|
||||||
|
"${FFMPEG_avutil_INCLUDE_DIR}/../bin${_bin_suffix}/avutil-*.dll"
|
||||||
|
"${FFMPEG_avutil_INCLUDE_DIR}/bin${_bin_suffix}/avutil-*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_avdevice_INCLUDE_DIR}/../bin/avdevice-*.dll"
|
||||||
|
"${FFMPEG_avdevice_INCLUDE_DIR}/../bin${_bin_suffix}/avdevice-*.dll"
|
||||||
|
"${FFMPEG_avdevice_INCLUDE_DIR}/bin${_bin_suffix}/avdevice-*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_avfilter_INCLUDE_DIR}/../bin/avfilter-*.dll"
|
||||||
|
"${FFMPEG_avfilter_INCLUDE_DIR}/../bin${_bin_suffix}/avfilter-*.dll"
|
||||||
|
"${FFMPEG_avfilter_INCLUDE_DIR}/bin${_bin_suffix}/avfilter-*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_postproc_INCLUDE_DIR}/../bin/postproc-*.dll"
|
||||||
|
"${FFMPEG_postproc_INCLUDE_DIR}/../bin${_bin_suffix}/postproc-*.dll"
|
||||||
|
"${FFMPEG_postproc_INCLUDE_DIR}/bin${_bin_suffix}/postproc-*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_swscale_INCLUDE_DIR}/../bin/swscale-*.dll"
|
||||||
|
"${FFMPEG_swscale_INCLUDE_DIR}/bin${_bin_suffix}/swscale-*.dll"
|
||||||
|
"${FFMPEG_swscale_INCLUDE_DIR}/../bin${_bin_suffix}/swscale-*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_swresample_INCLUDE_DIR}/../bin/swresample-*.dll"
|
||||||
|
"${FFMPEG_swresample_INCLUDE_DIR}/../bin${_bin_suffix}/swresample-*.dll"
|
||||||
|
"${FFMPEG_swresample_INCLUDE_DIR}/bin${_bin_suffix}/swresample-*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin/libopus*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin/opus*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin/libopus*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin/opus*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin/libogg*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin/libvorbis*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin/libogg*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin/libvorbis*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin${_bin_suffix}/libopus*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin${_bin_suffix}/opus*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin${_bin_suffix}/libopus*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin${_bin_suffix}/opus*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin/libbz2*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin/zlib*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin/libbz2*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin/zlib*.dll"
|
||||||
|
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin${_bin_suffix}/libbz2*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/../bin${_bin_suffix}/zlib*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin${_bin_suffix}/libbz2*.dll"
|
||||||
|
"${FFMPEG_avcodec_INCLUDE_DIR}/bin${_bin_suffix}/zlib*.dll"
|
||||||
|
)
|
||||||
|
|
||||||
|
file(GLOB X264_BIN_FILES
|
||||||
|
"${X264_INCLUDE_DIR}/../bin${_bin_suffix}/libx264-*.dll"
|
||||||
|
"${X264_INCLUDE_DIR}/../bin/libx264-*.dll"
|
||||||
|
"${X264_INCLUDE_DIR}/bin/libx264-*.dll"
|
||||||
|
"${X264_INCLUDE_DIR}/bin${_bin_suffix}/libx264-*.dll")
|
||||||
|
|
||||||
|
file(GLOB FREETYPE_BIN_FILES
|
||||||
|
"${FREETYPE_INCLUDE_DIR_ft2build}/../../bin${_bin_suffix}/libfreetype*-*.dll"
|
||||||
|
"${FREETYPE_INCLUDE_DIR_ft2build}/../../bin/libfreetype*-*.dll"
|
||||||
|
"${FREETYPE_INCLUDE_DIR_ft2build}/../bin${_bin_suffix}/libfreetype*-*.dll"
|
||||||
|
"${FREETYPE_INCLUDE_DIR_ft2build}/../bin/libfreetype*-*.dll"
|
||||||
|
"${FREETYPE_INCLUDE_DIR_ft2build}/bin/libfreetype*-*.dll"
|
||||||
|
"${FREETYPE_INCLUDE_DIR_ft2build}/bin${_bin_suffix}/libfreetype*-*.dll")
|
||||||
|
|
||||||
|
file(GLOB LIBFDK_BIN_FILES
|
||||||
|
"${Libfdk_INCLUDE_DIR}/../bin${_bin_suffix}/libfdk*-*.dll"
|
||||||
|
"${Libfdk_INCLUDE_DIR}/../bin/libfdk*-*.dll"
|
||||||
|
"${Libfdk_INCLUDE_DIR}/bin/libfdk*-*.dll"
|
||||||
|
"${Libfdk_INCLUDE_DIR}/bin${_bin_suffix}/libfdk*-*.dll")
|
||||||
|
|
||||||
|
file(GLOB SSL_BIN_FILES
|
||||||
|
"${SSL_INCLUDE_DIR}/../bin${_bin_suffix}/ssleay32*.dll"
|
||||||
|
"${SSL_INCLUDE_DIR}/../bin${_bin_suffix}/libeay32*.dll"
|
||||||
|
"${SSL_INCLUDE_DIR}/../bin/ssleay32*.dll"
|
||||||
|
"${SSL_INCLUDE_DIR}/../bin/libeay32*.dll"
|
||||||
|
"${SSL_INCLUDE_DIR}/bin${_bin_suffix}/ssleay32*.dll"
|
||||||
|
"${SSL_INCLUDE_DIR}/bin${_bin_suffix}/libeay32*.dll"
|
||||||
|
"${SSL_INCLUDE_DIR}/bin/ssleay32*.dll"
|
||||||
|
"${SSL_INCLUDE_DIR}/bin/libeay32*.dll")
|
||||||
|
|
||||||
|
file(GLOB CURL_BIN_FILES
|
||||||
|
"${CURL_INCLUDE_DIR}/../build/Win${_bin_suffix}/VC12/DLL Release - DLL Windows SSPI/libcurl.dll"
|
||||||
|
"${CURL_INCLUDE_DIR}/../bin${_bin_suffix}/libcurl*.dll"
|
||||||
|
"${CURL_INCLUDE_DIR}/../bin${_bin_suffix}/curl*.dll"
|
||||||
|
"${CURL_INCLUDE_DIR}/../bin/libcurl*.dll"
|
||||||
|
"${CURL_INCLUDE_DIR}/../bin/curl*.dll"
|
||||||
|
"${CURL_INCLUDE_DIR}/bin${_bin_suffix}/libcurl*.dll"
|
||||||
|
"${CURL_INCLUDE_DIR}/bin${_bin_suffix}/curl*.dll"
|
||||||
|
"${CURL_INCLUDE_DIR}/bin/libcurl*.dll"
|
||||||
|
"${CURL_INCLUDE_DIR}/bin/curl*.dll"
|
||||||
|
)
|
||||||
|
|
||||||
|
if (ZLIB_LIB)
|
||||||
|
GET_FILENAME_COMPONENT(ZLIB_BIN_PATH ${ZLIB_LIB} PATH)
|
||||||
|
endif()
|
||||||
|
file(GLOB ZLIB_BIN_FILES
|
||||||
|
"${ZLIB_BIN_PATH}/zlib*.dll")
|
||||||
|
|
||||||
|
if (NOT ZLIB_BIN_FILES)
|
||||||
|
file(GLOB ZLIB_BIN_FILES
|
||||||
|
"${ZLIB_INCLUDE_DIR}/../bin${_bin_suffix}/zlib*.dll"
|
||||||
|
"${ZLIB_INCLUDE_DIR}/../bin/zlib*.dll"
|
||||||
|
"${ZLIB_INCLUDE_DIR}/bin${_bin_suffix}/zlib*.dll"
|
||||||
|
"${ZLIB_INCLUDE_DIR}/bin/zlib*.dll"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CONFIGURATION_TYPES MATCHES "Debug")
|
||||||
|
file(GLOB QT_DEBUG_BIN_FILES
|
||||||
|
"${Qt5Core_DIR}/../../../bin/Qt5Cored.dll"
|
||||||
|
"${Qt5Core_DIR}/../../../bin/Qt5Guid.dll"
|
||||||
|
"${Qt5Core_DIR}/../../../bin/Qt5Widgetsd.dll"
|
||||||
|
"${Qt5Core_DIR}/../../../bin/libGLESv2d.dll"
|
||||||
|
"${Qt5Core_DIR}/../../../bin/libEGLd.dll")
|
||||||
|
file(GLOB QT_DEBUG_PLAT_BIN_FILES
|
||||||
|
"${Qt5Core_DIR}/../../../plugins/platforms/qwindowsd.dll")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CONFIGURATION_TYPES MATCHES "Rel")
|
||||||
|
file(GLOB QT_BIN_FILES
|
||||||
|
"${Qt5Core_DIR}/../../../bin/Qt5Core.dll"
|
||||||
|
"${Qt5Core_DIR}/../../../bin/Qt5Gui.dll"
|
||||||
|
"${Qt5Core_DIR}/../../../bin/Qt5Widgets.dll"
|
||||||
|
"${Qt5Core_DIR}/../../../bin/libGLESv2.dll"
|
||||||
|
"${Qt5Core_DIR}/../../../bin/libEGL.dll")
|
||||||
|
file(GLOB QT_PLAT_BIN_FILES
|
||||||
|
"${Qt5Core_DIR}/../../../plugins/platforms/qwindows.dll")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(GLOB QT_ICU_BIN_FILES
|
||||||
|
"${Qt5Core_DIR}/../../../bin/icu*.dll")
|
||||||
|
|
||||||
|
set(ALL_BASE_BIN_FILES
|
||||||
|
${FFMPEG_BIN_FILES}
|
||||||
|
${X264_BIN_FILES}
|
||||||
|
${CURL_BIN_FILES}
|
||||||
|
${SSL_BIN_FILES}
|
||||||
|
${ZLIB_BIN_FILES}
|
||||||
|
${LIBFDK_BIN_FILES}
|
||||||
|
${FREETYPE_BIN_FILES}
|
||||||
|
${QT_ICU_BIN_FILES})
|
||||||
|
|
||||||
|
set(ALL_REL_BIN_FILES
|
||||||
|
${QT_BIN_FILES})
|
||||||
|
|
||||||
|
set(ALL_DBG_BIN_FILES
|
||||||
|
${QT_DEBUG_BIN_FILES})
|
||||||
|
|
||||||
|
set(ALL_PLATFORM_BIN_FILES)
|
||||||
|
|
||||||
|
set(ALL_PLATFORM_REL_BIN_FILES
|
||||||
|
${QT_PLAT_BIN_FILES})
|
||||||
|
|
||||||
|
set(ALL_PLATFORM_DBG_BIN_FILES
|
||||||
|
${QT_DEBUG_PLAT_BIN_FILES})
|
||||||
|
|
||||||
|
foreach(list
|
||||||
|
ALL_BASE_BIN_FILES ALL_REL_BIN_FILES ALL_DBG_BIN_FILES
|
||||||
|
ALL_PLATFORM_BIN_FILES ALL_PLATFORM_REL_BIN_FILES ALL_PLATFORM_DBG_BIN_FILES)
|
||||||
|
if(${list})
|
||||||
|
list(REMOVE_DUPLICATES ${list})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
message(STATUS "FFmpeg files: ${FFMPEG_BIN_FILES}")
|
||||||
|
message(STATUS "x264 files: ${X264_BIN_FILES}")
|
||||||
|
message(STATUS "Libfdk files: ${LIBFDK_BIN_FILES}")
|
||||||
|
message(STATUS "Freetype files: ${FREETYPE_BIN_FILES}")
|
||||||
|
message(STATUS "curl files: ${CURL_BIN_FILES}")
|
||||||
|
message(STATUS "ssl files: ${SSL_BIN_FILES}")
|
||||||
|
message(STATUS "zlib files: ${ZLIB_BIN_FILES}")
|
||||||
|
message(STATUS "QT Debug files: ${QT_DEBUG_BIN_FILES}")
|
||||||
|
message(STATUS "QT Debug Platform files: ${QT_DEBUG_PLAT_BIN_FILES}")
|
||||||
|
message(STATUS "QT Release files: ${QT_BIN_FILES}")
|
||||||
|
message(STATUS "QT Release Platform files: ${QT_PLAT_BIN_FILES}")
|
||||||
|
message(STATUS "QT ICU files: ${QT_ICU_BIN_FILES}")
|
||||||
|
|
||||||
|
foreach(BinFile ${ALL_BASE_BIN_FILES})
|
||||||
|
message(STATUS "copying ${BinFile} to ${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}")
|
||||||
|
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(BinFile ${ALL_REL_BIN_FILES})
|
||||||
|
message(STATUS "copying ${BinFile} to ${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r")
|
||||||
|
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(BinFile ${ALL_DBG_BIN_FILES})
|
||||||
|
message(STATUS "copying ${BinFile} to ${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d")
|
||||||
|
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(BinFile ${ALL_PLATFORM_BIN_FILES})
|
||||||
|
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/platforms")
|
||||||
|
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}/platforms/")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(BinFile ${ALL_PLATFORM_REL_BIN_FILES})
|
||||||
|
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/platforms")
|
||||||
|
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}r/platforms/")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(BinFile ${ALL_PLATFORM_DBG_BIN_FILES})
|
||||||
|
make_directory("${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/platforms")
|
||||||
|
file(COPY "${BinFile}" DESTINATION "${CMAKE_SOURCE_DIR}/additional_install_files/exec${_bin_suffix}d/platforms/")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
set(COPIED_DEPENDENCIES TRUE CACHE BOOL "Dependencies have been copied, set to false to copy again" FORCE)
|
12
cmake/Modules/FindAppKit.cmake
Normal file
12
cmake/Modules/FindAppKit.cmake
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# APPKIT_FOUND
|
||||||
|
# APPKIT_LIBRARIES
|
||||||
|
|
||||||
|
find_library(APPKIT_FRAMEWORK AppKit)
|
||||||
|
|
||||||
|
set(APPKIT_LIBRARIES ${APPKIT_FRAMEWORK})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(AppKit DEFAULT_MSG APPKIT_FRAMEWORK)
|
||||||
|
mark_as_advanced(APPKIT_FRAMEWORK)
|
68
cmake/Modules/FindCXX11.cmake
Normal file
68
cmake/Modules/FindCXX11.cmake
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
# - Finds if the compiler has C++11 support
|
||||||
|
# This module can be used to detect compiler flags for using C++11, and checks
|
||||||
|
# a small subset of the language.
|
||||||
|
#
|
||||||
|
# The following variables are set:
|
||||||
|
# CXX11_FLAGS - flags to add to the CXX compiler for C++11 support
|
||||||
|
# CXX11_FOUND - true if the compiler supports C++11
|
||||||
|
#
|
||||||
|
|
||||||
|
if(CXX11_FLAGS)
|
||||||
|
set(CXX11_FOUND TRUE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(CheckCXXSourceCompiles)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set(CXX11_FLAG_CANDIDATES
|
||||||
|
" "
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(CXX11_FLAG_CANDIDATES
|
||||||
|
#gcc
|
||||||
|
"-std=gnu++11"
|
||||||
|
"-std=gnu++0x"
|
||||||
|
#Gnu and Intel Linux
|
||||||
|
"-std=c++11"
|
||||||
|
"-std=c++0x"
|
||||||
|
#Microsoft Visual Studio, and everything that automatically accepts C++11
|
||||||
|
" "
|
||||||
|
#Intel windows
|
||||||
|
"/Qstd=c++11"
|
||||||
|
"/Qstd=c++0x"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CXX11_TEST_SOURCE
|
||||||
|
"
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int n[] = {4,7,6,1,2};
|
||||||
|
int r;
|
||||||
|
auto f = [&](int j) { r = j; };
|
||||||
|
|
||||||
|
for (auto i : n)
|
||||||
|
f(i);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
")
|
||||||
|
|
||||||
|
foreach(FLAG ${CXX11_FLAG_CANDIDATES})
|
||||||
|
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
|
||||||
|
unset(CXX11_FLAG_DETECTED CACHE)
|
||||||
|
message(STATUS "Try C++11 flag = [${FLAG}]")
|
||||||
|
check_cxx_source_compiles("${CXX11_TEST_SOURCE}" CXX11_FLAG_DETECTED)
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
|
||||||
|
if(CXX11_FLAG_DETECTED)
|
||||||
|
set(CXX11_FLAGS_INTERNAL "${FLAG}")
|
||||||
|
break()
|
||||||
|
endif(CXX11_FLAG_DETECTED)
|
||||||
|
endforeach(FLAG ${CXX11_FLAG_CANDIDATES})
|
||||||
|
|
||||||
|
set(CXX11_FLAGS "${CXX11_FLAGS_INTERNAL}" CACHE STRING "C++11 Flags")
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(CXX11 DEFAULT_MSG CXX11_FLAGS)
|
||||||
|
mark_as_advanced(CXX11_FLAGS)
|
43
cmake/Modules/FindDBus.cmake
Normal file
43
cmake/Modules/FindDBus.cmake
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# DBUS_FOUND
|
||||||
|
# DBUS_INCLUDE_DIRS
|
||||||
|
# DBUS_LIBRARIES
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_DBUS QUIET dbus-1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(DBUS_INCLUDE_DIR
|
||||||
|
NAMES dbus/dbus.h
|
||||||
|
HINTS
|
||||||
|
${_DBUS_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include)
|
||||||
|
|
||||||
|
find_path(DBUS_ARCH_INCLUDE_DIR
|
||||||
|
NAMES dbus/dbus-arch-deps.h
|
||||||
|
HINTS
|
||||||
|
${_DBUS_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include)
|
||||||
|
|
||||||
|
find_library(DBUS_LIB
|
||||||
|
NAMES dbus-1
|
||||||
|
HINTS
|
||||||
|
${_DBUS_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(DBus DEFAULT_MSG DBUS_LIB DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR DBUS_LIB)
|
||||||
|
|
||||||
|
if(DBUS_FOUND)
|
||||||
|
set(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
|
||||||
|
set(DBUS_LIBRARIES ${DBUS_LIB})
|
||||||
|
set(HAVE_DBUS "1")
|
||||||
|
else()
|
||||||
|
set(HAVE_DBUS "0")
|
||||||
|
endif()
|
151
cmake/Modules/FindFFmpeg.cmake
Normal file
151
cmake/Modules/FindFFmpeg.cmake
Normal file
|
@ -0,0 +1,151 @@
|
||||||
|
#
|
||||||
|
# This module defines the following variables:
|
||||||
|
#
|
||||||
|
# FFMPEG_FOUND - All required components and the core library were found
|
||||||
|
# FFMPEG_INCLUDE_DIRS - Combined list of all components include dirs
|
||||||
|
# FFMPEG_LIBRARIES - Combined list of all componenets libraries
|
||||||
|
# FFMPEG_VERSION_STRING - Version of the first component requested
|
||||||
|
#
|
||||||
|
# For each requested component the following variables are defined:
|
||||||
|
#
|
||||||
|
# FFMPEG_<component>_FOUND - The component was found
|
||||||
|
# FFMPEG_<component>_INCLUDE_DIRS - The components include dirs
|
||||||
|
# FFMPEG_<component>_LIBRARIES - The components libraries
|
||||||
|
# FFMPEG_<component>_VERSION_STRING - The components version string
|
||||||
|
# FFMPEG_<component>_VERSION_MAJOR - The components major version
|
||||||
|
# FFMPEG_<component>_VERSION_MINOR - The components minor version
|
||||||
|
# FFMPEG_<component>_VERSION_MICRO - The components micro version
|
||||||
|
#
|
||||||
|
# <component> is the uppercase name of the component
|
||||||
|
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
function(find_ffmpeg_library component header)
|
||||||
|
string(TOUPPER "${component}" component_u)
|
||||||
|
set(FFMPEG_${component_u}_FOUND FALSE PARENT_SCOPE)
|
||||||
|
set(FFmpeg_${component}_FOUND FALSE PARENT_SCOPE)
|
||||||
|
|
||||||
|
if(PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(PC_FFMPEG_${component} QUIET lib${component})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(FFMPEG_${component}_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
"lib${component}/${header}" "lib${component}/version.h"
|
||||||
|
HINTS
|
||||||
|
ENV FFmpegPath${_lib_suffix}
|
||||||
|
ENV FFmpegPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${FFmpegPath${_lib_suffix}}
|
||||||
|
${FFmpegPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${PC_FFMPEG_${component}_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES ffmpeg libav include)
|
||||||
|
|
||||||
|
find_library(FFMPEG_${component}_LIBRARY
|
||||||
|
NAMES
|
||||||
|
"${component}" "lib${component}"
|
||||||
|
HINTS
|
||||||
|
ENV FFmpegPath${_lib_suffix}
|
||||||
|
ENV FFmpegPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${FFmpegPath${_lib_suffix}}
|
||||||
|
${FFmpegPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${PC_FFMPEG_${component}_LIBRARY_DIRS}
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib${_lib_suffix} lib
|
||||||
|
libs${_lib_suffix} libs
|
||||||
|
bin${_lib_suffix} bin
|
||||||
|
../lib${_lib_suffix} ../lib
|
||||||
|
../libs${_lib_suffix} ../libs
|
||||||
|
../bin${_lib_suffix} ../bin)
|
||||||
|
|
||||||
|
set(FFMPEG_${component_u}_INCLUDE_DIRS ${FFMPEG_${component}_INCLUDE_DIR} PARENT_SCOPE)
|
||||||
|
set(FFMPEG_${component_u}_LIBRARIES ${FFMPEG_${component}_LIBRARY} PARENT_SCOPE)
|
||||||
|
|
||||||
|
mark_as_advanced(FFMPEG_${component}_INCLUDE_DIR FFMPEG_${component}_LIBRARY)
|
||||||
|
|
||||||
|
if(FFMPEG_${component}_INCLUDE_DIR AND FFMPEG_${component}_LIBRARY)
|
||||||
|
set(FFMPEG_${component_u}_FOUND TRUE PARENT_SCOPE)
|
||||||
|
set(FFmpeg_${component}_FOUND TRUE PARENT_SCOPE)
|
||||||
|
|
||||||
|
list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_${component}_INCLUDE_DIR})
|
||||||
|
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
|
||||||
|
set(FFMPEG_INCLUDE_DIRS "${FFMPEG_INCLUDE_DIRS}" PARENT_SCOPE)
|
||||||
|
|
||||||
|
list(APPEND FFMPEG_LIBRARIES ${FFMPEG_${component}_LIBRARY})
|
||||||
|
list(REMOVE_DUPLICATES FFMPEG_LIBRARIES)
|
||||||
|
set(FFMPEG_LIBRARIES "${FFMPEG_LIBRARIES}" PARENT_SCOPE)
|
||||||
|
|
||||||
|
set(FFMPEG_${component_u}_VERSION_STRING "unknown" PARENT_SCOPE)
|
||||||
|
set(_vfile "${FFMPEG_${component}_INCLUDE_DIR}/lib${component}/version.h")
|
||||||
|
|
||||||
|
if(EXISTS "${_vfile}")
|
||||||
|
file(STRINGS "${_vfile}" _version_parse REGEX "^.*VERSION_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$")
|
||||||
|
string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _major "${_version_parse}")
|
||||||
|
string(REGEX REPLACE ".*VERSION_MINOR[ \t]+([0-9]+).*" "\\1" _minor "${_version_parse}")
|
||||||
|
string(REGEX REPLACE ".*VERSION_MICRO[ \t]+([0-9]+).*" "\\1" _micro "${_version_parse}")
|
||||||
|
|
||||||
|
set(FFMPEG_${component_u}_VERSION_MAJOR "${_major}" PARENT_SCOPE)
|
||||||
|
set(FFMPEG_${component_u}_VERSION_MINOR "${_minor}" PARENT_SCOPE)
|
||||||
|
set(FFMPEG_${component_u}_VERSION_MICRO "${_micro}" PARENT_SCOPE)
|
||||||
|
|
||||||
|
set(FFMPEG_${component_u}_VERSION_STRING "${_major}.${_minor}.${_micro}" PARENT_SCOPE)
|
||||||
|
else()
|
||||||
|
message(STATUS "Failed parsing FFmpeg ${component} version")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
set(FFMPEG_INCLUDE_DIRS)
|
||||||
|
set(FFMPEG_LIBRARIES)
|
||||||
|
|
||||||
|
if(NOT FFmpeg_FIND_COMPONENTS)
|
||||||
|
message(FATAL_ERROR "No FFmpeg components requested")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(GET FFmpeg_FIND_COMPONENTS 0 _first_comp)
|
||||||
|
string(TOUPPER "${_first_comp}" _first_comp)
|
||||||
|
|
||||||
|
foreach(component ${FFmpeg_FIND_COMPONENTS})
|
||||||
|
if(component STREQUAL "avcodec")
|
||||||
|
find_ffmpeg_library("${component}" "avcodec.h")
|
||||||
|
elseif(component STREQUAL "avdevice")
|
||||||
|
find_ffmpeg_library("${component}" "avdevice.h")
|
||||||
|
elseif(component STREQUAL "avfilter")
|
||||||
|
find_ffmpeg_library("${component}" "avfilter.h")
|
||||||
|
elseif(component STREQUAL "avformat")
|
||||||
|
find_ffmpeg_library("${component}" "avformat.h")
|
||||||
|
elseif(component STREQUAL "avresample")
|
||||||
|
find_ffmpeg_library("${component}" "avresample.h")
|
||||||
|
elseif(component STREQUAL "avutil")
|
||||||
|
find_ffmpeg_library("${component}" "avutil.h")
|
||||||
|
elseif(component STREQUAL "postproc")
|
||||||
|
find_ffmpeg_library("${component}" "postprocess.h")
|
||||||
|
elseif(component STREQUAL "swresample")
|
||||||
|
find_ffmpeg_library("${component}" "swresample.h")
|
||||||
|
elseif(component STREQUAL "swscale")
|
||||||
|
find_ffmpeg_library("${component}" "swscale.h")
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Unknown FFmpeg component requested: ${component}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(FFmpeg
|
||||||
|
FOUND_VAR FFMPEG_FOUND
|
||||||
|
REQUIRED_VARS FFMPEG_${_first_comp}_LIBRARIES FFMPEG_${_first_comp}_INCLUDE_DIRS
|
||||||
|
VERSION_VAR FFMPEG_${_first_comp}_VERSION_STRING
|
||||||
|
HANDLE_COMPONENTS)
|
34
cmake/Modules/FindFontconfig.cmake
Normal file
34
cmake/Modules/FindFontconfig.cmake
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# FONTCONFIG_FOUND
|
||||||
|
# FONTCONFIG_INCLUDE_DIRS
|
||||||
|
# FONTCONFIG_LIBRARIES
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_FONTCONFIG QUIET fontconfig)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(FONTCONFIG_INCLUDE_DIR
|
||||||
|
NAMES fontconfig/fontconfig.h
|
||||||
|
HINTS
|
||||||
|
${_FONTCONFIG_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include)
|
||||||
|
|
||||||
|
find_library(FONTCONFIG_LIB
|
||||||
|
NAMES fontconfig
|
||||||
|
HINTS
|
||||||
|
${_FONTCONFIG_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Fontconfig DEFAULT_MSG FONTCONFIG_LIB
|
||||||
|
FONTCONFIG_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIB)
|
||||||
|
|
||||||
|
if(FONTCONFIG_FOUND)
|
||||||
|
set(FONTCONFIG_INCLUDE_DIRS ${FONTCONFIG_INCLUDE_DIR})
|
||||||
|
set(FONTCONFIG_LIBRARIES "${FONTCONFIG_LIB}")
|
||||||
|
endif()
|
94
cmake/Modules/FindFreetype.cmake
Normal file
94
cmake/Modules/FindFreetype.cmake
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# FREETYPE_FOUND
|
||||||
|
# FREETYPE_INCLUDE_DIRS
|
||||||
|
# FREETYPE_LIBRARIES
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_FREETYPE QUIET freetype2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(FREETYPE_INCLUDE_DIR_ft2build
|
||||||
|
NAMES
|
||||||
|
ft2build.h
|
||||||
|
HINTS
|
||||||
|
ENV FreetypePath${_lib_suffix}
|
||||||
|
ENV FreetypePath
|
||||||
|
ENV FREETYPE_DIR
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${FreetypePath${_lib_suffix}}
|
||||||
|
${FreetypePath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_FREETYPE_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||||
|
PATH_SUFFIXES
|
||||||
|
freetype2 include/freetype2 include)
|
||||||
|
|
||||||
|
find_path(FREETYPE_INCLUDE_DIR_freetype2
|
||||||
|
NAMES
|
||||||
|
freetype/config/ftheader.h
|
||||||
|
config/ftheader.h
|
||||||
|
HINTS
|
||||||
|
ENV FreetypePath${_lib_suffix}
|
||||||
|
ENV FreetypePath
|
||||||
|
ENV FREETYPE_DIR
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${FreetypePath${_lib_suffix}}
|
||||||
|
${FreetypePath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_FREETYPE_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||||
|
PATH_SUFFIXES
|
||||||
|
freetype2 include/freetype2 include)
|
||||||
|
|
||||||
|
find_library(FREETYPE_LIB
|
||||||
|
NAMES ${_FREETYPE_LIBRARIES} freetype libfreetype
|
||||||
|
HINTS
|
||||||
|
ENV FreetypePath${_lib_suffix}
|
||||||
|
ENV FreetypePath
|
||||||
|
ENV FREETYPE_DIR
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${FreetypePath${_lib_suffix}}
|
||||||
|
${FreetypePath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_FREETYPE_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib${_lib_suffix} lib
|
||||||
|
libs${_lib_suffix} libs
|
||||||
|
bin${_lib_suffix} bin
|
||||||
|
../lib${_lib_suffix} ../lib
|
||||||
|
../libs${_lib_suffix} ../libs
|
||||||
|
../bin${_lib_suffix} ../bin)
|
||||||
|
|
||||||
|
if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
|
set(FREETYPE_INCLUDE_DIR "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||||
|
list(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIR)
|
||||||
|
else()
|
||||||
|
unset(FREETYPE_INCLUDE_DIR)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Freetype DEFAULT_MSG FREETYPE_LIB FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
|
mark_as_advanced(FREETYPE_INCLUDE_DIR FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_LIB)
|
||||||
|
|
||||||
|
if(FREETYPE_FOUND)
|
||||||
|
set(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR})
|
||||||
|
set(FREETYPE_LIBRARIES ${FREETYPE_LIB})
|
||||||
|
endif()
|
45
cmake/Modules/FindIconv.cmake
Normal file
45
cmake/Modules/FindIconv.cmake
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# ICONV_FOUND
|
||||||
|
# ICONV_INCLUDE_DIRS
|
||||||
|
# ICONV_LIBRARIES
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_ICONV QUIET iconv)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(ICONV_INCLUDE_DIR
|
||||||
|
NAMES iconv.h
|
||||||
|
HINTS
|
||||||
|
ENV IconvPath${_lib_suffix}
|
||||||
|
ENV IconvPath
|
||||||
|
${_ICONV_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||||
|
|
||||||
|
find_library(ICONV_LIB
|
||||||
|
NAMES ${_ICONV_LIBRARIES} iconv libiconv
|
||||||
|
HINTS
|
||||||
|
${_ICONV_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib${_lib_suffix} lib
|
||||||
|
libs${_lib_suffix} libs
|
||||||
|
bin${_lib_suffix} bin)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Iconv DEFAULT_MSG ICONV_LIB ICONV_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(ICONV_INCLUDE_DIR ICONV_LIB)
|
||||||
|
|
||||||
|
if(ICONV_FOUND)
|
||||||
|
set(ICONV_INCLUDE_DIRS ${ICONV_INCLUDE_DIR})
|
||||||
|
set(ICONV_LIBRARIES ${ICONV_LIB})
|
||||||
|
endif()
|
82
cmake/Modules/FindJack.cmake
Normal file
82
cmake/Modules/FindJack.cmake
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
# - Try to find jack-2.6
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# JACK_FOUND - system has jack
|
||||||
|
# JACK_INCLUDE_DIRS - the jack include directory
|
||||||
|
# JACK_LIBRARIES - Link these to use jack
|
||||||
|
# JACK_DEFINITIONS - Compiler switches required for using jack
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
|
||||||
|
# Modified for other libraries by Lasse Kärkkäinen <tronic>
|
||||||
|
#
|
||||||
|
# Redistribution and use is allowed according to the terms of the New
|
||||||
|
# BSD license.
|
||||||
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
#
|
||||||
|
|
||||||
|
if (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||||
|
# in cache already
|
||||||
|
set(JACK_FOUND TRUE)
|
||||||
|
else (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||||
|
# use pkg-config to get the directories and then use these values
|
||||||
|
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||||
|
if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||||
|
include(UsePkgConfig)
|
||||||
|
pkgconfig(jack _JACK_INCLUDEDIR _JACK_LIBDIR _JACK_LDFLAGS _JACK_CFLAGS)
|
||||||
|
else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||||
|
find_package(PkgConfig)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_JACK jack)
|
||||||
|
endif (PKG_CONFIG_FOUND)
|
||||||
|
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||||
|
find_path(JACK_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
jack/jack.h
|
||||||
|
PATHS
|
||||||
|
${_JACK_INCLUDEDIR}
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
|
/opt/local/include
|
||||||
|
/sw/include
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(JACK_LIBRARY
|
||||||
|
NAMES
|
||||||
|
jack
|
||||||
|
PATHS
|
||||||
|
${_JACK_LIBDIR}
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/sw/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
if (JACK_LIBRARY AND JACK_INCLUDE_DIR)
|
||||||
|
set(JACK_FOUND TRUE)
|
||||||
|
|
||||||
|
set(JACK_INCLUDE_DIRS
|
||||||
|
${JACK_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(JACK_LIBRARIES
|
||||||
|
${JACK_LIBRARIES}
|
||||||
|
${JACK_LIBRARY}
|
||||||
|
)
|
||||||
|
|
||||||
|
endif (JACK_LIBRARY AND JACK_INCLUDE_DIR)
|
||||||
|
|
||||||
|
if (JACK_FOUND)
|
||||||
|
if (NOT JACK_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found jack: ${JACK_LIBRARY}")
|
||||||
|
endif (NOT JACK_FIND_QUIETLY)
|
||||||
|
else (JACK_FOUND)
|
||||||
|
if (JACK_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find JACK")
|
||||||
|
endif (JACK_FIND_REQUIRED)
|
||||||
|
endif (JACK_FOUND)
|
||||||
|
|
||||||
|
# show the JACK_INCLUDE_DIRS and JACK_LIBRARIES variables only in the advanced view
|
||||||
|
mark_as_advanced(JACK_INCLUDE_DIRS JACK_LIBRARIES)
|
||||||
|
|
||||||
|
endif (JACK_LIBRARIES AND JACK_INCLUDE_DIRS)
|
||||||
|
|
84
cmake/Modules/FindJansson.cmake
Normal file
84
cmake/Modules/FindJansson.cmake
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# JANSSON_FOUND
|
||||||
|
# JANSSON_INCLUDE_DIRS
|
||||||
|
# JANSSON_LIBRARIES
|
||||||
|
# JANSSON_VERSION
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_JANSSON QUIET jansson)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(Jansson_INCLUDE_DIR
|
||||||
|
NAMES jansson.h
|
||||||
|
HINTS
|
||||||
|
ENV JanssonPath${_lib_suffix}
|
||||||
|
ENV JanssonPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${JanssonPath${_lib_suffix}}
|
||||||
|
${JanssonPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_JANSSON_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||||
|
|
||||||
|
find_library(Jansson_LIB
|
||||||
|
NAMES ${_JANSSON_LIBRARIES} jansson libjansson
|
||||||
|
HINTS
|
||||||
|
ENV JanssonPath${_lib_suffix}
|
||||||
|
ENV JanssonPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${JanssonPath${_lib_suffix}}
|
||||||
|
${JanssonPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_JANSSON_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib${_lib_suffix} lib
|
||||||
|
libs${_lib_suffix} libs
|
||||||
|
bin${_lib_suffix} bin
|
||||||
|
../lib${_lib_suffix} ../lib
|
||||||
|
../libs${_lib_suffix} ../libs
|
||||||
|
../bin${_lib_suffix} ../bin)
|
||||||
|
|
||||||
|
if(JANSSON_VERSION)
|
||||||
|
set(_JANSSON_VERSION_STRING "${JANSSON_VERSION}")
|
||||||
|
elseif(_JANSSON_FOUND AND _JANSSON_VERSION)
|
||||||
|
set(_JANSSON_VERSION_STRING "${_JANSSON_VERSION}")
|
||||||
|
elseif(EXISTS "${Jansson_INCLUDE_DIR}/jansson.h")
|
||||||
|
file(STRINGS "${Jansson_INCLUDE_DIR}/jansson.h" _jansson_version_parse
|
||||||
|
REGEX "#define[ \t]+JANSSON_VERSION[ \t]+.+")
|
||||||
|
string(REGEX REPLACE
|
||||||
|
".*#define[ \t]+JANSSON_VERSION[ \t]+\"(.+)\".*" "\\1"
|
||||||
|
_JANSSON_VERSION_STRING "${_jansson_version_parse}")
|
||||||
|
else()
|
||||||
|
if(NOT Jansson_FIND_QUIETLY)
|
||||||
|
message(WARNING "Failed to find Jansson version")
|
||||||
|
endif()
|
||||||
|
set(_JANSSON_VERSION_STRING "unknown")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Jansson
|
||||||
|
FOUND_VAR JANSSON_FOUND
|
||||||
|
REQUIRED_VARS Jansson_LIB Jansson_INCLUDE_DIR
|
||||||
|
VERSION_VAR _JANSSON_VERSION_STRING)
|
||||||
|
mark_as_advanced(Jansson_INCLUDE_DIR Jansson_LIB)
|
||||||
|
|
||||||
|
if(JANSSON_FOUND)
|
||||||
|
set(JANSSON_INCLUDE_DIRS ${Jansson_INCLUDE_DIR})
|
||||||
|
set(JANSSON_LIBRARIES ${Jansson_LIB})
|
||||||
|
set(JANSSON_VERSION ${_JANSSON_VERSION_STRING})
|
||||||
|
endif()
|
33
cmake/Modules/FindLibUDev.cmake
Normal file
33
cmake/Modules/FindLibUDev.cmake
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# UDEV_FOUND
|
||||||
|
# UDEV_INCLUDE_DIRS
|
||||||
|
# UDEV_LIBRARIES
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_UDEV QUIET udev)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(UDEV_INCLUDE_DIR
|
||||||
|
NAMES libudev.h
|
||||||
|
HINTS
|
||||||
|
${_UDEV_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include)
|
||||||
|
|
||||||
|
find_library(UDEV_LIB
|
||||||
|
NAMES udev libudev
|
||||||
|
HINTS
|
||||||
|
${_UDEV_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(UDev DEFAULT_MSG UDEV_LIB UDEV_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIB)
|
||||||
|
|
||||||
|
if(UDEV_FOUND)
|
||||||
|
set(UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
|
||||||
|
set(UDEV_LIBRARIES ${UDEV_LIB})
|
||||||
|
endif()
|
70
cmake/Modules/FindLibcurl.cmake
Normal file
70
cmake/Modules/FindLibcurl.cmake
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# LIBCURL_FOUND
|
||||||
|
# LIBCURL_INCLUDE_DIRS
|
||||||
|
# LIBCURL_LIBRARIES
|
||||||
|
#
|
||||||
|
# For use in OBS:
|
||||||
|
#
|
||||||
|
# CURL_INCLUDE_DIR
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_CURL QUIET curl libcurl)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(CURL_INCLUDE_DIR
|
||||||
|
NAMES curl/curl.h
|
||||||
|
HINTS
|
||||||
|
ENV curlPath${_lib_suffix}
|
||||||
|
ENV curlPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${curlPath${_lib_suffix}}
|
||||||
|
${curlPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_CURL_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include)
|
||||||
|
|
||||||
|
find_library(CURL_LIB
|
||||||
|
NAMES ${_CURL_LIBRARIES} curl libcurl
|
||||||
|
HINTS
|
||||||
|
ENV curlPath${_lib_suffix}
|
||||||
|
ENV curlPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${curlPath${_lib_suffix}}
|
||||||
|
${curlPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_CURL_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib${_lib_suffix} lib
|
||||||
|
libs${_lib_suffix} libs
|
||||||
|
bin${_lib_suffix} bin
|
||||||
|
../lib${_lib_suffix} ../lib
|
||||||
|
../libs${_lib_suffix} ../libs
|
||||||
|
../bin${_lib_suffix} ../bin
|
||||||
|
"build/Win${_lib_suffix}/VC12/DLL Release - DLL Windows SSPI"
|
||||||
|
"../build/Win${_lib_suffix}/VC12/DLL Release - DLL Windows SSPI")
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Libcurl DEFAULT_MSG CURL_LIB CURL_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(CURL_INCLUDE_DIR CURL_LIB)
|
||||||
|
|
||||||
|
if(LIBCURL_FOUND)
|
||||||
|
set(LIBCURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
|
||||||
|
set(LIBCURL_LIBRARIES ${CURL_LIB})
|
||||||
|
endif()
|
66
cmake/Modules/FindLibfdk.cmake
Normal file
66
cmake/Modules/FindLibfdk.cmake
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# LIBFDK_FOUND
|
||||||
|
# LIBFDK_INCLUDE_DIRS
|
||||||
|
# LIBFDK_LIBRARIES
|
||||||
|
#
|
||||||
|
# For use in OBS:
|
||||||
|
#
|
||||||
|
# Libfdk_INCLUDE_DIR
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_LIBFDK QUIET fdk-aac)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(Libfdk_INCLUDE_DIR
|
||||||
|
NAMES fdk-aac/aacenc_lib.h
|
||||||
|
HINTS
|
||||||
|
ENV LibfdkPath${_lib_suffix}
|
||||||
|
ENV LibfdkPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${LibfdkPath${_lib_suffix}}
|
||||||
|
${LibfdkPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_LIBFDK_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||||
|
|
||||||
|
find_library(Libfdk_LIB
|
||||||
|
NAMES ${_LIBFDK_LIBRARIES} fdk-aac libfdk-aac
|
||||||
|
HINTS
|
||||||
|
ENV LibfdkPath${_lib_suffix}
|
||||||
|
ENV LibfdkPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${LibfdkPath${_lib_suffix}}
|
||||||
|
${LibfdkPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_LIBFDK_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib${_lib_suffix} lib
|
||||||
|
libs${_lib_suffix} libs
|
||||||
|
bin${_lib_suffix} bin
|
||||||
|
../lib${_lib_suffix} ../lib
|
||||||
|
../libs${_lib_suffix} ../libs
|
||||||
|
../bin${_lib_suffix} ../bin)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Libfdk DEFAULT_MSG Libfdk_LIB Libfdk_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(Libfdk_INCLUDE_DIR Libfdk_LIB)
|
||||||
|
|
||||||
|
if(LIBFDK_FOUND)
|
||||||
|
set(LIBFDK_INCLUDE_DIRS ${Libfdk_INCLUDE_DIR})
|
||||||
|
set(LIBFDK_LIBRARIES ${Libfdk_LIB})
|
||||||
|
endif()
|
24
cmake/Modules/FindLibsysinfo.cmake
Normal file
24
cmake/Modules/FindLibsysinfo.cmake
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# SYSINFO_FOUND
|
||||||
|
# SYSINFO_INCLUDE_DIRS
|
||||||
|
# SYSINFO_LIBRARIES
|
||||||
|
|
||||||
|
find_path(SYSINFO_INCLUDE_DIR
|
||||||
|
NAMES sys/sysinfo.h
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include)
|
||||||
|
|
||||||
|
find_library(SYSINFO_LIB
|
||||||
|
NAMES sysinfo libsysinfo
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(sysinfo DEFAULT_MSG SYSINFO_LIB SYSINFO_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(SYSINFO_INCLUDE_DIR SYSINFO_LIB)
|
||||||
|
|
||||||
|
if(SYSINFO_FOUND)
|
||||||
|
set(SYSINFO_INCLUDE_DIRS ${SYSINFO_INCLUDE_DIR})
|
||||||
|
set(SYSINFO_LIBRARIES ${SYSINFO_LIB})
|
||||||
|
endif()
|
33
cmake/Modules/FindLibv4l2.cmake
Normal file
33
cmake/Modules/FindLibv4l2.cmake
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# LIBV4L2_FOUND
|
||||||
|
# LIBV4L2_INCLUDE_DIRS
|
||||||
|
# LIBV4L2_LIBRARIES
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_V4L2 QUIET v4l-utils)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(V4L2_INCLUDE_DIR
|
||||||
|
NAMES libv4l2.h
|
||||||
|
HINTS
|
||||||
|
${_V4L2_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include)
|
||||||
|
|
||||||
|
find_library(V4L2_LIB
|
||||||
|
NAMES v4l2
|
||||||
|
HINTS
|
||||||
|
${_V4L2_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LibV4L2 DEFAULT_MSG V4L2_LIB V4L2_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(V4L2_INCLUDE_DIR V4L2_LIB)
|
||||||
|
|
||||||
|
if(LIBV4L2_FOUND)
|
||||||
|
set(LIBV4L2_INCLUDE_DIRS ${V4L2_INCLUDE_DIR})
|
||||||
|
set(LIBV4L2_LIBRARIES ${V4L2_LIB})
|
||||||
|
endif()
|
68
cmake/Modules/FindLibx264.cmake
Normal file
68
cmake/Modules/FindLibx264.cmake
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# LIBX264_FOUND
|
||||||
|
# LIBX264_INCLUDE_DIRS
|
||||||
|
# LIBX264_LIBRARIES
|
||||||
|
#
|
||||||
|
# For use in OBS:
|
||||||
|
#
|
||||||
|
# X264_INCLUDE_DIR
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_X264 QUIET x264)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(X264_INCLUDE_DIR
|
||||||
|
NAMES x264.h
|
||||||
|
HINTS
|
||||||
|
ENV x264Path${_lib_suffix}
|
||||||
|
ENV x264Path
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${x264Path${_lib_suffix}}
|
||||||
|
${x264Path}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_X264_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include)
|
||||||
|
|
||||||
|
find_library(X264_LIB
|
||||||
|
NAMES ${_X264_LIBRARIES} x264 libx264
|
||||||
|
HINTS
|
||||||
|
ENV x264Path${_lib_suffix}
|
||||||
|
ENV x264Path
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${x264Path${_lib_suffix}}
|
||||||
|
${x264Path}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_X264_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib${_lib_suffix} lib
|
||||||
|
libs${_lib_suffix} libs
|
||||||
|
bin${_lib_suffix} bin
|
||||||
|
../lib${_lib_suffix} ../lib
|
||||||
|
../libs${_lib_suffix} ../libs
|
||||||
|
../bin${_lib_suffix} ../bin)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Libx264 DEFAULT_MSG X264_LIB X264_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(X264_INCLUDE_DIR X264_LIB)
|
||||||
|
|
||||||
|
if(LIBX264_FOUND)
|
||||||
|
set(LIBX264_INCLUDE_DIRS ${X264_INCLUDE_DIR})
|
||||||
|
set(LIBX264_LIBRARIES ${X264_LIB})
|
||||||
|
endif()
|
77
cmake/Modules/FindSSL.cmake
Normal file
77
cmake/Modules/FindSSL.cmake
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# SSL_FOUND
|
||||||
|
# SSL_INCLUDE_DIRS
|
||||||
|
# SSL_LIBRARIES
|
||||||
|
#
|
||||||
|
# For use in OBS:
|
||||||
|
#
|
||||||
|
# SSL_INCLUDE_DIR
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_CRYPTO QUIET libcrypto)
|
||||||
|
pkg_check_modules(_SSL QUIET libssl)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_SSL_BASE_HINTS
|
||||||
|
ENV sslPath${_lib_suffix}
|
||||||
|
ENV sslPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${sslPath${_lib_suffix}}
|
||||||
|
${sslPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath})
|
||||||
|
|
||||||
|
set(_SSL_LIB_SUFFIXES
|
||||||
|
lib${_lib_suffix} lib
|
||||||
|
libs${_lib_suffix} libs
|
||||||
|
bin${_lib_suffix} bin
|
||||||
|
../lib${_lib_suffix} ../lib
|
||||||
|
../libs${_lib_suffix} ../libs
|
||||||
|
../bin${_lib_suffix} ../bin)
|
||||||
|
|
||||||
|
find_path(SSL_INCLUDE_DIR
|
||||||
|
NAMES openssl/ssl.h
|
||||||
|
HINTS
|
||||||
|
${_SSL_BASE_HINTS}
|
||||||
|
${_CRYPTO_INCLUDE_DIRS}
|
||||||
|
${_SSL_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include)
|
||||||
|
|
||||||
|
find_library(_SSL_LIB
|
||||||
|
NAMES ${_SSL_LIBRARIES} ssleay32 ssl
|
||||||
|
HINTS
|
||||||
|
${_SSL_BASE_HINTS}
|
||||||
|
${_SSL_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
PATH_SUFFIXES ${_SSL_LIB_SUFFIXES})
|
||||||
|
|
||||||
|
find_library(_CRYPTO_LIB
|
||||||
|
NAMES ${_CRYPTO_LIBRARIES} libeay32 crypto
|
||||||
|
HINTS
|
||||||
|
${_SSL_BASE_HINTS}
|
||||||
|
${_CRYPTO_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
PATH_SUFFIXES ${_SSL_LIB_SUFFIXES})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(ssl DEFAULT_MSG _SSL_LIB _CRYPTO_LIB SSL_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(SSL_INCLUDE_DIR _SSL_LIB _CRYPTO_LIB)
|
||||||
|
|
||||||
|
if(SSL_FOUND)
|
||||||
|
set(SSL_INCLUDE_DIRS ${SSL_INCLUDE_DIR})
|
||||||
|
set(SSL_LIBRARIES ${_SSL_LIB} ${_CRYPTO_LIB})
|
||||||
|
endif()
|
202
cmake/Modules/FindThreads.cmake
Normal file
202
cmake/Modules/FindThreads.cmake
Normal file
|
@ -0,0 +1,202 @@
|
||||||
|
#.rst:
|
||||||
|
# FindThreads
|
||||||
|
# -----------
|
||||||
|
#
|
||||||
|
# This module determines the thread library of the system.
|
||||||
|
#
|
||||||
|
# The following import target is created
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# CMake::Threads
|
||||||
|
#
|
||||||
|
# The following variables are set
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# THREADS_FOUND
|
||||||
|
# THREADS_LIBRARIES
|
||||||
|
# THREADS_DEFINITIONS
|
||||||
|
#
|
||||||
|
# Legacy variables
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# CMAKE_THREAD_LIBS_INIT - the thread library
|
||||||
|
# CMAKE_THREAD_DEFS_INIT - the thread compile definitions
|
||||||
|
# CMAKE_USE_SPROC_INIT - are we using sproc?
|
||||||
|
# CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads?
|
||||||
|
# CMAKE_USE_PTHREADS_INIT - are we using pthreads
|
||||||
|
# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads
|
||||||
|
#
|
||||||
|
# For systems with multiple thread libraries, caller can set
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# CMAKE_THREAD_PREFER_PTHREAD
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2002-2014 Kitware, Inc.
|
||||||
|
#
|
||||||
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
# see accompanying file Copyright.txt for details.
|
||||||
|
#
|
||||||
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
# See the License for more information.
|
||||||
|
#=============================================================================
|
||||||
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
include(CheckIncludeFiles)
|
||||||
|
include(CheckLibraryExists)
|
||||||
|
include(CheckSymbolExists)
|
||||||
|
set(Threads_FOUND FALSE)
|
||||||
|
set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET})
|
||||||
|
set(CMAKE_REQUIRED_QUIET ${Threads_FIND_QUIETLY})
|
||||||
|
|
||||||
|
# Do we have sproc?
|
||||||
|
if(CMAKE_SYSTEM_NAME MATCHES IRIX AND NOT CMAKE_THREAD_PREFER_PTHREAD)
|
||||||
|
check_include_files("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_HAVE_SPROC_H AND NOT CMAKE_THREAD_PREFER_PTHREAD)
|
||||||
|
# We have sproc
|
||||||
|
set(CMAKE_USE_SPROC_INIT 1)
|
||||||
|
else()
|
||||||
|
# Do we have pthreads?
|
||||||
|
check_include_files("pthread.h" CMAKE_HAVE_PTHREAD_H)
|
||||||
|
|
||||||
|
if(CMAKE_HAVE_PTHREAD_H)
|
||||||
|
|
||||||
|
#
|
||||||
|
# We have pthread.h
|
||||||
|
# Let's check for the library now.
|
||||||
|
#
|
||||||
|
|
||||||
|
set(CMAKE_HAVE_THREADS_LIBRARY)
|
||||||
|
|
||||||
|
# Check if pthread functions are in normal C library
|
||||||
|
check_symbol_exists(pthread_create pthread.h CMAKE_HAVE_LIBC_CREATE)
|
||||||
|
if(CMAKE_HAVE_LIBC_CREATE)
|
||||||
|
set(CMAKE_THREAD_LIBS_INIT "")
|
||||||
|
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
||||||
|
set(Threads_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT Threads_FOUND AND NOT THREADS_HAVE_PTHREAD_ARG)
|
||||||
|
message(STATUS "Check if compiler accepts -pthread")
|
||||||
|
try_run(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG
|
||||||
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/CheckForPthreads.c
|
||||||
|
COMPILE_DEFINITIONS -pthread
|
||||||
|
CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread
|
||||||
|
COMPILE_OUTPUT_VARIABLE OUTPUT)
|
||||||
|
|
||||||
|
if(THREADS_HAVE_PTHREAD_ARG)
|
||||||
|
if(THREADS_PTHREAD_ARG STREQUAL "2")
|
||||||
|
message(STATUS "Check if compiler accepts -pthread - yes")
|
||||||
|
else()
|
||||||
|
message(STATUS "Check if compiler accepts -pthread - no")
|
||||||
|
file(APPEND
|
||||||
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
|
"Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n")
|
||||||
|
set(THREADS_HAVE_PTHREAD_ARG)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(STATUS "Check if compiler accepts -pthread - no")
|
||||||
|
file(APPEND
|
||||||
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||||
|
"Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT Threads_FOUND AND THREADS_HAVE_PTHREAD_ARG)
|
||||||
|
set(Threads_FOUND TRUE)
|
||||||
|
set(CMAKE_THREAD_LIBS_INIT "-pthread")
|
||||||
|
set(CMAKE_THREAD_DEFS_INIT "-pthread")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT Threads_FOUND)
|
||||||
|
if(NOT CMAKE_HAVE_THREADS_LIBRARY)
|
||||||
|
# Do we have -lpthreads
|
||||||
|
check_library_exists(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE)
|
||||||
|
if(CMAKE_HAVE_PTHREADS_CREATE)
|
||||||
|
set(CMAKE_THREAD_LIBS_INIT "-lpthreads")
|
||||||
|
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
||||||
|
set(Threads_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Ok, how about -lpthread
|
||||||
|
check_library_exists(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE)
|
||||||
|
if(CMAKE_HAVE_PTHREAD_CREATE)
|
||||||
|
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
|
||||||
|
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
||||||
|
set(Threads_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM MATCHES "SunOS.*")
|
||||||
|
# On sun also check for -lthread
|
||||||
|
check_library_exists(thread thr_create "" CMAKE_HAVE_THR_CREATE)
|
||||||
|
if(CMAKE_HAVE_THR_CREATE)
|
||||||
|
set(CMAKE_THREAD_LIBS_INIT "-lthread")
|
||||||
|
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
||||||
|
set(Threads_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_CREATE)
|
||||||
|
set(CMAKE_USE_PTHREADS_INIT 1)
|
||||||
|
set(Threads_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
|
set(CMAKE_USE_WIN32_THREADS_INIT 1)
|
||||||
|
set(Threads_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_USE_PTHREADS_INIT)
|
||||||
|
if(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
|
||||||
|
# Use libcma if it exists and can be used. It provides more
|
||||||
|
# symbols than the plain pthread library. CMA threads
|
||||||
|
# have actually been deprecated:
|
||||||
|
# http://docs.hp.com/en/B3920-90091/ch12s03.html#d0e11395
|
||||||
|
# http://docs.hp.com/en/947/d8.html
|
||||||
|
# but we need to maintain compatibility here.
|
||||||
|
# The CMAKE_HP_PTHREADS setting actually indicates whether CMA threads
|
||||||
|
# are available.
|
||||||
|
check_library_exists(cma pthread_attr_create "" CMAKE_HAVE_HP_CMA)
|
||||||
|
if(CMAKE_HAVE_HP_CMA)
|
||||||
|
set(CMAKE_THREAD_LIBS_INIT "-lcma")
|
||||||
|
set(CMAKE_HP_PTHREADS_INIT 1)
|
||||||
|
set(Threads_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
set(CMAKE_USE_PTHREADS_INIT 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM MATCHES "OSF1-V")
|
||||||
|
set(CMAKE_USE_PTHREADS_INIT 0)
|
||||||
|
set(CMAKE_THREAD_LIBS_INIT )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM MATCHES "CYGWIN_NT")
|
||||||
|
set(CMAKE_USE_PTHREADS_INIT 1)
|
||||||
|
set(Threads_FOUND TRUE)
|
||||||
|
set(CMAKE_THREAD_LIBS_INIT )
|
||||||
|
set(CMAKE_USE_WIN32_THREADS_INIT 0)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE})
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Threads DEFAULT_MSG Threads_FOUND)
|
||||||
|
|
||||||
|
if(THREADS_FOUND)
|
||||||
|
set(THREADS_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
|
||||||
|
set(THREADS_DEFINITIONS "${CMAKE_THREAD_DEFS_INIT}")
|
||||||
|
endif()
|
31
cmake/Modules/FindX11_XCB.cmake
Normal file
31
cmake/Modules/FindX11_XCB.cmake
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# - Try to find libX11-xcb
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# X11_XCB_FOUND - system has libX11-xcb
|
||||||
|
# X11_XCB_LIBRARIES - Link these to use libX11-xcb
|
||||||
|
# X11_XCB_INCLUDE_DIR - the libX11-xcb include dir
|
||||||
|
# X11_XCB_DEFINITIONS - compiler switches required for using libX11-xcb
|
||||||
|
|
||||||
|
# Copyright (c) 2011 Fredrik Höglund <fredrik@kde.org>
|
||||||
|
# Copyright (c) 2008 Helio Chissini de Castro, <helio@kde.org>
|
||||||
|
# Copyright (c) 2007 Matthias Kretz, <kretz@kde.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||||
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
|
||||||
|
IF (NOT WIN32)
|
||||||
|
# use pkg-config to get the directories and then use these values
|
||||||
|
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||||
|
FIND_PACKAGE(PkgConfig)
|
||||||
|
PKG_CHECK_MODULES(PKG_X11_XCB QUIET x11-xcb)
|
||||||
|
|
||||||
|
SET(X11_XCB_DEFINITIONS ${PKG_X11_XCB_CFLAGS})
|
||||||
|
|
||||||
|
FIND_PATH(X11_XCB_INCLUDE_DIR NAMES X11/Xlib-xcb.h HINTS ${PKG_X11_XCB_INCLUDE_DIRS})
|
||||||
|
FIND_LIBRARY(X11_XCB_LIBRARIES NAMES X11-xcb HINTS ${PKG_X11_XCB_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(X11_XCB DEFAULT_MSG X11_XCB_LIBRARIES X11_XCB_INCLUDE_DIR)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(X11_XCB_INCLUDE_DIR X11_XCB_LIBRARIES)
|
||||||
|
ENDIF (NOT WIN32)
|
244
cmake/Modules/FindXCB.cmake
Normal file
244
cmake/Modules/FindXCB.cmake
Normal file
|
@ -0,0 +1,244 @@
|
||||||
|
# Try to find XCB on a Unix system
|
||||||
|
#
|
||||||
|
# This will define:
|
||||||
|
#
|
||||||
|
# XCB_FOUND - True if xcb is available
|
||||||
|
# XCB_LIBRARIES - Link these to use xcb
|
||||||
|
# XCB_INCLUDE_DIRS - Include directory for xcb
|
||||||
|
# XCB_DEFINITIONS - Compiler flags for using xcb
|
||||||
|
#
|
||||||
|
# In addition the following more fine grained variables will be defined:
|
||||||
|
#
|
||||||
|
# XCB_XCB_FOUND XCB_XCB_INCLUDE_DIR XCB_XCB_LIBRARY
|
||||||
|
# XCB_UTIL_FOUND XCB_UTIL_INCLUDE_DIR XCB_UTIL_LIBRARY
|
||||||
|
# XCB_COMPOSITE_FOUND XCB_COMPOSITE_INCLUDE_DIR XCB_COMPOSITE_LIBRARY
|
||||||
|
# XCB_DAMAGE_FOUND XCB_DAMAGE_INCLUDE_DIR XCB_DAMAGE_LIBRARY
|
||||||
|
# XCB_XFIXES_FOUND XCB_XFIXES_INCLUDE_DIR XCB_XFIXES_LIBRARY
|
||||||
|
# XCB_RENDER_FOUND XCB_RENDER_INCLUDE_DIR XCB_RENDER_LIBRARY
|
||||||
|
# XCB_RANDR_FOUND XCB_RANDR_INCLUDE_DIR XCB_RANDR_LIBRARY
|
||||||
|
# XCB_SHAPE_FOUND XCB_SHAPE_INCLUDE_DIR XCB_SHAPE_LIBRARY
|
||||||
|
# XCB_DRI2_FOUND XCB_DRI2_INCLUDE_DIR XCB_DRI2_LIBRARY
|
||||||
|
# XCB_GLX_FOUND XCB_GLX_INCLUDE_DIR XCB_GLX_LIBRARY
|
||||||
|
# XCB_SHM_FOUND XCB_SHM_INCLUDE_DIR XCB_SHM_LIBRARY
|
||||||
|
# XCB_XV_FOUND XCB_XV_INCLUDE_DIR XCB_XV_LIBRARY
|
||||||
|
# XCB_SYNC_FOUND XCB_SYNC_INCLUDE_DIR XCB_SYNC_LIBRARY
|
||||||
|
# XCB_XTEST_FOUND XCB_XTEST_INCLUDE_DIR XCB_XTEST_LIBRARY
|
||||||
|
# XCB_ICCCM_FOUND XCB_ICCCM_INCLUDE_DIR XCB_ICCCM_LIBRARY
|
||||||
|
# XCB_EWMH_FOUND XCB_EWMH_INCLUDE_DIR XCB_EWMH_LIBRARY
|
||||||
|
# XCB_IMAGE_FOUND XCB_IMAGE_INCLUDE_DIR XCB_IMAGE_LIBRARY
|
||||||
|
# XCB_RENDERUTIL_FOUND XCB_RENDERUTIL_INCLUDE_DIR XCB_RENDERUTIL_LIBRARY
|
||||||
|
# XCB_KEYSYMS_FOUND XCB_KEYSYMS_INCLUDE_DIR XCB_KEYSYMS_LIBRARY
|
||||||
|
#
|
||||||
|
# Copyright (c) 2011 Fredrik Höglund <fredrik@kde.org>
|
||||||
|
# Copyright (c) 2013 Martin Gräßlin <mgraesslin@kde.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||||
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
|
||||||
|
set(knownComponents XCB
|
||||||
|
COMPOSITE
|
||||||
|
DAMAGE
|
||||||
|
DRI2
|
||||||
|
EWMH
|
||||||
|
GLX
|
||||||
|
ICCCM
|
||||||
|
IMAGE
|
||||||
|
KEYSYMS
|
||||||
|
RANDR
|
||||||
|
RENDER
|
||||||
|
RENDERUTIL
|
||||||
|
SHAPE
|
||||||
|
SHM
|
||||||
|
SYNC
|
||||||
|
UTIL
|
||||||
|
XFIXES
|
||||||
|
XTEST
|
||||||
|
XV
|
||||||
|
XINERAMA)
|
||||||
|
|
||||||
|
unset(unknownComponents)
|
||||||
|
|
||||||
|
set(pkgConfigModules)
|
||||||
|
set(requiredComponents)
|
||||||
|
|
||||||
|
if (XCB_FIND_COMPONENTS)
|
||||||
|
set(comps ${XCB_FIND_COMPONENTS})
|
||||||
|
else()
|
||||||
|
set(comps ${knownComponents})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# iterate through the list of requested components, and check that we know them all.
|
||||||
|
# If not, fail.
|
||||||
|
foreach(comp ${comps})
|
||||||
|
list(FIND knownComponents ${comp} index )
|
||||||
|
if("${index}" STREQUAL "-1")
|
||||||
|
list(APPEND unknownComponents "${comp}")
|
||||||
|
else()
|
||||||
|
if("${comp}" STREQUAL "XCB")
|
||||||
|
list(APPEND pkgConfigModules "xcb")
|
||||||
|
elseif("${comp}" STREQUAL "COMPOSITE")
|
||||||
|
list(APPEND pkgConfigModules "xcb-composite")
|
||||||
|
elseif("${comp}" STREQUAL "DAMAGE")
|
||||||
|
list(APPEND pkgConfigModules "xcb-damage")
|
||||||
|
elseif("${comp}" STREQUAL "DRI2")
|
||||||
|
list(APPEND pkgConfigModules "xcb-dri2")
|
||||||
|
elseif("${comp}" STREQUAL "EWMH")
|
||||||
|
list(APPEND pkgConfigModules "xcb-ewmh")
|
||||||
|
elseif("${comp}" STREQUAL "GLX")
|
||||||
|
list(APPEND pkgConfigModules "xcb-glx")
|
||||||
|
elseif("${comp}" STREQUAL "ICCCM")
|
||||||
|
list(APPEND pkgConfigModules "xcb-icccm")
|
||||||
|
elseif("${comp}" STREQUAL "IMAGE")
|
||||||
|
list(APPEND pkgConfigModules "xcb-image")
|
||||||
|
elseif("${comp}" STREQUAL "KEYSYMS")
|
||||||
|
list(APPEND pkgConfigModules "xcb-keysyms")
|
||||||
|
elseif("${comp}" STREQUAL "RANDR")
|
||||||
|
list(APPEND pkgConfigModules "xcb-randr")
|
||||||
|
elseif("${comp}" STREQUAL "RENDER")
|
||||||
|
list(APPEND pkgConfigModules "xcb-render")
|
||||||
|
elseif("${comp}" STREQUAL "RENDERUTIL")
|
||||||
|
list(APPEND pkgConfigModules "xcb-renderutil")
|
||||||
|
elseif("${comp}" STREQUAL "SHAPE")
|
||||||
|
list(APPEND pkgConfigModules "xcb-shape")
|
||||||
|
elseif("${comp}" STREQUAL "SHM")
|
||||||
|
list(APPEND pkgConfigModules "xcb-shm")
|
||||||
|
elseif("${comp}" STREQUAL "SYNC")
|
||||||
|
list(APPEND pkgConfigModules "xcb-sync")
|
||||||
|
elseif("${comp}" STREQUAL "UTIL")
|
||||||
|
list(APPEND pkgConfigModules "xcb-util")
|
||||||
|
elseif("${comp}" STREQUAL "XFIXES")
|
||||||
|
list(APPEND pkgConfigModules "xcb-xfixes")
|
||||||
|
elseif("${comp}" STREQUAL "XTEST")
|
||||||
|
list(APPEND pkgConfigModules "xcb-xtest")
|
||||||
|
elseif("${comp}" STREQUAL "XV")
|
||||||
|
list(APPEND pkgConfigModules "xcb-xv")
|
||||||
|
elseif("${comp}" STREQUAL "XINERAMA")
|
||||||
|
list(APPEND pkgConfigModules "xcb-xinerama")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
|
||||||
|
if(DEFINED unknownComponents)
|
||||||
|
set(msgType STATUS)
|
||||||
|
if(XCB_FIND_REQUIRED)
|
||||||
|
set(msgType FATAL_ERROR)
|
||||||
|
endif()
|
||||||
|
if(NOT XCB_FIND_QUIETLY)
|
||||||
|
message(${msgType} "XCB: requested unknown components ${unknownComponents}")
|
||||||
|
endif()
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
macro(_XCB_HANDLE_COMPONENT _comp)
|
||||||
|
set(_header )
|
||||||
|
set(_lib )
|
||||||
|
if("${_comp}" STREQUAL "XCB")
|
||||||
|
set(_header "xcb/xcb.h")
|
||||||
|
set(_lib "xcb")
|
||||||
|
elseif("${_comp}" STREQUAL "COMPOSITE")
|
||||||
|
set(_header "xcb/composite.h")
|
||||||
|
set(_lib "xcb-composite")
|
||||||
|
elseif("${_comp}" STREQUAL "DAMAGE")
|
||||||
|
set(_header "xcb/damage.h")
|
||||||
|
set(_lib "xcb-damage")
|
||||||
|
elseif("${_comp}" STREQUAL "DRI2")
|
||||||
|
set(_header "xcb/dri2.h")
|
||||||
|
set(_lib "xcb-dri2")
|
||||||
|
elseif("${_comp}" STREQUAL "EWMH")
|
||||||
|
set(_header "xcb/xcb_ewmh.h")
|
||||||
|
set(_lib "xcb-ewmh")
|
||||||
|
elseif("${_comp}" STREQUAL "GLX")
|
||||||
|
set(_header "xcb/glx.h")
|
||||||
|
set(_lib "xcb-glx")
|
||||||
|
elseif("${_comp}" STREQUAL "ICCCM")
|
||||||
|
set(_header "xcb/xcb_icccm.h")
|
||||||
|
set(_lib "xcb-icccm")
|
||||||
|
elseif("${_comp}" STREQUAL "IMAGE")
|
||||||
|
set(_header "xcb/xcb_image.h")
|
||||||
|
set(_lib "xcb-image")
|
||||||
|
elseif("${_comp}" STREQUAL "KEYSYMS")
|
||||||
|
set(_header "xcb/xcb_keysyms.h")
|
||||||
|
set(_lib "xcb-keysyms")
|
||||||
|
elseif("${_comp}" STREQUAL "RANDR")
|
||||||
|
set(_header "xcb/randr.h")
|
||||||
|
set(_lib "xcb-randr")
|
||||||
|
elseif("${_comp}" STREQUAL "RENDER")
|
||||||
|
set(_header "xcb/render.h")
|
||||||
|
set(_lib "xcb-render")
|
||||||
|
elseif("${_comp}" STREQUAL "RENDERUTIL")
|
||||||
|
set(_header "xcb/xcb_renderutil.h")
|
||||||
|
set(_lib "xcb-render-util")
|
||||||
|
elseif("${_comp}" STREQUAL "SHAPE")
|
||||||
|
set(_header "xcb/shape.h")
|
||||||
|
set(_lib "xcb-shape")
|
||||||
|
elseif("${_comp}" STREQUAL "SHM")
|
||||||
|
set(_header "xcb/shm.h")
|
||||||
|
set(_lib "xcb-shm")
|
||||||
|
elseif("${_comp}" STREQUAL "SYNC")
|
||||||
|
set(_header "xcb/sync.h")
|
||||||
|
set(_lib "xcb-sync")
|
||||||
|
elseif("${_comp}" STREQUAL "UTIL")
|
||||||
|
set(_header "xcb/xcb_util.h")
|
||||||
|
set(_lib "xcb-util")
|
||||||
|
elseif("${_comp}" STREQUAL "XFIXES")
|
||||||
|
set(_header "xcb/xfixes.h")
|
||||||
|
set(_lib "xcb-xfixes")
|
||||||
|
elseif("${_comp}" STREQUAL "XTEST")
|
||||||
|
set(_header "xcb/xtest.h")
|
||||||
|
set(_lib "xcb-xtest")
|
||||||
|
elseif("${_comp}" STREQUAL "XV")
|
||||||
|
set(_header "xcb/xv.h")
|
||||||
|
set(_lib "xcb-xv")
|
||||||
|
elseif("${_comp}" STREQUAL "XINERAMA")
|
||||||
|
set(_header "xcb/xinerama.h")
|
||||||
|
set(_lib "xcb-xinerama")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(XCB_${_comp}_INCLUDE_DIR NAMES ${_header} HINTS ${PKG_XCB_INCLUDE_DIRS})
|
||||||
|
find_library(XCB_${_comp}_LIBRARY NAMES ${_lib} HINTS ${PKG_XCB_LIBRARY_DIRS})
|
||||||
|
|
||||||
|
if(XCB_${_comp}_INCLUDE_DIR AND XCB_${_comp}_LIBRARY)
|
||||||
|
list(APPEND XCB_INCLUDE_DIRS ${XCB_${_comp}_INCLUDE_DIR})
|
||||||
|
list(APPEND XCB_LIBRARIES ${XCB_${_comp}_LIBRARY})
|
||||||
|
if (NOT XCB_FIND_QUIETLY)
|
||||||
|
message(STATUS "XCB[${_comp}]: Found component ${_comp}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(XCB_FIND_REQUIRED_${_comp})
|
||||||
|
list(APPEND requiredComponents XCB_${_comp}_FOUND)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package_handle_standard_args(XCB_${_comp} DEFAULT_MSG XCB_${_comp}_LIBRARY XCB_${_comp}_INCLUDE_DIR)
|
||||||
|
|
||||||
|
mark_as_advanced(XCB_${_comp}_LIBRARY XCB_${_comp}_INCLUDE_DIR)
|
||||||
|
|
||||||
|
# compatibility for old variable naming
|
||||||
|
set(XCB_${_comp}_INCLUDE_DIRS ${XCB_${_comp}_INCLUDE_DIR})
|
||||||
|
set(XCB_${_comp}_LIBRARIES ${XCB_${_comp}_LIBRARY})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
IF (NOT WIN32)
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
# Use pkg-config to get the directories and then use these values
|
||||||
|
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||||
|
find_package(PkgConfig)
|
||||||
|
pkg_check_modules(PKG_XCB QUIET ${pkgConfigModules})
|
||||||
|
|
||||||
|
set(XCB_DEFINITIONS ${PKG_XCB_CFLAGS})
|
||||||
|
|
||||||
|
foreach(comp ${comps})
|
||||||
|
_xcb_handle_component(${comp})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(XCB_INCLUDE_DIRS)
|
||||||
|
list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package_handle_standard_args(XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIRS ${requiredComponents})
|
||||||
|
|
||||||
|
# compatibility for old variable naming
|
||||||
|
set(XCB_INCLUDE_DIR ${XCB_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
ENDIF (NOT WIN32)
|
68
cmake/Modules/FindZLIB.cmake
Normal file
68
cmake/Modules/FindZLIB.cmake
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# ZLIB_FOUND
|
||||||
|
# ZLIB_INCLUDE_DIRS
|
||||||
|
# ZLIB_LIBRARIES
|
||||||
|
#
|
||||||
|
# For use in OBS:
|
||||||
|
#
|
||||||
|
# ZLIB_INCLUDE_DIR
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_ZLIB QUIET zlib)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(ZLIB_INCLUDE_DIR
|
||||||
|
NAMES zlib.h
|
||||||
|
HINTS
|
||||||
|
ENV zlibPath${_lib_suffix}
|
||||||
|
ENV zlibPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${zlibPath${_lib_suffix}}
|
||||||
|
${zlibPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_ZLIB_INCLUDE_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||||
|
PATH_SUFFIXES
|
||||||
|
include)
|
||||||
|
|
||||||
|
find_library(ZLIB_LIB
|
||||||
|
NAMES ${_ZLIB_LIBRARIES} z zlib zdll zlib1 zlibd zlibd1 libzlib libz
|
||||||
|
HINTS
|
||||||
|
ENV zlibPath${_lib_suffix}
|
||||||
|
ENV zlibPath
|
||||||
|
ENV DepsPath${_lib_suffix}
|
||||||
|
ENV DepsPath
|
||||||
|
${zlibPath${_lib_suffix}}
|
||||||
|
${zlibPath}
|
||||||
|
${DepsPath${_lib_suffix}}
|
||||||
|
${DepsPath}
|
||||||
|
${_ZLIB_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib${_lib_suffix} lib
|
||||||
|
libs${_lib_suffix} libs
|
||||||
|
bin${_lib_suffix} bin
|
||||||
|
../lib${_lib_suffix} ../lib
|
||||||
|
../libs${_lib_suffix} ../libs
|
||||||
|
../bin${_lib_suffix} ../bin)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(zlib DEFAULT_MSG ZLIB_LIB ZLIB_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(ZLIB_INCLUDE_DIR ZLIB_LIB)
|
||||||
|
|
||||||
|
if(ZLIB_FOUND)
|
||||||
|
set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||||
|
set(ZLIB_LIBRARIES ${ZLIB_LIB})
|
||||||
|
endif()
|
65
cmake/Modules/IDLFileHelper.cmake
Normal file
65
cmake/Modules/IDLFileHelper.cmake
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
macro(add_idl_files generated_files)
|
||||||
|
foreach(filename ${ARGN})
|
||||||
|
get_filename_component(file_we ${filename} NAME_WE)
|
||||||
|
get_filename_component(file_path ${filename} PATH)
|
||||||
|
|
||||||
|
set(file_c ${file_we}_i.c)
|
||||||
|
set(file_h ${file_we}.h)
|
||||||
|
set(bin_file_h ${CMAKE_CURRENT_BINARY_DIR}/${file_h})
|
||||||
|
set(bin_file_c ${CMAKE_CURRENT_BINARY_DIR}/${file_c})
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${bin_file_h} ${bin_file_c}
|
||||||
|
DEPENDS ${filename}
|
||||||
|
COMMAND midl /h ${file_h} /iid ${file_c} /notlb ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
else()
|
||||||
|
execute_process(COMMAND echo
|
||||||
|
COMMAND ${CMAKE_C_COMPILER} -v -x c++ -E -
|
||||||
|
ERROR_VARIABLE cpp_inc_output
|
||||||
|
OUTPUT_QUIET
|
||||||
|
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
string(REPLACE ";" " " include_dirs ${cpp_inc_output})
|
||||||
|
string(REPLACE "\n" ";" include_dirs ${cpp_inc_output})
|
||||||
|
|
||||||
|
set(include_params)
|
||||||
|
foreach(include_dir ${include_dirs})
|
||||||
|
string(SUBSTRING ${include_dir} 0 1 first_char)
|
||||||
|
if(${first_char} STREQUAL " ")
|
||||||
|
string(LENGTH "${include_dir}" include_dir_len)
|
||||||
|
math(EXPR include_dir_len "${include_dir_len} - 1")
|
||||||
|
string(SUBSTRING ${include_dir} 1 ${include_dir_len} include_dir)
|
||||||
|
set(include_params "-I\"${include_dir}\" ${include_params}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
separate_arguments(include_params WINDOWS_COMMAND ${include_params})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${file_h}
|
||||||
|
DEPENDS ${filename}
|
||||||
|
COMMAND ${CMAKE_WIDL} ${include_params} -h -o ${file_h} ${CMAKE_CURRENT_SOURCE_DIR}/${filename}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
|
file(WRITE ${bin_file_c} "#include <initguid.h>\n#include <${file_h}>\n")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_source_files_properties(
|
||||||
|
${bin_file_h}
|
||||||
|
${bin_file_c}
|
||||||
|
PROPERTIES
|
||||||
|
GENERATED TRUE)
|
||||||
|
|
||||||
|
set(${generated_files} ${${generated_file}}
|
||||||
|
${bin_file_h}
|
||||||
|
${bin_file_c})
|
||||||
|
|
||||||
|
set_source_files_properties(${filename}
|
||||||
|
PROPERTIES
|
||||||
|
HEADER_FILE_ONLY TRUE)
|
||||||
|
endforeach(filename ${ARGN})
|
||||||
|
endmacro(add_idl_files)
|
90
cmake/Modules/ObsCpack.cmake
Normal file
90
cmake/Modules/ObsCpack.cmake
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
|
||||||
|
if(APPLE AND NOT CPACK_GENERATOR)
|
||||||
|
set(CPACK_GENERATOR "Bundle")
|
||||||
|
elseif(WIN32 AND NOT CPACK_GENERATOR)
|
||||||
|
set(CPACK_GENERATOR "WIX" "ZIP")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CPACK_PACKAGE_NAME "OBS")
|
||||||
|
set(CPACK_PACKAGE_VENDOR "obsproject.com")
|
||||||
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OBS - Live video and audio streaming and recording software")
|
||||||
|
|
||||||
|
set(CPACK_PACKAGE_VERSION_MAJOR "0")
|
||||||
|
set(CPACK_PACKAGE_VERSION_MINOR "0")
|
||||||
|
set(CPACK_PACKAGE_VERSION_PATCH "1")
|
||||||
|
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
||||||
|
|
||||||
|
if(NOT DEFINED OBS_VERSION_OVERRIDE)
|
||||||
|
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
|
execute_process(COMMAND git describe --always --tags --dirty=-modified
|
||||||
|
OUTPUT_VARIABLE OBS_VERSION
|
||||||
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
else()
|
||||||
|
set(OBS_VERSION "${CPACK_PACKAGE_VERSION}")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(OBS_VERSION "${OBS_VERSION_OVERRIDE}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
MESSAGE(STATUS "OBS_VERSION: ${OBS_VERSION}")
|
||||||
|
|
||||||
|
if(INSTALLER_RUN)
|
||||||
|
set(CPACK_PACKAGE_EXECUTABLES
|
||||||
|
"obs32" "OBS Studio (32bit)"
|
||||||
|
"obs64" "OBS Studio (64bit)")
|
||||||
|
set(CPACK_CREATE_DESKTOP_LINKS
|
||||||
|
"obs32"
|
||||||
|
"obs64")
|
||||||
|
else()
|
||||||
|
if(WIN32)
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_output_suffix "64")
|
||||||
|
else()
|
||||||
|
set(_output_suffix "32")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(_output_suffix "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CPACK_PACKAGE_EXECUTABLES "obs${_output_suffix}" "OBS Studio")
|
||||||
|
set(CPACK_CREATE_DESKTOP_LINKS "obs${_output_suffix}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CPACK_BUNDLE_NAME "OBS")
|
||||||
|
set(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/cmake/osxbundle/Info.plist")
|
||||||
|
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/cmake/osxbundle/obs.icns")
|
||||||
|
set(CPACK_BUNDLE_STARTUP_COMMAND "${CMAKE_SOURCE_DIR}/cmake/osxbundle/obslaunch.sh")
|
||||||
|
|
||||||
|
set(CPACK_WIX_TEMPLATE "${CMAKE_SOURCE_DIR}/cmake/Modules/WIX.template.in")
|
||||||
|
|
||||||
|
if(INSTALLER_RUN)
|
||||||
|
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "OBSStudio")
|
||||||
|
set(CPACK_WIX_UPGRADE_GUID "1f59ff79-2a3c-43c1-b2b2-033a5e6342eb")
|
||||||
|
set(CPACK_WIX_PRODUCT_GUID "0c7bec2a-4f07-41b2-9dff-d64b09c9c384")
|
||||||
|
set(CPACK_PACKAGE_FILE_NAME "obs-studio-${OBS_VERSION}")
|
||||||
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
if(WIN32)
|
||||||
|
set(CPACK_PACKAGE_NAME "OBS Studio (64bit)")
|
||||||
|
endif()
|
||||||
|
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "OBSStudio64")
|
||||||
|
set(CPACK_WIX_UPGRADE_GUID "44c72510-2e8e-489c-8bc0-2011a9631b0b")
|
||||||
|
set(CPACK_WIX_PRODUCT_GUID "ca5bf4fe-7b38-4003-9455-de249d03caac")
|
||||||
|
set(CPACK_PACKAGE_FILE_NAME "obs-studio-x64-${OBS_VERSION}")
|
||||||
|
else()
|
||||||
|
if(WIN32)
|
||||||
|
set(CPACK_PACKAGE_NAME "OBS Studio (32bit)")
|
||||||
|
endif()
|
||||||
|
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "OBSStudio32")
|
||||||
|
set(CPACK_WIX_UPGRADE_GUID "a26acea4-6190-4470-9fb9-f6d32f3ba030")
|
||||||
|
set(CPACK_WIX_PRODUCT_GUID "8e24982d-b0ab-4f66-9c90-f726f3b64682")
|
||||||
|
set(CPACK_PACKAGE_FILE_NAME "obs-studio-x86-${OBS_VERSION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
|
||||||
|
|
||||||
|
if(UNIX_STRUCTURE)
|
||||||
|
set(CPACK_SET_DESTDIR TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(CPack)
|
544
cmake/Modules/ObsHelpers.cmake
Normal file
544
cmake/Modules/ObsHelpers.cmake
Normal file
|
@ -0,0 +1,544 @@
|
||||||
|
set(OBS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/rundir")
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WIN32 OR APPLE)
|
||||||
|
set(_struct_def FALSE)
|
||||||
|
else()
|
||||||
|
set(_struct_def TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(INSTALLER_RUN "Build a multiarch installer, needs to run indenepdently after both archs have compiled" FALSE)
|
||||||
|
option(UNIX_STRUCTURE "Build with standard unix filesystem structure" ${_struct_def})
|
||||||
|
if(APPLE)
|
||||||
|
option(BUILD_REDISTRIBUTABLE "Fix rpath of external libraries" FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(INSTALLER_RUN AND NOT DEFINED ENV{obsInstallerTempDir})
|
||||||
|
message(FATAL_ERROR "Environment variable obsInstallerTempDir is needed for multiarch installer generation")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(DEFINED ENV{obsInstallerTempDir})
|
||||||
|
file(TO_CMAKE_PATH "$ENV{obsInstallerTempDir}" ENV{obsInstallerTempDir})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(DEFINED ENV{obsAdditionalInstallFiles})
|
||||||
|
file(TO_CMAKE_PATH "$ENV{obsAdditionalInstallFiles}" ENV{obsAdditionalInstallFiles})
|
||||||
|
else()
|
||||||
|
set(ENV{obsAdditionalInstallFiles} "${CMAKE_SOURCE_DIR}/additional_install_files")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(APPEND CMAKE_INCLUDE_PATH
|
||||||
|
"$ENV{obsAdditionalInstallFiles}/include${_lib_suffix}"
|
||||||
|
"$ENV{obsAdditionalInstallFiles}/include")
|
||||||
|
|
||||||
|
list(APPEND CMAKE_LIBRARY_PATH
|
||||||
|
"$ENV{obsAdditionalInstallFiles}/lib${_lib_suffix}"
|
||||||
|
"$ENV{obsAdditionalInstallFiles}/lib"
|
||||||
|
"$ENV{obsAdditionalInstallFiles}/libs${_lib_suffix}"
|
||||||
|
"$ENV{obsAdditionalInstallFiles}/libs"
|
||||||
|
"$ENV{obsAdditionalInstallFiles}/bin${_lib_suffix}"
|
||||||
|
"$ENV{obsAdditionalInstallFiles}/bin")
|
||||||
|
|
||||||
|
if(NOT UNIX_STRUCTURE)
|
||||||
|
set(OBS_DATA_DESTINATION "data")
|
||||||
|
if(APPLE)
|
||||||
|
set(OBS_EXECUTABLE_DESTINATION "bin")
|
||||||
|
set(OBS_EXECUTABLE32_DESTINATION "bin")
|
||||||
|
set(OBS_EXECUTABLE64_DESTINATION "bin")
|
||||||
|
set(OBS_LIBRARY_DESTINATION "bin")
|
||||||
|
set(OBS_LIBRARY32_DESTINATION "bin")
|
||||||
|
set(OBS_LIBRARY64_DESTINATION "bin")
|
||||||
|
set(OBS_PLUGIN_DESTINATION "obs-plugins")
|
||||||
|
set(OBS_PLUGIN32_DESTINATION "obs-plugins")
|
||||||
|
set(OBS_PLUGIN64_DESTINATION "obs-plugins")
|
||||||
|
|
||||||
|
set(OBS_DATA_PATH "../${OBS_DATA_DESTINATION}")
|
||||||
|
set(OBS_INSTALL_PREFIX "")
|
||||||
|
set(OBS_RELATIVE_PREFIX "../")
|
||||||
|
else()
|
||||||
|
set(OBS_EXECUTABLE_DESTINATION "bin/${_lib_suffix}bit")
|
||||||
|
set(OBS_EXECUTABLE32_DESTINATION "bin/32bit")
|
||||||
|
set(OBS_EXECUTABLE64_DESTINATION "bin/64bit")
|
||||||
|
set(OBS_LIBRARY_DESTINATION "bin/${_lib_suffix}bit")
|
||||||
|
set(OBS_LIBRARY32_DESTINATION "bin/32bit")
|
||||||
|
set(OBS_LIBRARY64_DESTINATION "bin/64bit")
|
||||||
|
set(OBS_PLUGIN_DESTINATION "obs-plugins/${_lib_suffix}bit")
|
||||||
|
set(OBS_PLUGIN32_DESTINATION "obs-plugins/32bit")
|
||||||
|
set(OBS_PLUGIN64_DESTINATION "obs-plugins/64bit")
|
||||||
|
|
||||||
|
set(OBS_DATA_PATH "../../${OBS_DATA_DESTINATION}")
|
||||||
|
set(OBS_INSTALL_PREFIX "")
|
||||||
|
set(OBS_RELATIVE_PREFIX "../../")
|
||||||
|
endif()
|
||||||
|
set(OBS_CMAKE_DESTINATION "cmake")
|
||||||
|
set(OBS_INCLUDE_DESTINATION "include")
|
||||||
|
set(OBS_UNIX_STRUCTURE "0")
|
||||||
|
else()
|
||||||
|
if(NOT OBS_MULTIARCH_SUFFIX AND DEFINED ENV{OBS_MULTIARCH_SUFFIX})
|
||||||
|
set(OBS_MULTIARCH_SUFFIX "$ENV{OBS_MULTIARCH_SUFFIX}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(OBS_EXECUTABLE_DESTINATION "bin")
|
||||||
|
set(OBS_EXECUTABLE32_DESTINATION "bin32")
|
||||||
|
set(OBS_EXECUTABLE64_DESTINATION "bin64")
|
||||||
|
set(OBS_LIBRARY_DESTINATION "lib${OBS_MULTIARCH_SUFFIX}")
|
||||||
|
set(OBS_LIBRARY32_DESTINATION "lib32")
|
||||||
|
set(OBS_LIBRARY64_DESTINATION "lib64")
|
||||||
|
set(OBS_PLUGIN_DESTINATION "${OBS_LIBRARY_DESTINATION}/obs-plugins")
|
||||||
|
set(OBS_PLUGIN32_DESTINATION "${OBS_LIBRARY32_DESTINATION}/obs-plugins")
|
||||||
|
set(OBS_PLUGIN64_DESTINATION "${OBS_LIBRARY64_DESTINATION}/obs-plugins")
|
||||||
|
set(OBS_DATA_DESTINATION "share/obs")
|
||||||
|
set(OBS_CMAKE_DESTINATION "${OBS_LIBRARY_DESTINATION}/cmake")
|
||||||
|
set(OBS_INCLUDE_DESTINATION "include/obs")
|
||||||
|
|
||||||
|
set(OBS_DATA_PATH "${OBS_DATA_DESTINATION}")
|
||||||
|
set(OBS_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
|
||||||
|
set(OBS_RELATIVE_PREFIX "../")
|
||||||
|
set(OBS_UNIX_STRUCTURE "1")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
function(obs_finish_bundle)
|
||||||
|
if(NOT APPLE OR UNIX_STRUCTURE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(CODE
|
||||||
|
"if(DEFINED ENV{FIXUP_BUNDLE})
|
||||||
|
execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/cmake/osxbundle/fixup_bundle.sh\" . bin WORKING_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}\")
|
||||||
|
endif()")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(obs_generate_multiarch_installer)
|
||||||
|
install(DIRECTORY "$ENV{obsInstallerTempDir}/"
|
||||||
|
DESTINATION "."
|
||||||
|
USE_SOURCE_PERMISSIONS)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(obs_helper_copy_dir target target_configs source dest)
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}"
|
||||||
|
"-DCONFIG=$<CONFIGURATION>"
|
||||||
|
"-DTARGET_CONFIGS=${target_configs}"
|
||||||
|
"-DINPUT=${source}"
|
||||||
|
"-DOUTPUT=${dest}"
|
||||||
|
-P "${CMAKE_SOURCE_DIR}/cmake/copy_helper.cmake"
|
||||||
|
VERBATIM)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(obs_install_additional maintarget)
|
||||||
|
set(addfdir "${CMAKE_SOURCE_DIR}/additional_install_files")
|
||||||
|
if(DEFINED ENV{obsAdditionalInstallFiles})
|
||||||
|
set(addfdir "$ENV{obsAdditionalInstallFiles}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(DIRECTORY "${addfdir}/misc/"
|
||||||
|
DESTINATION "."
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/data/"
|
||||||
|
DESTINATION "${OBS_DATA_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
|
||||||
|
if(INSTALLER_RUN)
|
||||||
|
install(DIRECTORY "${addfdir}/libs32/"
|
||||||
|
DESTINATION "${OBS_LIBRARY32_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec32/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE32_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/libs64/"
|
||||||
|
DESTINATION "${OBS_LIBRARY64_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec64/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE64_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
|
||||||
|
install(DIRECTORY "${addfdir}/libs32d/"
|
||||||
|
DESTINATION "${OBS_LIBRARY32_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec32d/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE32_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/libs64d/"
|
||||||
|
DESTINATION "${OBS_LIBRARY64_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec64d/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE64_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
|
||||||
|
install(DIRECTORY "${addfdir}/libs32r/"
|
||||||
|
DESTINATION "${OBS_LIBRARY32_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec32r/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE32_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/libs64r/"
|
||||||
|
DESTINATION "${OBS_LIBRARY64_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec64r/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE64_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
else()
|
||||||
|
install(DIRECTORY "${addfdir}/libs${_lib_suffix}/"
|
||||||
|
DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec${_lib_suffix}/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
|
||||||
|
install(DIRECTORY "${addfdir}/libs${_lib_suffix}d/"
|
||||||
|
DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec${_lib_suffix}d/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
|
||||||
|
install(DIRECTORY "${addfdir}/libs${_lib_suffix}r/"
|
||||||
|
DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec${_lib_suffix}r/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
obs_helper_copy_dir(${maintarget} ALL
|
||||||
|
"${addfdir}/misc/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/")
|
||||||
|
obs_helper_copy_dir(${maintarget} ALL
|
||||||
|
"${addfdir}/data/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_DATA_DESTINATION}/")
|
||||||
|
obs_helper_copy_dir(${maintarget} ALL
|
||||||
|
"${addfdir}/libs${_lib_suffix}/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_LIBRARY_DESTINATION}/")
|
||||||
|
obs_helper_copy_dir(${maintarget} ALL
|
||||||
|
"${addfdir}/exec${_lib_suffix}/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_EXECUTABLE_DESTINATION}/")
|
||||||
|
|
||||||
|
obs_helper_copy_dir(${maintarget} "Release;MinSizeRel;RelWithDebInfo"
|
||||||
|
"${addfdir}/exec${_lib_suffix}r/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_EXECUTABLE_DESTINATION}/")
|
||||||
|
obs_helper_copy_dir(${maintarget} "Debug"
|
||||||
|
"${addfdir}/exec${_lib_suffix}d/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_EXECUTABLE_DESTINATION}/")
|
||||||
|
obs_helper_copy_dir(${maintarget} "Release;MinSizeRel;RelWithDebInfo"
|
||||||
|
"${addfdir}/libs${_lib_suffix}r/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_LIBRARY_DESTINATION}/")
|
||||||
|
obs_helper_copy_dir(${maintarget} "Debug"
|
||||||
|
"${addfdir}/libs${_lib_suffix}d/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_LIBRARY_DESTINATION}/")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(export_obs_core target exportname)
|
||||||
|
install(TARGETS ${target}
|
||||||
|
EXPORT "${exportname}Target"
|
||||||
|
LIBRARY DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||||
|
ARCHIVE DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||||
|
RUNTIME DESTINATION "${OBS_EXECUTABLE_DESTINATION}")
|
||||||
|
|
||||||
|
export(TARGETS ${target} FILE "${CMAKE_CURRENT_BINARY_DIR}/${exportname}Target.cmake")
|
||||||
|
export(PACKAGE "${exportname}")
|
||||||
|
|
||||||
|
set(CONF_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
set(CONF_PLUGIN_DEST "${CMAKE_BINARY_DIR}/rundir/${CMAKE_BUILD_TYPE}/obs-plugins/${_lib_suffix}bit")
|
||||||
|
set(CONF_PLUGIN_DEST32 "${CMAKE_BINARY_DIR}/rundir/${CMAKE_BUILD_TYPE}/obs-plugins/32bit")
|
||||||
|
set(CONF_PLUGIN_DEST64 "${CMAKE_BINARY_DIR}/rundir/${CMAKE_BUILD_TYPE}/obs-plugins/64bit")
|
||||||
|
set(CONF_PLUGIN_DATA_DEST "${CMAKE_BINARY_DIR}/rundir/${CMAKE_BUILD_TYPE}/data/obs-plugins")
|
||||||
|
configure_file("${exportname}Config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${exportname}Config.cmake" @ONLY)
|
||||||
|
|
||||||
|
file(RELATIVE_PATH _pdir "${CMAKE_INSTALL_PREFIX}/${OBS_CMAKE_DESTINATION}/${exportname}" "${CMAKE_INSTALL_PREFIX}")
|
||||||
|
set(CONF_INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/${_pdir}${OBS_INCLUDE_DESTINATION}")
|
||||||
|
set(CONF_PLUGIN_DEST "\${CMAKE_CURRENT_LIST_DIR}/${_pdir}${OBS_PLUGIN_DESTINATION}")
|
||||||
|
set(CONF_PLUGIN_DEST32 "\${CMAKE_CURRENT_LIST_DIR}/${_pdir}${OBS_PLUGIN32_DESTINATION}")
|
||||||
|
set(CONF_PLUGIN_DEST64 "\${CMAKE_CURRENT_LIST_DIR}/${_pdir}${OBS_PLUGIN64_DESTINATION}")
|
||||||
|
set(CONF_PLUGIN_DATA_DEST "\${CMAKE_CURRENT_LIST_DIR}/${_pdir}${OBS_DATA_DESTINATION}/obs-plugins")
|
||||||
|
configure_file("${exportname}Config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${exportname}Config.cmake" @ONLY)
|
||||||
|
|
||||||
|
set(_pdir)
|
||||||
|
|
||||||
|
configure_file("${exportname}ConfigVersion.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/${exportname}ConfigVersion.cmake" @ONLY)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${exportname}Config.cmake"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/${exportname}ConfigVersion.cmake"
|
||||||
|
DESTINATION "${OBS_CMAKE_DESTINATION}/${exportname}")
|
||||||
|
|
||||||
|
install(EXPORT "${exportname}Target"
|
||||||
|
DESTINATION "${OBS_CMAKE_DESTINATION}/${exportname}")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(install_obs_headers)
|
||||||
|
foreach(hdr ${ARGN})
|
||||||
|
if(IS_ABSOLUTE "${hdr}")
|
||||||
|
set(subdir)
|
||||||
|
else()
|
||||||
|
get_filename_component(subdir "${hdr}" DIRECTORY)
|
||||||
|
if(subdir)
|
||||||
|
set(subdir "/${subdir}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
install(FILES "${hdr}" DESTINATION "${OBS_INCLUDE_DESTINATION}${subdir}")
|
||||||
|
endforeach()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(obs_debug_copy_helper target dest)
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}"
|
||||||
|
"-DCONFIG=$<CONFIGURATION>"
|
||||||
|
"-DFNAME=$<TARGET_FILE_NAME:${target}>"
|
||||||
|
"-DINPUT=$<TARGET_FILE_DIR:${target}>"
|
||||||
|
"-DOUTPUT=${dest}"
|
||||||
|
-P "${CMAKE_SOURCE_DIR}/cmake/copy_on_debug_helper.cmake"
|
||||||
|
VERBATIM)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(install_obs_pdb ttype target)
|
||||||
|
if(NOT MSVC)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_bit_suffix "64bit")
|
||||||
|
else()
|
||||||
|
set(_bit_suffix "32bit")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
obs_debug_copy_helper(${target} "${CMAKE_CURRENT_BINARY_DIR}/pdbs")
|
||||||
|
|
||||||
|
if("${ttype}" STREQUAL "PLUGIN")
|
||||||
|
obs_debug_copy_helper(${target} "${OBS_OUTPUT_DIR}/$<CONFIGURATION>/obs-plugins/${_bit_suffix}")
|
||||||
|
|
||||||
|
if(DEFINED ENV{obsInstallerTempDir})
|
||||||
|
obs_debug_copy_helper(${target} "$ENV{obsInstallerTempDir}/${OBS_PLUGIN_DESTINATION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pdbs/"
|
||||||
|
DESTINATION "${OBS_PLUGIN_DESTINATION}"
|
||||||
|
CONFIGURATIONS Debug RelWithDebInfo)
|
||||||
|
else()
|
||||||
|
obs_debug_copy_helper(${target} "${OBS_OUTPUT_DIR}/$<CONFIGURATION>/bin/${_bit_suffix}")
|
||||||
|
|
||||||
|
if(DEFINED ENV{obsInstallerTempDir})
|
||||||
|
obs_debug_copy_helper(${target} "$ENV{obsInstallerTempDir}/${OBS_EXECUTABLE_DESTINATION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pdbs/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||||
|
CONFIGURATIONS Debug RelWithDebInfo)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(install_obs_core target)
|
||||||
|
if(APPLE)
|
||||||
|
set(_bit_suffix "")
|
||||||
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_bit_suffix "64bit/")
|
||||||
|
else()
|
||||||
|
set(_bit_suffix "32bit/")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if("${ARGV1}" STREQUAL "EXPORT")
|
||||||
|
export_obs_core("${target}" "${ARGV2}")
|
||||||
|
else()
|
||||||
|
install(TARGETS ${target}
|
||||||
|
LIBRARY DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||||
|
RUNTIME DESTINATION "${OBS_EXECUTABLE_DESTINATION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"$<TARGET_FILE:${target}>"
|
||||||
|
"${OBS_OUTPUT_DIR}/$<CONFIGURATION>/bin/${_bit_suffix}$<TARGET_FILE_NAME:${target}>"
|
||||||
|
VERBATIM)
|
||||||
|
|
||||||
|
if(DEFINED ENV{obsInstallerTempDir})
|
||||||
|
get_property(target_type TARGET ${target} PROPERTY TYPE)
|
||||||
|
if("${target_type}" STREQUAL "EXECUTABLE")
|
||||||
|
set(tmp_target_dir "${OBS_EXECUTABLE_DESTINATION}")
|
||||||
|
else()
|
||||||
|
set(tmp_target_dir "${OBS_LIBRARY_DESTINATION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"$<TARGET_FILE:${target}>"
|
||||||
|
"$ENV{obsInstallerTempDir}/${tmp_target_dir}/$<TARGET_FILE_NAME:${target}>"
|
||||||
|
VERBATIM)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install_obs_pdb(CORE ${target})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(install_obs_bin target mode)
|
||||||
|
foreach(bin ${ARGN})
|
||||||
|
if(APPLE)
|
||||||
|
set(_bit_suffix "")
|
||||||
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_bit_suffix "64bit/")
|
||||||
|
else()
|
||||||
|
set(_bit_suffix "32bit/")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT IS_ABSOLUTE "${bin}")
|
||||||
|
set(bin "${CMAKE_CURRENT_SOURCE_DIR}/${bin}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_filename_component(fname "${bin}" NAME)
|
||||||
|
|
||||||
|
if(NOT "${mode}" MATCHES "INSTALL_ONLY")
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"${bin}"
|
||||||
|
"${OBS_OUTPUT_DIR}/$<CONFIGURATION>/bin/${_bit_suffix}${fname}"
|
||||||
|
VERBATIM)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(FILES "${bin}"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}")
|
||||||
|
|
||||||
|
if(DEFINED ENV{obsInstallerTempDir})
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"${bin}"
|
||||||
|
"$ENV{obsInstallerTempDir}/${OBS_EXECUTABLE_DESTINATION}/${fname}"
|
||||||
|
VERBATIM)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(install_obs_plugin target)
|
||||||
|
if(APPLE)
|
||||||
|
set(_bit_suffix "")
|
||||||
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_bit_suffix "64bit/")
|
||||||
|
else()
|
||||||
|
set(_bit_suffix "32bit/")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(${target} PROPERTIES
|
||||||
|
PREFIX "")
|
||||||
|
|
||||||
|
install(TARGETS ${target}
|
||||||
|
LIBRARY DESTINATION "${OBS_PLUGIN_DESTINATION}"
|
||||||
|
RUNTIME DESTINATION "${OBS_PLUGIN_DESTINATION}")
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"$<TARGET_FILE:${target}>"
|
||||||
|
"${OBS_OUTPUT_DIR}/$<CONFIGURATION>/obs-plugins/${_bit_suffix}$<TARGET_FILE_NAME:${target}>"
|
||||||
|
VERBATIM)
|
||||||
|
|
||||||
|
if(DEFINED ENV{obsInstallerTempDir})
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"$<TARGET_FILE:${target}>" "$ENV{obsInstallerTempDir}/${OBS_PLUGIN_DESTINATION}/$<TARGET_FILE_NAME:${target}>"
|
||||||
|
VERBATIM)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install_obs_pdb(PLUGIN ${target})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(install_obs_data target datadir datadest)
|
||||||
|
install(DIRECTORY ${datadir}/
|
||||||
|
DESTINATION "${OBS_DATA_DESTINATION}/${datadest}"
|
||||||
|
USE_SOURCE_PERMISSIONS)
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy_directory
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/${datadir}" "${OBS_OUTPUT_DIR}/$<CONFIGURATION>/data/${datadest}"
|
||||||
|
VERBATIM)
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND DEFINED ENV{obsInstallerTempDir})
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy_directory
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/${datadir}" "$ENV{obsInstallerTempDir}/${OBS_DATA_DESTINATION}/${datadest}"
|
||||||
|
VERBATIM)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(install_obs_datatarget target datadest)
|
||||||
|
install(TARGETS ${target}
|
||||||
|
LIBRARY DESTINATION "${OBS_DATA_DESTINATION}/${datadest}"
|
||||||
|
RUNTIME DESTINATION "${OBS_DATA_DESTINATION}/${datadest}")
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"$<TARGET_FILE:${target}>"
|
||||||
|
"${OBS_OUTPUT_DIR}/$<CONFIGURATION>/data/${datadest}/$<TARGET_FILE_NAME:${target}>"
|
||||||
|
VERBATIM)
|
||||||
|
|
||||||
|
if(DEFINED ENV{obsInstallerTempDir})
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"$<TARGET_FILE:${target}>"
|
||||||
|
"$ENV{obsInstallerTempDir}/${OBS_DATA_DESTINATION}/${datadest}/$<TARGET_FILE_NAME:${target}>"
|
||||||
|
VERBATIM)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(install_obs_plugin_with_data target datadir)
|
||||||
|
install_obs_plugin(${target})
|
||||||
|
install_obs_data(${target} "${datadir}" "obs-plugins/${target}")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(define_graphic_modules target)
|
||||||
|
foreach(dl_lib opengl d3d9 d3d11)
|
||||||
|
string(TOUPPER ${dl_lib} dl_lib_upper)
|
||||||
|
if(TARGET libobs-${dl_lib})
|
||||||
|
if(UNIX AND UNIX_STRUCTURE)
|
||||||
|
target_compile_definitions(${target}
|
||||||
|
PRIVATE
|
||||||
|
DL_${dl_lib_upper}="$<TARGET_SONAME_FILE_NAME:libobs-${dl_lib}>"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(${target}
|
||||||
|
PRIVATE
|
||||||
|
DL_${dl_lib_upper}="$<TARGET_FILE_NAME:libobs-${dl_lib}>"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
target_compile_definitions(${target}
|
||||||
|
PRIVATE
|
||||||
|
DL_${dl_lib_upper}=""
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endfunction()
|
43
cmake/Modules/WIX.template.in
Normal file
43
cmake/Modules/WIX.template.in
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?include "cpack_variables.wxi"?>
|
||||||
|
|
||||||
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
||||||
|
RequiredVersion="3.6.3303.0">
|
||||||
|
|
||||||
|
<Product Id="$(var.CPACK_WIX_PRODUCT_GUID)"
|
||||||
|
Name="$(var.CPACK_PACKAGE_NAME)"
|
||||||
|
Language="1033"
|
||||||
|
Version="$(var.CPACK_PACKAGE_VERSION)"
|
||||||
|
Manufacturer="$(var.CPACK_PACKAGE_VENDOR)"
|
||||||
|
UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)">
|
||||||
|
|
||||||
|
<Package InstallerVersion="301" Compressed="yes"/>
|
||||||
|
|
||||||
|
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
|
||||||
|
|
||||||
|
<MajorUpgrade
|
||||||
|
Schedule="afterInstallInitialize"
|
||||||
|
AllowDowngrades="yes"/>
|
||||||
|
|
||||||
|
<WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/>
|
||||||
|
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/>
|
||||||
|
|
||||||
|
<?ifdef CPACK_WIX_PRODUCT_ICON?>
|
||||||
|
<Property Id="ARPPRODUCTICON">ProductIcon.ico</Property>
|
||||||
|
<Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)"/>
|
||||||
|
<?endif?>
|
||||||
|
|
||||||
|
<?ifdef CPACK_WIX_UI_BANNER?>
|
||||||
|
<WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)"/>
|
||||||
|
<?endif?>
|
||||||
|
|
||||||
|
<?ifdef CPACK_WIX_UI_DIALOG?>
|
||||||
|
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)"/>
|
||||||
|
<?endif?>
|
||||||
|
|
||||||
|
<FeatureRef Id="ProductFeature"/>
|
||||||
|
|
||||||
|
<UIRef Id="WixUI_InstallDir" />
|
||||||
|
</Product>
|
||||||
|
</Wix>
|
17
cmake/copy_helper.cmake
Normal file
17
cmake/copy_helper.cmake
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
|
||||||
|
if(NOT EXISTS "${INPUT}")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_do_pass FALSE)
|
||||||
|
foreach(target ${TARGET_CONFIGS})
|
||||||
|
if(target STREQUAL "${CONFIG}" OR target STREQUAL "ALL")
|
||||||
|
set(_do_pass TRUE)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(NOT _do_pass)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(COPY "${INPUT}" DESTINATION "${OUTPUT}")
|
7
cmake/copy_on_debug_helper.cmake
Normal file
7
cmake/copy_on_debug_helper.cmake
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
string(REGEX REPLACE "\\.(dll|exe)$" ".pdb" FNAME "${FNAME}")
|
||||||
|
|
||||||
|
if(CONFIG STREQUAL Debug OR CONFIG STREQUAL RelWithDebInfo)
|
||||||
|
file(COPY "${INPUT}/${FNAME}" DESTINATION "${OUTPUT}")
|
||||||
|
elseif(EXISTS "${OUTPUT}/${FNAME}")
|
||||||
|
file(REMOVE "${OUTPUT}/${FNAME}")
|
||||||
|
endif()
|
107
cmake/external/FindLibobs.cmake
vendored
Normal file
107
cmake/external/FindLibobs.cmake
vendored
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
# This module can be copied and used by external plugins for OBS
|
||||||
|
#
|
||||||
|
# Once done these will be defined:
|
||||||
|
#
|
||||||
|
# LIBOBS_FOUND
|
||||||
|
# LIBOBS_INCLUDE_DIRS
|
||||||
|
# LIBOBS_LIBRARIES
|
||||||
|
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_OBS QUIET obs libobs)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_lib_suffix 64)
|
||||||
|
else()
|
||||||
|
set(_lib_suffix 32)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(DEFINED CMAKE_BUILD_TYPE)
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
set(_build_type_base "debug")
|
||||||
|
else()
|
||||||
|
set(_build_type_base "release")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(LIBOBS_INCLUDE_DIR
|
||||||
|
NAMES obs.h
|
||||||
|
HINTS
|
||||||
|
ENV obsPath${_lib_suffix}
|
||||||
|
ENV obsPath
|
||||||
|
${obsPath}
|
||||||
|
PATHS
|
||||||
|
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||||
|
PATH_SUFFIXES
|
||||||
|
libobs
|
||||||
|
)
|
||||||
|
|
||||||
|
function(find_obs_lib base_name repo_build_path lib_name)
|
||||||
|
string(TOUPPER "${base_name}" base_name_u)
|
||||||
|
|
||||||
|
if(DEFINED _build_type_base)
|
||||||
|
set(_build_type_${repo_build_path} "${_build_type_base}/${repo_build_path}")
|
||||||
|
set(_build_type_${repo_build_path}${_lib_suffix} "${_build_type_base}${_lib_suffix}/${repo_build_path}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_library(${base_name_u}_LIB
|
||||||
|
NAMES ${_${base_name_u}_LIBRARIES} ${lib_name} lib${lib_name}
|
||||||
|
HINTS
|
||||||
|
ENV obsPath${_lib_suffix}
|
||||||
|
ENV obsPath
|
||||||
|
${obsPath}
|
||||||
|
${_${base_name_u}_LIBRARY_DIRS}
|
||||||
|
PATHS
|
||||||
|
/usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
PATH_SUFFIXES
|
||||||
|
lib${_lib_suffix} lib
|
||||||
|
libs${_lib_suffix} libs
|
||||||
|
bin${_lib_suffix} bin
|
||||||
|
../lib${_lib_suffix} ../lib
|
||||||
|
../libs${_lib_suffix} ../libs
|
||||||
|
../bin${_lib_suffix} ../bin
|
||||||
|
# base repo non-msvc-specific search paths
|
||||||
|
${_build_type_${repo_build_path}}
|
||||||
|
${_build_type_${repo_build_path}${_lib_suffix}}
|
||||||
|
build/${repo_build_path}
|
||||||
|
build${_lib_suffix}/${repo_build_path}
|
||||||
|
# base repo msvc-specific search paths on windows
|
||||||
|
build${_lib_suffix}/${repo_build_path}/Debug
|
||||||
|
build${_lib_suffix}/${repo_build_path}/RelWithDebInfo
|
||||||
|
build/${repo_build_path}/Debug
|
||||||
|
build/${repo_build_path}/RelWithDebInfo
|
||||||
|
)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
find_obs_lib(LIBOBS libobs obs)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
find_obs_lib(W32_PTHREADS deps/w32-pthreads w32-pthreads)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(Libobs DEFAULT_MSG LIBOBS_LIB LIBOBS_INCLUDE_DIR)
|
||||||
|
mark_as_advanced(LIBOBS_INCLUDE_DIR LIBOBS_LIB)
|
||||||
|
|
||||||
|
if(LIBOBS_FOUND)
|
||||||
|
if(MSVC)
|
||||||
|
if (NOT DEFINED W32_PTHREADS_LIB)
|
||||||
|
message(FATAL_ERROR "Could not find the w32-pthreads library" )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(W32_PTHREADS_INCLUDE_DIR ${LIBOBS_INCLUDE_DIR}/../deps/w32-pthreads)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(LIBOBS_INCLUDE_DIRS ${LIBOBS_INCLUDE_DIR} ${W32_PTHREADS_INCLUDE_DIR})
|
||||||
|
set(LIBOBS_LIBRARIES ${LIBOBS_LIB} ${W32_PTHREADS_LIB})
|
||||||
|
include(${LIBOBS_INCLUDE_DIR}/../cmake/external/ObsPluginHelpers.cmake)
|
||||||
|
|
||||||
|
# allows external plugins to easily use/share common dependencies that are often included with libobs (such as FFmpeg)
|
||||||
|
if(NOT DEFINED INCLUDED_LIBOBS_CMAKE_MODULES)
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${LIBOBS_INCLUDE_DIR}/../cmake/Modules/")
|
||||||
|
set(INCLUDED_LIBOBS_CMAKE_MODULES true)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "Could not find the libobs library" )
|
||||||
|
endif()
|
139
cmake/external/ObsPluginHelpers.cmake
vendored
Normal file
139
cmake/external/ObsPluginHelpers.cmake
vendored
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
# Functions for generating external plugins
|
||||||
|
|
||||||
|
set(EXTERNAL_PLUGIN_OUTPUT_DIR "${CMAKE_BINARY_DIR}/rundir")
|
||||||
|
|
||||||
|
# Fix XCode includes to ignore warnings on system includes
|
||||||
|
function(target_include_directories_system _target)
|
||||||
|
if(XCODE)
|
||||||
|
foreach(_arg ${ARGN})
|
||||||
|
if("${_arg}" STREQUAL "PRIVATE" OR "${_arg}" STREQUAL "PUBLIC" OR "${_arg}" STREQUAL "INTERFACE")
|
||||||
|
set(_scope ${_arg})
|
||||||
|
else()
|
||||||
|
target_compile_options(${_target} ${_scope} -isystem${_arg})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
else()
|
||||||
|
target_include_directories(${_target} SYSTEM ${_scope} ${ARGN})
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(install_external_plugin_data_internal target source_dir target_dir)
|
||||||
|
install(DIRECTORY ${source_dir}/
|
||||||
|
DESTINATION "${target}/${target_dir}"
|
||||||
|
USE_SOURCE_PERMISSIONS)
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy_directory
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/${source_dir}" "${EXTERNAL_PLUGIN_OUTPUT_DIR}/$<CONFIGURATION>/${target}/${target_dir}"
|
||||||
|
VERBATIM)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Installs data
|
||||||
|
# 'target' is the destination target project being installed to
|
||||||
|
# 'data_loc' specifies the directory of the data
|
||||||
|
function(install_external_plugin_data target data_loc)
|
||||||
|
install_external_plugin_data_internal(${target} ${data_loc} "data")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Installs data in an architecture-specific data directory on windows/linux (data/32bit or data/64bit). Does not apply for mac.
|
||||||
|
# 'target' is the destination target project being installed to
|
||||||
|
# 'data_loc' specifies the directory of the data being installed
|
||||||
|
function(install_external_plugin_arch_data target data_loc)
|
||||||
|
if(APPLE)
|
||||||
|
set(_bit_suffix "")
|
||||||
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_bit_suffix "/64bit")
|
||||||
|
else()
|
||||||
|
set(_bit_suffix "/32bit")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install_external_plugin_data_internal(${target} ${data_loc} "data${_bit_suffix}")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Installs data in the target's bin directory
|
||||||
|
# 'target' is the destination target project being installed to
|
||||||
|
# 'data_loc' specifies the directory of the data being installed
|
||||||
|
function(install_external_plugin_data_to_bin target data_loc)
|
||||||
|
if(APPLE)
|
||||||
|
set(_bit_suffix "")
|
||||||
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_bit_suffix "/64bit")
|
||||||
|
else()
|
||||||
|
set(_bit_suffix "/32bit")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install_external_plugin_data_internal(${target} ${data_loc} "bin${_bit_suffix}")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Installs an additional binary to a target
|
||||||
|
# 'target' is the destination target project being installed to
|
||||||
|
# 'additional_target' specifies the additional binary
|
||||||
|
function(install_external_plugin_additional target additional_target)
|
||||||
|
if(APPLE)
|
||||||
|
set(_bit_suffix "")
|
||||||
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_bit_suffix "64bit/")
|
||||||
|
else()
|
||||||
|
set(_bit_suffix "32bit/")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set_target_properties(${additional_target} PROPERTIES
|
||||||
|
PREFIX "")
|
||||||
|
|
||||||
|
install(TARGETS ${additional_target}
|
||||||
|
LIBRARY DESTINATION "bin"
|
||||||
|
RUNTIME DESTINATION "bin")
|
||||||
|
add_custom_command(TARGET ${additional_target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"$<TARGET_FILE:${additional_target}>"
|
||||||
|
"${EXTERNAL_PLUGIN_OUTPUT_DIR}/$<CONFIGURATION>/${target}/bin/${_bit_suffix}$<TARGET_FILE_NAME:${additional_target}>"
|
||||||
|
VERBATIM)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Installs the binary of the target
|
||||||
|
# 'target' is the target project being installed
|
||||||
|
function(install_external_plugin target)
|
||||||
|
install_external_plugin_additional(${target} ${target})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Installs the binary and data of the target
|
||||||
|
# 'target' is the destination target project being installed to
|
||||||
|
function(install_external_plugin_with_data target data_loc)
|
||||||
|
install_external_plugin(${target})
|
||||||
|
install_external_plugin_data(${target} ${data_loc})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Installs an additional binary to the data of a target
|
||||||
|
# 'target' is the destination target project being installed to
|
||||||
|
# 'additional_target' specifies the additional binary
|
||||||
|
function(install_external_plugin_bin_to_data target additional_target)
|
||||||
|
install(TARGETS ${target}
|
||||||
|
LIBRARY DESTINATION "data"
|
||||||
|
RUNTIME DESTINATION "data")
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"$<TARGET_FILE:${target}>"
|
||||||
|
"${EXTERNAL_PLUGIN_OUTPUT_DIR}/$<CONFIGURATION>/${plugin_target}/data/$<TARGET_FILE_NAME:${target}>"
|
||||||
|
VERBATIM)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Installs an additional binary in an architecture-specific data directory on windows/linux (data/32bit or data/64bit). Does not apply for mac.
|
||||||
|
# 'target' is the destination target project being installed to
|
||||||
|
# 'additional_target' specifies the additional binary
|
||||||
|
function(install_external_plugin_bin_to_arch_data target additional_target)
|
||||||
|
if(APPLE)
|
||||||
|
set(_bit_suffix "")
|
||||||
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
set(_bit_suffix "/64bit")
|
||||||
|
else()
|
||||||
|
set(_bit_suffix "/32bit")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(TARGETS ${target}
|
||||||
|
LIBRARY DESTINATION "data${_bit_suffix}"
|
||||||
|
RUNTIME DESTINATION "data${_bit_suffix}")
|
||||||
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||||
|
"$<TARGET_FILE:${target}>"
|
||||||
|
"${EXTERNAL_PLUGIN_OUTPUT_DIR}/$<CONFIGURATION>/${plugin_target}/data${_bit_suffix}/$<TARGET_FILE_NAME:${target}>"
|
||||||
|
VERBATIM)
|
||||||
|
endfunction()
|
3
cmake/helper_subdir/CMakeLists.txt
Normal file
3
cmake/helper_subdir/CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
obs_finish_bundle()
|
||||||
|
|
26
cmake/osxbundle/Info.plist
Normal file
26
cmake/osxbundle/Info.plist
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>OBS.icns</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>OBS</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>OBS - Free and Open Source Streaming/Recording Software</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>OBS</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.obsproject.obs-studio</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.8.5</string>
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<true/>
|
||||||
|
<key>LSAppNapIsDisabled</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
51
cmake/osxbundle/fixup_bundle.sh
Executable file
51
cmake/osxbundle/fixup_bundle.sh
Executable file
|
@ -0,0 +1,51 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$#" != 2 ]; then
|
||||||
|
echo "usage: $0 /path/to/install/root relative/lib/destination"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$1"
|
||||||
|
|
||||||
|
function buildlist() {
|
||||||
|
otool -L "$@" |
|
||||||
|
grep -E "(opt|Users)" |
|
||||||
|
perl -pe 's|^\s+(/.*)\s\(.*$|$1|' |
|
||||||
|
grep -vE ":$" |
|
||||||
|
sort -u
|
||||||
|
}
|
||||||
|
export -f buildlist
|
||||||
|
|
||||||
|
DEST="$2"
|
||||||
|
LDEST="@rpath"
|
||||||
|
TARGETS="$(find . \( -perm +111 -and -type f \))"
|
||||||
|
FOUNDLIBS="$(buildlist $TARGETS)"
|
||||||
|
PFOUNDLIBS=""
|
||||||
|
|
||||||
|
while [ "$FOUNDLIBS" != "$PFOUNDLIBS" ]; do
|
||||||
|
PFOUNDLIBS="$FOUNDLIBS"
|
||||||
|
FOUNDLIBS="$(buildlist $TARGETS $PFOUNDLIBS)"
|
||||||
|
done
|
||||||
|
|
||||||
|
INTOOL_CALL=()
|
||||||
|
|
||||||
|
for lib in $FOUNDLIBS; do
|
||||||
|
libname="$(basename "$lib")"
|
||||||
|
|
||||||
|
INTOOL_CALL+=(-change "$lib" "$LDEST/$libname")
|
||||||
|
cp "$lib" "$DEST/$libname"
|
||||||
|
|
||||||
|
echo "Fixing up dependency: $libname"
|
||||||
|
done
|
||||||
|
|
||||||
|
for lib in $FOUNDLIBS; do
|
||||||
|
libname="$(basename "$lib")"
|
||||||
|
lib="$DEST/$libname"
|
||||||
|
|
||||||
|
install_name_tool ${INTOOL_CALL[@]} -id "$LDEST/$libname" "$lib"
|
||||||
|
done
|
||||||
|
|
||||||
|
for target in $TARGETS; do
|
||||||
|
install_name_tool ${INTOOL_CALL[@]} "$target"
|
||||||
|
done
|
||||||
|
|
BIN
cmake/osxbundle/obs.icns
Normal file
BIN
cmake/osxbundle/obs.icns
Normal file
Binary file not shown.
5
cmake/osxbundle/obslaunch.sh
Executable file
5
cmake/osxbundle/obslaunch.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
cd ../Resources/bin
|
||||||
|
exec ./obs "$@"
|
||||||
|
|
BIN
cmake/winrc/obs-studio.ico
Normal file
BIN
cmake/winrc/obs-studio.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
0
config/.gitignore
vendored
Normal file
0
config/.gitignore
vendored
Normal file
25
deps/CMakeLists.txt
vendored
Normal file
25
deps/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
if(NOT MINGW)
|
||||||
|
add_subdirectory(w32-pthreads)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(glad)
|
||||||
|
add_subdirectory(ipc-util)
|
||||||
|
add_subdirectory(libff)
|
||||||
|
add_subdirectory(file-updater)
|
||||||
|
|
||||||
|
find_package(Jansson 2.5 QUIET)
|
||||||
|
|
||||||
|
if(NOT JANSSON_FOUND)
|
||||||
|
message(STATUS "Jansson >=2.5 not found, building bundled version")
|
||||||
|
|
||||||
|
add_subdirectory(jansson)
|
||||||
|
|
||||||
|
set(OBS_JANSSON_IMPORT "jansson" CACHE INTERNAL "Internal var")
|
||||||
|
set(OBS_JANSSON_INCLUDE_DIRS "" CACHE INTERNAL "Internal var")
|
||||||
|
else()
|
||||||
|
message(STATUS "Using system Jansson library")
|
||||||
|
|
||||||
|
set(OBS_JANSSON_IMPORT "${JANSSON_LIBRARIES}" CACHE INTERNAL "Internal var")
|
||||||
|
set(OBS_JANSSON_INCLUDE_DIRS "${JANSSON_INCLUDE_DIRS}" CACHE INTERNAL "Internal var")
|
||||||
|
endif()
|
32
deps/file-updater/CMakeLists.txt
vendored
Normal file
32
deps/file-updater/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
project(file-updater)
|
||||||
|
|
||||||
|
find_package(Libcurl REQUIRED)
|
||||||
|
|
||||||
|
include_directories(${LIBCURL_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
if(WIN32 AND NOT MINGW)
|
||||||
|
include_directories(../w32-pthreads)
|
||||||
|
set(file-updater_PLATFORM_DEPS
|
||||||
|
w32-pthreads)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(file-updater_HEADERS
|
||||||
|
file-updater/file-updater.h)
|
||||||
|
set(file-updater_SOURCES
|
||||||
|
file-updater/file-updater.c)
|
||||||
|
|
||||||
|
add_library(file-updater STATIC
|
||||||
|
${file-updater_SOURCES}
|
||||||
|
${file-updater_HEADERS})
|
||||||
|
|
||||||
|
target_include_directories(file-updater
|
||||||
|
PUBLIC .)
|
||||||
|
|
||||||
|
if(NOT MSVC AND NOT MINGW)
|
||||||
|
target_compile_options(file-updater PRIVATE -fPIC)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(file-updater
|
||||||
|
${LIBCURL_LIBRARIES}
|
||||||
|
${file-updater_PLATFORM_DEPS}
|
||||||
|
libobs)
|
424
deps/file-updater/file-updater/file-updater.c
vendored
Normal file
424
deps/file-updater/file-updater/file-updater.c
vendored
Normal file
|
@ -0,0 +1,424 @@
|
||||||
|
#include <util/threading.h>
|
||||||
|
#include <util/platform.h>
|
||||||
|
#include <util/darray.h>
|
||||||
|
#include <util/dstr.h>
|
||||||
|
#include <obs-data.h>
|
||||||
|
#include <curl/curl.h>
|
||||||
|
#include "file-updater.h"
|
||||||
|
|
||||||
|
#define warn(msg, ...) \
|
||||||
|
blog(LOG_WARNING, "%s"msg, info->log_prefix, ##__VA_ARGS__)
|
||||||
|
#define info(msg, ...) \
|
||||||
|
blog(LOG_WARNING, "%s"msg, info->log_prefix, ##__VA_ARGS__)
|
||||||
|
|
||||||
|
struct update_info {
|
||||||
|
char error[CURL_ERROR_SIZE];
|
||||||
|
struct curl_slist *header;
|
||||||
|
DARRAY(uint8_t) file_data;
|
||||||
|
char *user_agent;
|
||||||
|
CURL *curl;
|
||||||
|
char *url;
|
||||||
|
|
||||||
|
/* directories */
|
||||||
|
char *local;
|
||||||
|
char *cache;
|
||||||
|
char *temp;
|
||||||
|
|
||||||
|
const char *remote_url;
|
||||||
|
obs_data_t *local_package;
|
||||||
|
obs_data_t *cache_package;
|
||||||
|
obs_data_t *remote_package;
|
||||||
|
|
||||||
|
confirm_file_callback_t callback;
|
||||||
|
void *param;
|
||||||
|
|
||||||
|
pthread_t thread;
|
||||||
|
bool thread_created;
|
||||||
|
char *log_prefix;
|
||||||
|
};
|
||||||
|
|
||||||
|
void update_info_destroy(struct update_info *info)
|
||||||
|
{
|
||||||
|
if (!info)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (info->thread_created)
|
||||||
|
pthread_join(info->thread, NULL);
|
||||||
|
|
||||||
|
da_free(info->file_data);
|
||||||
|
bfree(info->log_prefix);
|
||||||
|
bfree(info->user_agent);
|
||||||
|
bfree(info->temp);
|
||||||
|
bfree(info->cache);
|
||||||
|
bfree(info->local);
|
||||||
|
bfree(info->url);
|
||||||
|
|
||||||
|
if (info->header)
|
||||||
|
curl_slist_free_all(info->header);
|
||||||
|
if (info->curl)
|
||||||
|
curl_easy_cleanup(info->curl);
|
||||||
|
if (info->local_package)
|
||||||
|
obs_data_release(info->local_package);
|
||||||
|
if (info->cache_package)
|
||||||
|
obs_data_release(info->cache_package);
|
||||||
|
if (info->remote_package)
|
||||||
|
obs_data_release(info->remote_package);
|
||||||
|
bfree(info);
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t http_write(uint8_t *ptr, size_t size, size_t nmemb,
|
||||||
|
struct update_info *info)
|
||||||
|
{
|
||||||
|
size_t total = size * nmemb;
|
||||||
|
if (total)
|
||||||
|
da_push_back_array(info->file_data, ptr, total);
|
||||||
|
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool do_http_request(struct update_info *info, const char *url)
|
||||||
|
{
|
||||||
|
CURLcode code;
|
||||||
|
uint8_t null_terminator = 0;
|
||||||
|
|
||||||
|
da_resize(info->file_data, 0);
|
||||||
|
curl_easy_setopt(info->curl, CURLOPT_URL, url);
|
||||||
|
curl_easy_setopt(info->curl, CURLOPT_HTTPHEADER, info->header);
|
||||||
|
curl_easy_setopt(info->curl, CURLOPT_ERRORBUFFER, info->error);
|
||||||
|
curl_easy_setopt(info->curl, CURLOPT_WRITEFUNCTION, http_write);
|
||||||
|
curl_easy_setopt(info->curl, CURLOPT_WRITEDATA, info);
|
||||||
|
curl_easy_setopt(info->curl, CURLOPT_FAILONERROR, true);
|
||||||
|
|
||||||
|
code = curl_easy_perform(info->curl);
|
||||||
|
if (code != CURLE_OK) {
|
||||||
|
warn("Remote update of URL \"%s\" failed: %s", url,
|
||||||
|
info->error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
da_push_back(info->file_data, &null_terminator);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *get_path(const char *dir, const char *file)
|
||||||
|
{
|
||||||
|
struct dstr str = {0};
|
||||||
|
|
||||||
|
dstr_copy(&str, dir);
|
||||||
|
|
||||||
|
if (str.array && dstr_end(&str) != '/' && dstr_end(&str) != '\\')
|
||||||
|
dstr_cat_ch(&str, '/');
|
||||||
|
|
||||||
|
dstr_cat(&str, file);
|
||||||
|
return str.array;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline obs_data_t *get_package(const char *base_path, const char *file)
|
||||||
|
{
|
||||||
|
char *full_path = get_path(base_path, file);
|
||||||
|
obs_data_t *package = obs_data_create_from_json_file(full_path);
|
||||||
|
bfree(full_path);
|
||||||
|
return package;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool init_update(struct update_info *info)
|
||||||
|
{
|
||||||
|
struct dstr user_agent = {0};
|
||||||
|
|
||||||
|
info->curl = curl_easy_init();
|
||||||
|
if (!info->curl) {
|
||||||
|
warn("Could not initialize Curl");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
info->local_package = get_package(info->local, "package.json");
|
||||||
|
info->cache_package = get_package(info->cache, "package.json");
|
||||||
|
|
||||||
|
dstr_copy(&user_agent, "User-Agent: ");
|
||||||
|
dstr_cat(&user_agent, info->user_agent);
|
||||||
|
|
||||||
|
info->header = curl_slist_append(info->header, user_agent.array);
|
||||||
|
|
||||||
|
dstr_free(&user_agent);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void copy_local_to_cache(struct update_info *info, const char *file)
|
||||||
|
{
|
||||||
|
char *local_file_path = get_path(info->local, file);
|
||||||
|
char *cache_file_path = get_path(info->cache, file);
|
||||||
|
char *temp_file_path = get_path(info->temp, file);
|
||||||
|
|
||||||
|
os_copyfile(local_file_path, temp_file_path);
|
||||||
|
os_unlink(cache_file_path);
|
||||||
|
os_rename(temp_file_path, cache_file_path);
|
||||||
|
|
||||||
|
bfree(local_file_path);
|
||||||
|
bfree(cache_file_path);
|
||||||
|
bfree(temp_file_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void enum_files(obs_data_t *package,
|
||||||
|
bool (*enum_func)(void *param, obs_data_t *file),
|
||||||
|
void *param)
|
||||||
|
{
|
||||||
|
obs_data_array_t *array = obs_data_get_array(package, "files");
|
||||||
|
size_t num;
|
||||||
|
|
||||||
|
if (!array)
|
||||||
|
return;
|
||||||
|
|
||||||
|
num = obs_data_array_count(array);
|
||||||
|
|
||||||
|
for (size_t i = 0; i < num; i++) {
|
||||||
|
obs_data_t *file = obs_data_array_item(array, i);
|
||||||
|
bool continue_enum = enum_func(param, file);
|
||||||
|
obs_data_release(file);
|
||||||
|
|
||||||
|
if (!continue_enum)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
obs_data_array_release(array);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct file_update_data {
|
||||||
|
const char *name;
|
||||||
|
int version;
|
||||||
|
bool newer;
|
||||||
|
bool found;
|
||||||
|
};
|
||||||
|
|
||||||
|
static bool newer_than_cache(void *param, obs_data_t *cache_file)
|
||||||
|
{
|
||||||
|
struct file_update_data *input = param;
|
||||||
|
const char *name = obs_data_get_string(cache_file, "name");
|
||||||
|
int version = (int)obs_data_get_int(cache_file, "version");
|
||||||
|
|
||||||
|
if (strcmp(input->name, name) == 0) {
|
||||||
|
input->found = true;
|
||||||
|
input->newer = input->version > version;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool update_files_to_local(void *param, obs_data_t *local_file)
|
||||||
|
{
|
||||||
|
struct update_info *info = param;
|
||||||
|
struct file_update_data data = {
|
||||||
|
.name = obs_data_get_string(local_file, "name"),
|
||||||
|
.version = (int)obs_data_get_int(local_file, "version")
|
||||||
|
};
|
||||||
|
|
||||||
|
enum_files(info->cache_package, newer_than_cache, &data);
|
||||||
|
if (data.newer || !data.found)
|
||||||
|
copy_local_to_cache(info, data.name);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int update_local_version(struct update_info *info)
|
||||||
|
{
|
||||||
|
int local_version;
|
||||||
|
int cache_version = 0;
|
||||||
|
|
||||||
|
local_version = (int)obs_data_get_int(info->local_package, "version");
|
||||||
|
cache_version = (int)obs_data_get_int(info->cache_package, "version");
|
||||||
|
|
||||||
|
/* if local cached version is out of date, copy new version */
|
||||||
|
if (cache_version < local_version) {
|
||||||
|
enum_files(info->local_package, update_files_to_local, info);
|
||||||
|
copy_local_to_cache(info, "package.json");
|
||||||
|
|
||||||
|
obs_data_release(info->cache_package);
|
||||||
|
obs_data_addref(info->local_package);
|
||||||
|
info->cache_package = info->local_package;
|
||||||
|
|
||||||
|
return local_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
return cache_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool do_relative_http_request(struct update_info *info,
|
||||||
|
const char *url, const char *file)
|
||||||
|
{
|
||||||
|
char *full_url = get_path(url, file);
|
||||||
|
bool success = do_http_request(info, full_url);
|
||||||
|
bfree(full_url);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void write_file_data(struct update_info *info,
|
||||||
|
const char *base_path, const char *file)
|
||||||
|
{
|
||||||
|
char *full_path = get_path(base_path, file);
|
||||||
|
os_quick_write_utf8_file(full_path,
|
||||||
|
(char*)info->file_data.array,
|
||||||
|
info->file_data.num - 1, false);
|
||||||
|
bfree(full_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void replace_file(const char *src_base_path,
|
||||||
|
const char *dst_base_path, const char *file)
|
||||||
|
{
|
||||||
|
char *src_path = get_path(src_base_path, file);
|
||||||
|
char *dst_path = get_path(dst_base_path, file);
|
||||||
|
|
||||||
|
if (src_path && dst_path) {
|
||||||
|
os_unlink(dst_path);
|
||||||
|
os_rename(src_path, dst_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
bfree(dst_path);
|
||||||
|
bfree(src_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool update_remote_files(void *param, obs_data_t *remote_file)
|
||||||
|
{
|
||||||
|
struct update_info *info = param;
|
||||||
|
|
||||||
|
struct file_update_data data = {
|
||||||
|
.name = obs_data_get_string(remote_file, "name"),
|
||||||
|
.version = (int)obs_data_get_int(remote_file, "version")
|
||||||
|
};
|
||||||
|
|
||||||
|
enum_files(info->cache_package, newer_than_cache, &data);
|
||||||
|
if (!data.newer && data.found)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (!do_relative_http_request(info, info->remote_url, data.name))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (info->callback) {
|
||||||
|
struct file_download_data download_data;
|
||||||
|
bool confirm;
|
||||||
|
|
||||||
|
download_data.name = data.name;
|
||||||
|
download_data.version = data.version;
|
||||||
|
download_data.buffer.da = info->file_data.da;
|
||||||
|
|
||||||
|
confirm = info->callback(info->param, &download_data);
|
||||||
|
|
||||||
|
info->file_data.da = download_data.buffer.da;
|
||||||
|
|
||||||
|
if (!confirm) {
|
||||||
|
info("Update file '%s' (version %d) rejected",
|
||||||
|
data.name, data.version);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
write_file_data(info, info->temp, data.name);
|
||||||
|
replace_file(info->temp, info->cache, data.name);
|
||||||
|
|
||||||
|
info("Successfully updated file '%s' (version %d)",
|
||||||
|
data.name, data.version);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void update_remote_version(struct update_info *info, int cur_version)
|
||||||
|
{
|
||||||
|
int remote_version;
|
||||||
|
|
||||||
|
if (!do_http_request(info, info->url))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!info->file_data.array || info->file_data.array[0] != '{') {
|
||||||
|
warn("Remote package does not exist or is not valid json");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
info->remote_package = obs_data_create_from_json(
|
||||||
|
(char*)info->file_data.array);
|
||||||
|
if (!info->remote_package) {
|
||||||
|
warn("Failed to initialize remote package json");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
remote_version = (int)obs_data_get_int(info->remote_package, "version");
|
||||||
|
if (remote_version <= cur_version)
|
||||||
|
return;
|
||||||
|
|
||||||
|
write_file_data(info, info->temp, "package.json");
|
||||||
|
|
||||||
|
info->remote_url = obs_data_get_string(info->remote_package, "url");
|
||||||
|
if (!info->remote_url) {
|
||||||
|
warn("No remote url in package file");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* download new files */
|
||||||
|
enum_files(info->remote_package, update_remote_files, info);
|
||||||
|
|
||||||
|
replace_file(info->temp, info->cache, "package.json");
|
||||||
|
|
||||||
|
info("Successfully updated package (version %d)", remote_version);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void *update_thread(void *data)
|
||||||
|
{
|
||||||
|
struct update_info *info = data;
|
||||||
|
int cur_version;
|
||||||
|
|
||||||
|
if (!init_update(info))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
cur_version = update_local_version(info);
|
||||||
|
update_remote_version(info, cur_version);
|
||||||
|
os_rmdir(info->temp);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
update_info_t *update_info_create(
|
||||||
|
const char *log_prefix,
|
||||||
|
const char *user_agent,
|
||||||
|
const char *update_url,
|
||||||
|
const char *local_dir,
|
||||||
|
const char *cache_dir,
|
||||||
|
confirm_file_callback_t confirm_callback,
|
||||||
|
void *param)
|
||||||
|
{
|
||||||
|
struct update_info *info;
|
||||||
|
struct dstr dir = {0};
|
||||||
|
|
||||||
|
if (!log_prefix)
|
||||||
|
log_prefix = "";
|
||||||
|
|
||||||
|
if (os_mkdir(cache_dir) < 0) {
|
||||||
|
blog(LOG_WARNING, "%sCould not create cache directory %s",
|
||||||
|
log_prefix, cache_dir);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
dstr_copy(&dir, cache_dir);
|
||||||
|
if (dstr_end(&dir) != '/' && dstr_end(&dir) != '\\')
|
||||||
|
dstr_cat_ch(&dir, '/');
|
||||||
|
dstr_cat(&dir, ".temp");
|
||||||
|
|
||||||
|
if (os_mkdir(dir.array) < 0) {
|
||||||
|
blog(LOG_WARNING, "%sCould not create temp directory %s",
|
||||||
|
log_prefix, cache_dir);
|
||||||
|
dstr_free(&dir);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
info = bzalloc(sizeof(*info));
|
||||||
|
info->log_prefix = bstrdup(log_prefix);
|
||||||
|
info->user_agent = bstrdup(user_agent);
|
||||||
|
info->temp = dir.array;
|
||||||
|
info->local = bstrdup(local_dir);
|
||||||
|
info->cache = bstrdup(cache_dir);
|
||||||
|
info->url = get_path(update_url, "package.json");
|
||||||
|
info->callback = confirm_callback;
|
||||||
|
info->param = param;
|
||||||
|
|
||||||
|
if (pthread_create(&info->thread, NULL, update_thread, info) == 0)
|
||||||
|
info->thread_created = true;
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
24
deps/file-updater/file-updater/file-updater.h
vendored
Normal file
24
deps/file-updater/file-updater/file-updater.h
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
struct update_info;
|
||||||
|
typedef struct update_info update_info_t;
|
||||||
|
|
||||||
|
struct file_download_data {
|
||||||
|
const char *name;
|
||||||
|
int version;
|
||||||
|
|
||||||
|
DARRAY(uint8_t) buffer;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef bool (*confirm_file_callback_t)(void *param,
|
||||||
|
struct file_download_data *file);
|
||||||
|
|
||||||
|
update_info_t *update_info_create(
|
||||||
|
const char *log_prefix,
|
||||||
|
const char *user_agent,
|
||||||
|
const char *update_url,
|
||||||
|
const char *local_dir,
|
||||||
|
const char *cache_dir,
|
||||||
|
confirm_file_callback_t confirm_callback,
|
||||||
|
void *param);
|
||||||
|
void update_info_destroy(update_info_t *info);
|
59
deps/glad/CMakeLists.txt
vendored
Normal file
59
deps/glad/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
project(glad)
|
||||||
|
|
||||||
|
find_package(OpenGL)
|
||||||
|
|
||||||
|
if(NOT WIN32 AND NOT APPLE)
|
||||||
|
find_package(X11)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(glad_SOURCES
|
||||||
|
src/glad.c
|
||||||
|
include/glad/glad.h)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(glad_PLATFORM_SOURCES
|
||||||
|
src/glad_wgl.c
|
||||||
|
include/glad/glad_wgl.h)
|
||||||
|
elseif(NOT APPLE)
|
||||||
|
set(glad_PLATFORM_SOURCES
|
||||||
|
src/glad_glx.c
|
||||||
|
include/glad/glad_glx.h)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(glad SHARED
|
||||||
|
${glad_SOURCES}
|
||||||
|
${glad_PLATFORM_SOURCES})
|
||||||
|
set_target_properties(glad PROPERTIES
|
||||||
|
OUTPUT_NAME obsglad
|
||||||
|
VERSION "0"
|
||||||
|
SOVERSION "0")
|
||||||
|
target_include_directories(glad
|
||||||
|
PUBLIC include
|
||||||
|
PRIVATE ${X11_X11_INCLUDE_PATH} ${OPENGL_INCLUDE_DIR})
|
||||||
|
target_compile_definitions(glad
|
||||||
|
PRIVATE GLAD_GLAPI_EXPORT_BUILD)
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
target_compile_options(glad
|
||||||
|
PRIVATE -DPIC -fvisibility=hidden)
|
||||||
|
if(NOT MINGW)
|
||||||
|
target_compile_options(glad PRIVATE -fPIC)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT WIN32 AND NOT APPLE)
|
||||||
|
set(glad_PLATFORM_DEPS
|
||||||
|
${X11_X11_LIB})
|
||||||
|
# only link to libdl on linux
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
|
set(glad_PLATFORM_DEPS
|
||||||
|
${glad_PLATFORM_DEPS}
|
||||||
|
-ldl)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(glad
|
||||||
|
${glad_PLATFORM_DEPS}
|
||||||
|
${OPENGL_gl_LIBRARY})
|
||||||
|
|
||||||
|
install_obs_core(glad)
|
282
deps/glad/include/KHR/khrplatform.h
vendored
Normal file
282
deps/glad/include/KHR/khrplatform.h
vendored
Normal file
|
@ -0,0 +1,282 @@
|
||||||
|
#ifndef __khrplatform_h_
|
||||||
|
#define __khrplatform_h_
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright (c) 2008-2009 The Khronos Group Inc.
|
||||||
|
**
|
||||||
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
** copy of this software and/or associated documentation files (the
|
||||||
|
** "Materials"), to deal in the Materials without restriction, including
|
||||||
|
** without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
** permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
** the following conditions:
|
||||||
|
**
|
||||||
|
** The above copyright notice and this permission notice shall be included
|
||||||
|
** in all copies or substantial portions of the Materials.
|
||||||
|
**
|
||||||
|
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Khronos platform-specific types and definitions.
|
||||||
|
*
|
||||||
|
* $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
|
||||||
|
*
|
||||||
|
* Adopters may modify this file to suit their platform. Adopters are
|
||||||
|
* encouraged to submit platform specific modifications to the Khronos
|
||||||
|
* group so that they can be included in future versions of this file.
|
||||||
|
* Please submit changes by sending them to the public Khronos Bugzilla
|
||||||
|
* (http://khronos.org/bugzilla) by filing a bug against product
|
||||||
|
* "Khronos (general)" component "Registry".
|
||||||
|
*
|
||||||
|
* A predefined template which fills in some of the bug fields can be
|
||||||
|
* reached using http://tinyurl.com/khrplatform-h-bugreport, but you
|
||||||
|
* must create a Bugzilla login first.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* See the Implementer's Guidelines for information about where this file
|
||||||
|
* should be located on your system and for more details of its use:
|
||||||
|
* http://www.khronos.org/registry/implementers_guide.pdf
|
||||||
|
*
|
||||||
|
* This file should be included as
|
||||||
|
* #include <KHR/khrplatform.h>
|
||||||
|
* by Khronos client API header files that use its types and defines.
|
||||||
|
*
|
||||||
|
* The types in khrplatform.h should only be used to define API-specific types.
|
||||||
|
*
|
||||||
|
* Types defined in khrplatform.h:
|
||||||
|
* khronos_int8_t signed 8 bit
|
||||||
|
* khronos_uint8_t unsigned 8 bit
|
||||||
|
* khronos_int16_t signed 16 bit
|
||||||
|
* khronos_uint16_t unsigned 16 bit
|
||||||
|
* khronos_int32_t signed 32 bit
|
||||||
|
* khronos_uint32_t unsigned 32 bit
|
||||||
|
* khronos_int64_t signed 64 bit
|
||||||
|
* khronos_uint64_t unsigned 64 bit
|
||||||
|
* khronos_intptr_t signed same number of bits as a pointer
|
||||||
|
* khronos_uintptr_t unsigned same number of bits as a pointer
|
||||||
|
* khronos_ssize_t signed size
|
||||||
|
* khronos_usize_t unsigned size
|
||||||
|
* khronos_float_t signed 32 bit floating point
|
||||||
|
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
|
||||||
|
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
|
||||||
|
* nanoseconds
|
||||||
|
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
|
||||||
|
* khronos_boolean_enum_t enumerated boolean type. This should
|
||||||
|
* only be used as a base type when a client API's boolean type is
|
||||||
|
* an enum. Client APIs which use an integer or other type for
|
||||||
|
* booleans cannot use this as the base type for their boolean.
|
||||||
|
*
|
||||||
|
* Tokens defined in khrplatform.h:
|
||||||
|
*
|
||||||
|
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
|
||||||
|
*
|
||||||
|
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
|
||||||
|
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
|
||||||
|
*
|
||||||
|
* Calling convention macros defined in this file:
|
||||||
|
* KHRONOS_APICALL
|
||||||
|
* KHRONOS_APIENTRY
|
||||||
|
* KHRONOS_APIATTRIBUTES
|
||||||
|
*
|
||||||
|
* These may be used in function prototypes as:
|
||||||
|
*
|
||||||
|
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
|
||||||
|
* int arg1,
|
||||||
|
* int arg2) KHRONOS_APIATTRIBUTES;
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Definition of KHRONOS_APICALL
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
* This precedes the return type of the function in the function prototype.
|
||||||
|
*/
|
||||||
|
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||||
|
# define KHRONOS_APICALL __declspec(dllimport)
|
||||||
|
#elif defined (__SYMBIAN32__)
|
||||||
|
# define KHRONOS_APICALL IMPORT_C
|
||||||
|
#else
|
||||||
|
# define KHRONOS_APICALL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Definition of KHRONOS_APIENTRY
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
* This follows the return type of the function and precedes the function
|
||||||
|
* name in the function prototype.
|
||||||
|
*/
|
||||||
|
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
|
||||||
|
/* Win32 but not WinCE */
|
||||||
|
# define KHRONOS_APIENTRY __stdcall
|
||||||
|
#else
|
||||||
|
# define KHRONOS_APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Definition of KHRONOS_APIATTRIBUTES
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
* This follows the closing parenthesis of the function prototype arguments.
|
||||||
|
*/
|
||||||
|
#if defined (__ARMCC_2__)
|
||||||
|
#define KHRONOS_APIATTRIBUTES __softfp
|
||||||
|
#else
|
||||||
|
#define KHRONOS_APIATTRIBUTES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* basic type definitions
|
||||||
|
*-----------------------------------------------------------------------*/
|
||||||
|
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Using <stdint.h>
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
typedef int32_t khronos_int32_t;
|
||||||
|
typedef uint32_t khronos_uint32_t;
|
||||||
|
typedef int64_t khronos_int64_t;
|
||||||
|
typedef uint64_t khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif defined(__VMS ) || defined(__sgi)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Using <inttypes.h>
|
||||||
|
*/
|
||||||
|
#include <inttypes.h>
|
||||||
|
typedef int32_t khronos_int32_t;
|
||||||
|
typedef uint32_t khronos_uint32_t;
|
||||||
|
typedef int64_t khronos_int64_t;
|
||||||
|
typedef uint64_t khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Win32
|
||||||
|
*/
|
||||||
|
typedef __int32 khronos_int32_t;
|
||||||
|
typedef unsigned __int32 khronos_uint32_t;
|
||||||
|
typedef __int64 khronos_int64_t;
|
||||||
|
typedef unsigned __int64 khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif defined(__sun__) || defined(__digital__)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sun or Digital
|
||||||
|
*/
|
||||||
|
typedef int khronos_int32_t;
|
||||||
|
typedef unsigned int khronos_uint32_t;
|
||||||
|
#if defined(__arch64__) || defined(_LP64)
|
||||||
|
typedef long int khronos_int64_t;
|
||||||
|
typedef unsigned long int khronos_uint64_t;
|
||||||
|
#else
|
||||||
|
typedef long long int khronos_int64_t;
|
||||||
|
typedef unsigned long long int khronos_uint64_t;
|
||||||
|
#endif /* __arch64__ */
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hypothetical platform with no float or int64 support
|
||||||
|
*/
|
||||||
|
typedef int khronos_int32_t;
|
||||||
|
typedef unsigned int khronos_uint32_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 0
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 0
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generic fallback
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
typedef int32_t khronos_int32_t;
|
||||||
|
typedef uint32_t khronos_uint32_t;
|
||||||
|
typedef int64_t khronos_int64_t;
|
||||||
|
typedef uint64_t khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Types that are (so far) the same on all platforms
|
||||||
|
*/
|
||||||
|
typedef signed char khronos_int8_t;
|
||||||
|
typedef unsigned char khronos_uint8_t;
|
||||||
|
typedef signed short int khronos_int16_t;
|
||||||
|
typedef unsigned short int khronos_uint16_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Types that differ between LLP64 and LP64 architectures - in LLP64,
|
||||||
|
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
|
||||||
|
* to be the only LLP64 architecture in current use.
|
||||||
|
*/
|
||||||
|
#ifdef _WIN64
|
||||||
|
typedef signed long long int khronos_intptr_t;
|
||||||
|
typedef unsigned long long int khronos_uintptr_t;
|
||||||
|
typedef signed long long int khronos_ssize_t;
|
||||||
|
typedef unsigned long long int khronos_usize_t;
|
||||||
|
#else
|
||||||
|
typedef signed long int khronos_intptr_t;
|
||||||
|
typedef unsigned long int khronos_uintptr_t;
|
||||||
|
typedef signed long int khronos_ssize_t;
|
||||||
|
typedef unsigned long int khronos_usize_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if KHRONOS_SUPPORT_FLOAT
|
||||||
|
/*
|
||||||
|
* Float type
|
||||||
|
*/
|
||||||
|
typedef float khronos_float_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if KHRONOS_SUPPORT_INT64
|
||||||
|
/* Time types
|
||||||
|
*
|
||||||
|
* These types can be used to represent a time interval in nanoseconds or
|
||||||
|
* an absolute Unadjusted System Time. Unadjusted System Time is the number
|
||||||
|
* of nanoseconds since some arbitrary system event (e.g. since the last
|
||||||
|
* time the system booted). The Unadjusted System Time is an unsigned
|
||||||
|
* 64 bit value that wraps back to 0 every 584 years. Time intervals
|
||||||
|
* may be either signed or unsigned.
|
||||||
|
*/
|
||||||
|
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
|
||||||
|
typedef khronos_int64_t khronos_stime_nanoseconds_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Dummy value used to pad enum types to 32 bits.
|
||||||
|
*/
|
||||||
|
#ifndef KHRONOS_MAX_ENUM
|
||||||
|
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enumerated boolean type
|
||||||
|
*
|
||||||
|
* Values other than zero should be considered to be true. Therefore
|
||||||
|
* comparisons should not be made against KHRONOS_TRUE.
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
KHRONOS_FALSE = 0,
|
||||||
|
KHRONOS_TRUE = 1,
|
||||||
|
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
|
||||||
|
} khronos_boolean_enum_t;
|
||||||
|
|
||||||
|
#endif /* __khrplatform_h_ */
|
13235
deps/glad/include/glad/glad.h
vendored
Normal file
13235
deps/glad/include/glad/glad.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
1078
deps/glad/include/glad/glad_glx.h
vendored
Normal file
1078
deps/glad/include/glad/glad_glx.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
903
deps/glad/include/glad/glad_wgl.h
vendored
Normal file
903
deps/glad/include/glad/glad_wgl.h
vendored
Normal file
|
@ -0,0 +1,903 @@
|
||||||
|
|
||||||
|
#ifndef WINAPI
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN 1
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <glad/glad.h>
|
||||||
|
|
||||||
|
#ifndef __glad_wglext_h_
|
||||||
|
|
||||||
|
#ifdef __wglext_h_
|
||||||
|
#error WGL header already included, remove this include, glad already provides it
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __glad_wglext_h_
|
||||||
|
#define __wglext_h_
|
||||||
|
|
||||||
|
#ifndef APIENTRY
|
||||||
|
#define APIENTRY
|
||||||
|
#endif
|
||||||
|
#ifndef APIENTRYP
|
||||||
|
#define APIENTRYP APIENTRY *
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef void* (* GLADloadproc)(const char *name);
|
||||||
|
|
||||||
|
#define GLAD_GLAPI_EXPORT
|
||||||
|
|
||||||
|
#ifndef GLAPI
|
||||||
|
# if defined(GLAD_GLAPI_EXPORT)
|
||||||
|
# if defined(WIN32) || defined(__CYGWIN__)
|
||||||
|
# if defined(GLAD_GLAPI_EXPORT_BUILD)
|
||||||
|
# if defined(__GNUC__)
|
||||||
|
# define GLAPI __attribute__ ((dllexport)) extern
|
||||||
|
# else
|
||||||
|
# define GLAPI __declspec(dllexport) extern
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# if defined(__GNUC__)
|
||||||
|
# define GLAPI __attribute__ ((dllimport)) extern
|
||||||
|
# else
|
||||||
|
# define GLAPI __declspec(dllimport) extern
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# elif defined(__GNUC__) && defined(GLAD_GLAPI_EXPORT_BUILD)
|
||||||
|
# define GLAPI __attribute__ ((visibility ("default"))) extern
|
||||||
|
# else
|
||||||
|
# define GLAPI extern
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# define GLAPI extern
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
GLAPI int gladLoadWGL(HDC hdc);
|
||||||
|
|
||||||
|
GLAPI void gladLoadWGLLoader(GLADloadproc, HDC hdc);
|
||||||
|
|
||||||
|
struct _GPU_DEVICE {
|
||||||
|
DWORD cb;
|
||||||
|
CHAR DeviceName[32];
|
||||||
|
CHAR DeviceString[128];
|
||||||
|
DWORD Flags;
|
||||||
|
RECT rcVirtualScreen;
|
||||||
|
};
|
||||||
|
DECLARE_HANDLE(HPBUFFERARB);
|
||||||
|
DECLARE_HANDLE(HPBUFFEREXT);
|
||||||
|
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
|
||||||
|
DECLARE_HANDLE(HPVIDEODEV);
|
||||||
|
DECLARE_HANDLE(HPGPUNV);
|
||||||
|
DECLARE_HANDLE(HGPUNV);
|
||||||
|
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
|
||||||
|
typedef struct _GPU_DEVICE GPU_DEVICE;
|
||||||
|
typedef struct _GPU_DEVICE *PGPU_DEVICE;
|
||||||
|
#define WGL_COVERAGE_SAMPLES_NV 0x2042
|
||||||
|
#define WGL_COLOR_SAMPLES_NV 0x20B9
|
||||||
|
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
||||||
|
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
||||||
|
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
||||||
|
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
|
||||||
|
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
|
||||||
|
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
||||||
|
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
||||||
|
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
|
||||||
|
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||||
|
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||||
|
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||||
|
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||||
|
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||||
|
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||||
|
#define ERROR_INVALID_VERSION_ARB 0x2095
|
||||||
|
#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
|
||||||
|
#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
|
||||||
|
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
||||||
|
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
||||||
|
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
||||||
|
#define WGL_ACCELERATION_EXT 0x2003
|
||||||
|
#define WGL_NEED_PALETTE_EXT 0x2004
|
||||||
|
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
||||||
|
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
||||||
|
#define WGL_SWAP_METHOD_EXT 0x2007
|
||||||
|
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
||||||
|
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
||||||
|
#define WGL_TRANSPARENT_EXT 0x200A
|
||||||
|
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
||||||
|
#define WGL_SHARE_DEPTH_EXT 0x200C
|
||||||
|
#define WGL_SHARE_STENCIL_EXT 0x200D
|
||||||
|
#define WGL_SHARE_ACCUM_EXT 0x200E
|
||||||
|
#define WGL_SUPPORT_GDI_EXT 0x200F
|
||||||
|
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
||||||
|
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
||||||
|
#define WGL_STEREO_EXT 0x2012
|
||||||
|
#define WGL_PIXEL_TYPE_EXT 0x2013
|
||||||
|
#define WGL_COLOR_BITS_EXT 0x2014
|
||||||
|
#define WGL_RED_BITS_EXT 0x2015
|
||||||
|
#define WGL_RED_SHIFT_EXT 0x2016
|
||||||
|
#define WGL_GREEN_BITS_EXT 0x2017
|
||||||
|
#define WGL_GREEN_SHIFT_EXT 0x2018
|
||||||
|
#define WGL_BLUE_BITS_EXT 0x2019
|
||||||
|
#define WGL_BLUE_SHIFT_EXT 0x201A
|
||||||
|
#define WGL_ALPHA_BITS_EXT 0x201B
|
||||||
|
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
||||||
|
#define WGL_ACCUM_BITS_EXT 0x201D
|
||||||
|
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
||||||
|
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
||||||
|
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
||||||
|
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
||||||
|
#define WGL_DEPTH_BITS_EXT 0x2022
|
||||||
|
#define WGL_STENCIL_BITS_EXT 0x2023
|
||||||
|
#define WGL_AUX_BUFFERS_EXT 0x2024
|
||||||
|
#define WGL_NO_ACCELERATION_EXT 0x2025
|
||||||
|
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
||||||
|
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
||||||
|
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
||||||
|
#define WGL_SWAP_COPY_EXT 0x2029
|
||||||
|
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
||||||
|
#define WGL_TYPE_RGBA_EXT 0x202B
|
||||||
|
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
||||||
|
#define WGL_UNIQUE_ID_NV 0x20CE
|
||||||
|
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
||||||
|
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
||||||
|
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
|
||||||
|
#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||||
|
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
||||||
|
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
||||||
|
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
||||||
|
#define WGL_TEXTURE_RGB_ARB 0x2075
|
||||||
|
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
||||||
|
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||||
|
#define WGL_TEXTURE_1D_ARB 0x2079
|
||||||
|
#define WGL_TEXTURE_2D_ARB 0x207A
|
||||||
|
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
||||||
|
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||||
|
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||||
|
#define WGL_FRONT_LEFT_ARB 0x2083
|
||||||
|
#define WGL_FRONT_RIGHT_ARB 0x2084
|
||||||
|
#define WGL_BACK_LEFT_ARB 0x2085
|
||||||
|
#define WGL_BACK_RIGHT_ARB 0x2086
|
||||||
|
#define WGL_AUX0_ARB 0x2087
|
||||||
|
#define WGL_AUX1_ARB 0x2088
|
||||||
|
#define WGL_AUX2_ARB 0x2089
|
||||||
|
#define WGL_AUX3_ARB 0x208A
|
||||||
|
#define WGL_AUX4_ARB 0x208B
|
||||||
|
#define WGL_AUX5_ARB 0x208C
|
||||||
|
#define WGL_AUX6_ARB 0x208D
|
||||||
|
#define WGL_AUX7_ARB 0x208E
|
||||||
|
#define WGL_AUX8_ARB 0x208F
|
||||||
|
#define WGL_AUX9_ARB 0x2090
|
||||||
|
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||||
|
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||||
|
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||||
|
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
||||||
|
#define WGL_ACCELERATION_ARB 0x2003
|
||||||
|
#define WGL_NEED_PALETTE_ARB 0x2004
|
||||||
|
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||||
|
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||||
|
#define WGL_SWAP_METHOD_ARB 0x2007
|
||||||
|
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
||||||
|
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||||
|
#define WGL_TRANSPARENT_ARB 0x200A
|
||||||
|
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||||
|
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||||
|
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||||
|
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||||
|
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||||
|
#define WGL_SHARE_DEPTH_ARB 0x200C
|
||||||
|
#define WGL_SHARE_STENCIL_ARB 0x200D
|
||||||
|
#define WGL_SHARE_ACCUM_ARB 0x200E
|
||||||
|
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||||
|
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||||
|
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||||
|
#define WGL_STEREO_ARB 0x2012
|
||||||
|
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||||
|
#define WGL_COLOR_BITS_ARB 0x2014
|
||||||
|
#define WGL_RED_BITS_ARB 0x2015
|
||||||
|
#define WGL_RED_SHIFT_ARB 0x2016
|
||||||
|
#define WGL_GREEN_BITS_ARB 0x2017
|
||||||
|
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||||
|
#define WGL_BLUE_BITS_ARB 0x2019
|
||||||
|
#define WGL_BLUE_SHIFT_ARB 0x201A
|
||||||
|
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||||
|
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
||||||
|
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||||
|
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||||
|
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||||
|
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||||
|
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||||
|
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||||
|
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||||
|
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||||
|
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||||
|
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||||
|
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||||
|
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
||||||
|
#define WGL_SWAP_COPY_ARB 0x2029
|
||||||
|
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
||||||
|
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||||
|
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||||
|
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
||||||
|
#define WGL_SAMPLES_ARB 0x2042
|
||||||
|
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046
|
||||||
|
#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047
|
||||||
|
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
||||||
|
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
||||||
|
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
||||||
|
#define WGL_ACCESS_READ_ONLY_NV 0x00000000
|
||||||
|
#define WGL_ACCESS_READ_WRITE_NV 0x00000001
|
||||||
|
#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002
|
||||||
|
#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
|
||||||
|
#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
|
||||||
|
#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
|
||||||
|
#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
|
||||||
|
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
||||||
|
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
||||||
|
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
||||||
|
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
||||||
|
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
||||||
|
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
||||||
|
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
||||||
|
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
||||||
|
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
||||||
|
#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
|
||||||
|
#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
|
||||||
|
#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
|
||||||
|
#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
|
||||||
|
#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||||
|
#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||||
|
#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||||
|
#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||||
|
#define WGL_VIDEO_OUT_FRAME 0x20C8
|
||||||
|
#define WGL_VIDEO_OUT_FIELD_1 0x20C9
|
||||||
|
#define WGL_VIDEO_OUT_FIELD_2 0x20CA
|
||||||
|
#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
|
||||||
|
#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
|
||||||
|
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||||
|
#define WGL_SAMPLES_3DFX 0x2061
|
||||||
|
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||||
|
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||||
|
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
|
||||||
|
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
||||||
|
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||||
|
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
||||||
|
#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
||||||
|
#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||||
|
#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||||
|
#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||||
|
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||||
|
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||||
|
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||||
|
#define WGL_SAMPLES_EXT 0x2042
|
||||||
|
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||||
|
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||||
|
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||||
|
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||||
|
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
||||||
|
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
||||||
|
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||||
|
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||||
|
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||||
|
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
||||||
|
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
||||||
|
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
||||||
|
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||||
|
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||||
|
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||||
|
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||||
|
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
||||||
|
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
||||||
|
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
||||||
|
#define WGL_PBUFFER_LOST_ARB 0x2036
|
||||||
|
#define WGL_GPU_VENDOR_AMD 0x1F00
|
||||||
|
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
||||||
|
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||||
|
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||||
|
#define WGL_GPU_RAM_AMD 0x21A3
|
||||||
|
#define WGL_GPU_CLOCK_AMD 0x21A4
|
||||||
|
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
|
||||||
|
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
|
||||||
|
#define WGL_GPU_NUM_RB_AMD 0x21A7
|
||||||
|
#define WGL_GPU_NUM_SPI_AMD 0x21A8
|
||||||
|
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
||||||
|
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||||
|
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
||||||
|
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
||||||
|
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
||||||
|
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
||||||
|
#ifndef WGL_NV_multisample_coverage
|
||||||
|
#define WGL_NV_multisample_coverage 1
|
||||||
|
GLAPI int GLAD_WGL_NV_multisample_coverage;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_I3D_image_buffer
|
||||||
|
#define WGL_I3D_image_buffer 1
|
||||||
|
GLAPI int GLAD_WGL_I3D_image_buffer;
|
||||||
|
typedef LPVOID (APIENTRYP PFNWGLCREATEIMAGEBUFFERI3DPROC)(HDC, DWORD, UINT);
|
||||||
|
GLAPI PFNWGLCREATEIMAGEBUFFERI3DPROC glad_wglCreateImageBufferI3D;
|
||||||
|
#define wglCreateImageBufferI3D glad_wglCreateImageBufferI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDESTROYIMAGEBUFFERI3DPROC)(HDC, LPVOID);
|
||||||
|
GLAPI PFNWGLDESTROYIMAGEBUFFERI3DPROC glad_wglDestroyImageBufferI3D;
|
||||||
|
#define wglDestroyImageBufferI3D glad_wglDestroyImageBufferI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC)(HDC, const HANDLE*, const LPVOID*, const DWORD*, UINT);
|
||||||
|
GLAPI PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC glad_wglAssociateImageBufferEventsI3D;
|
||||||
|
#define wglAssociateImageBufferEventsI3D glad_wglAssociateImageBufferEventsI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC)(HDC, const LPVOID*, UINT);
|
||||||
|
GLAPI PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC glad_wglReleaseImageBufferEventsI3D;
|
||||||
|
#define wglReleaseImageBufferEventsI3D glad_wglReleaseImageBufferEventsI3D
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_I3D_swap_frame_usage
|
||||||
|
#define WGL_I3D_swap_frame_usage 1
|
||||||
|
GLAPI int GLAD_WGL_I3D_swap_frame_usage;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETFRAMEUSAGEI3DPROC)(float*);
|
||||||
|
GLAPI PFNWGLGETFRAMEUSAGEI3DPROC glad_wglGetFrameUsageI3D;
|
||||||
|
#define wglGetFrameUsageI3D glad_wglGetFrameUsageI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLBEGINFRAMETRACKINGI3DPROC)();
|
||||||
|
GLAPI PFNWGLBEGINFRAMETRACKINGI3DPROC glad_wglBeginFrameTrackingI3D;
|
||||||
|
#define wglBeginFrameTrackingI3D glad_wglBeginFrameTrackingI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLENDFRAMETRACKINGI3DPROC)();
|
||||||
|
GLAPI PFNWGLENDFRAMETRACKINGI3DPROC glad_wglEndFrameTrackingI3D;
|
||||||
|
#define wglEndFrameTrackingI3D glad_wglEndFrameTrackingI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLQUERYFRAMETRACKINGI3DPROC)(DWORD*, DWORD*, float*);
|
||||||
|
GLAPI PFNWGLQUERYFRAMETRACKINGI3DPROC glad_wglQueryFrameTrackingI3D;
|
||||||
|
#define wglQueryFrameTrackingI3D glad_wglQueryFrameTrackingI3D
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_DX_interop2
|
||||||
|
#define WGL_NV_DX_interop2 1
|
||||||
|
GLAPI int GLAD_WGL_NV_DX_interop2;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_float_buffer
|
||||||
|
#define WGL_NV_float_buffer 1
|
||||||
|
GLAPI int GLAD_WGL_NV_float_buffer;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_delay_before_swap
|
||||||
|
#define WGL_NV_delay_before_swap 1
|
||||||
|
GLAPI int GLAD_WGL_NV_delay_before_swap;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDELAYBEFORESWAPNVPROC)(HDC, GLfloat);
|
||||||
|
GLAPI PFNWGLDELAYBEFORESWAPNVPROC glad_wglDelayBeforeSwapNV;
|
||||||
|
#define wglDelayBeforeSwapNV glad_wglDelayBeforeSwapNV
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_OML_sync_control
|
||||||
|
#define WGL_OML_sync_control 1
|
||||||
|
GLAPI int GLAD_WGL_OML_sync_control;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETSYNCVALUESOMLPROC)(HDC, INT64*, INT64*, INT64*);
|
||||||
|
GLAPI PFNWGLGETSYNCVALUESOMLPROC glad_wglGetSyncValuesOML;
|
||||||
|
#define wglGetSyncValuesOML glad_wglGetSyncValuesOML
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETMSCRATEOMLPROC)(HDC, INT32*, INT32*);
|
||||||
|
GLAPI PFNWGLGETMSCRATEOMLPROC glad_wglGetMscRateOML;
|
||||||
|
#define wglGetMscRateOML glad_wglGetMscRateOML
|
||||||
|
typedef INT64 (APIENTRYP PFNWGLSWAPBUFFERSMSCOMLPROC)(HDC, INT64, INT64, INT64);
|
||||||
|
GLAPI PFNWGLSWAPBUFFERSMSCOMLPROC glad_wglSwapBuffersMscOML;
|
||||||
|
#define wglSwapBuffersMscOML glad_wglSwapBuffersMscOML
|
||||||
|
typedef INT64 (APIENTRYP PFNWGLSWAPLAYERBUFFERSMSCOMLPROC)(HDC, int, INT64, INT64, INT64);
|
||||||
|
GLAPI PFNWGLSWAPLAYERBUFFERSMSCOMLPROC glad_wglSwapLayerBuffersMscOML;
|
||||||
|
#define wglSwapLayerBuffersMscOML glad_wglSwapLayerBuffersMscOML
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLWAITFORMSCOMLPROC)(HDC, INT64, INT64, INT64, INT64*, INT64*, INT64*);
|
||||||
|
GLAPI PFNWGLWAITFORMSCOMLPROC glad_wglWaitForMscOML;
|
||||||
|
#define wglWaitForMscOML glad_wglWaitForMscOML
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLWAITFORSBCOMLPROC)(HDC, INT64, INT64*, INT64*, INT64*);
|
||||||
|
GLAPI PFNWGLWAITFORSBCOMLPROC glad_wglWaitForSbcOML;
|
||||||
|
#define wglWaitForSbcOML glad_wglWaitForSbcOML
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_pixel_format_float
|
||||||
|
#define WGL_ARB_pixel_format_float 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_pixel_format_float;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_create_context
|
||||||
|
#define WGL_ARB_create_context 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_create_context;
|
||||||
|
typedef HGLRC (APIENTRYP PFNWGLCREATECONTEXTATTRIBSARBPROC)(HDC, HGLRC, const int*);
|
||||||
|
GLAPI PFNWGLCREATECONTEXTATTRIBSARBPROC glad_wglCreateContextAttribsARB;
|
||||||
|
#define wglCreateContextAttribsARB glad_wglCreateContextAttribsARB
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_swap_group
|
||||||
|
#define WGL_NV_swap_group 1
|
||||||
|
GLAPI int GLAD_WGL_NV_swap_group;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLJOINSWAPGROUPNVPROC)(HDC, GLuint);
|
||||||
|
GLAPI PFNWGLJOINSWAPGROUPNVPROC glad_wglJoinSwapGroupNV;
|
||||||
|
#define wglJoinSwapGroupNV glad_wglJoinSwapGroupNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLBINDSWAPBARRIERNVPROC)(GLuint, GLuint);
|
||||||
|
GLAPI PFNWGLBINDSWAPBARRIERNVPROC glad_wglBindSwapBarrierNV;
|
||||||
|
#define wglBindSwapBarrierNV glad_wglBindSwapBarrierNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLQUERYSWAPGROUPNVPROC)(HDC, GLuint*, GLuint*);
|
||||||
|
GLAPI PFNWGLQUERYSWAPGROUPNVPROC glad_wglQuerySwapGroupNV;
|
||||||
|
#define wglQuerySwapGroupNV glad_wglQuerySwapGroupNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLQUERYMAXSWAPGROUPSNVPROC)(HDC, GLuint*, GLuint*);
|
||||||
|
GLAPI PFNWGLQUERYMAXSWAPGROUPSNVPROC glad_wglQueryMaxSwapGroupsNV;
|
||||||
|
#define wglQueryMaxSwapGroupsNV glad_wglQueryMaxSwapGroupsNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLQUERYFRAMECOUNTNVPROC)(HDC, GLuint*);
|
||||||
|
GLAPI PFNWGLQUERYFRAMECOUNTNVPROC glad_wglQueryFrameCountNV;
|
||||||
|
#define wglQueryFrameCountNV glad_wglQueryFrameCountNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLRESETFRAMECOUNTNVPROC)(HDC);
|
||||||
|
GLAPI PFNWGLRESETFRAMECOUNTNVPROC glad_wglResetFrameCountNV;
|
||||||
|
#define wglResetFrameCountNV glad_wglResetFrameCountNV
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_gpu_affinity
|
||||||
|
#define WGL_NV_gpu_affinity 1
|
||||||
|
GLAPI int GLAD_WGL_NV_gpu_affinity;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLENUMGPUSNVPROC)(UINT, HGPUNV*);
|
||||||
|
GLAPI PFNWGLENUMGPUSNVPROC glad_wglEnumGpusNV;
|
||||||
|
#define wglEnumGpusNV glad_wglEnumGpusNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLENUMGPUDEVICESNVPROC)(HGPUNV, UINT, PGPU_DEVICE);
|
||||||
|
GLAPI PFNWGLENUMGPUDEVICESNVPROC glad_wglEnumGpuDevicesNV;
|
||||||
|
#define wglEnumGpuDevicesNV glad_wglEnumGpuDevicesNV
|
||||||
|
typedef HDC (APIENTRYP PFNWGLCREATEAFFINITYDCNVPROC)(const HGPUNV*);
|
||||||
|
GLAPI PFNWGLCREATEAFFINITYDCNVPROC glad_wglCreateAffinityDCNV;
|
||||||
|
#define wglCreateAffinityDCNV glad_wglCreateAffinityDCNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLENUMGPUSFROMAFFINITYDCNVPROC)(HDC, UINT, HGPUNV*);
|
||||||
|
GLAPI PFNWGLENUMGPUSFROMAFFINITYDCNVPROC glad_wglEnumGpusFromAffinityDCNV;
|
||||||
|
#define wglEnumGpusFromAffinityDCNV glad_wglEnumGpusFromAffinityDCNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDELETEDCNVPROC)(HDC);
|
||||||
|
GLAPI PFNWGLDELETEDCNVPROC glad_wglDeleteDCNV;
|
||||||
|
#define wglDeleteDCNV glad_wglDeleteDCNV
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_pixel_format
|
||||||
|
#define WGL_EXT_pixel_format 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_pixel_format;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETPIXELFORMATATTRIBIVEXTPROC)(HDC, int, int, UINT, int*, int*);
|
||||||
|
GLAPI PFNWGLGETPIXELFORMATATTRIBIVEXTPROC glad_wglGetPixelFormatAttribivEXT;
|
||||||
|
#define wglGetPixelFormatAttribivEXT glad_wglGetPixelFormatAttribivEXT
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETPIXELFORMATATTRIBFVEXTPROC)(HDC, int, int, UINT, int*, FLOAT*);
|
||||||
|
GLAPI PFNWGLGETPIXELFORMATATTRIBFVEXTPROC glad_wglGetPixelFormatAttribfvEXT;
|
||||||
|
#define wglGetPixelFormatAttribfvEXT glad_wglGetPixelFormatAttribfvEXT
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLCHOOSEPIXELFORMATEXTPROC)(HDC, const int*, const FLOAT*, UINT, int*, UINT*);
|
||||||
|
GLAPI PFNWGLCHOOSEPIXELFORMATEXTPROC glad_wglChoosePixelFormatEXT;
|
||||||
|
#define wglChoosePixelFormatEXT glad_wglChoosePixelFormatEXT
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_extensions_string
|
||||||
|
#define WGL_ARB_extensions_string 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_extensions_string;
|
||||||
|
typedef const char* (APIENTRYP PFNWGLGETEXTENSIONSSTRINGARBPROC)(HDC);
|
||||||
|
GLAPI PFNWGLGETEXTENSIONSSTRINGARBPROC glad_wglGetExtensionsStringARB;
|
||||||
|
#define wglGetExtensionsStringARB glad_wglGetExtensionsStringARB
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_video_capture
|
||||||
|
#define WGL_NV_video_capture 1
|
||||||
|
GLAPI int GLAD_WGL_NV_video_capture;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLBINDVIDEOCAPTUREDEVICENVPROC)(UINT, HVIDEOINPUTDEVICENV);
|
||||||
|
GLAPI PFNWGLBINDVIDEOCAPTUREDEVICENVPROC glad_wglBindVideoCaptureDeviceNV;
|
||||||
|
#define wglBindVideoCaptureDeviceNV glad_wglBindVideoCaptureDeviceNV
|
||||||
|
typedef UINT (APIENTRYP PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC)(HDC, HVIDEOINPUTDEVICENV*);
|
||||||
|
GLAPI PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_wglEnumerateVideoCaptureDevicesNV;
|
||||||
|
#define wglEnumerateVideoCaptureDevicesNV glad_wglEnumerateVideoCaptureDevicesNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC)(HDC, HVIDEOINPUTDEVICENV);
|
||||||
|
GLAPI PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC glad_wglLockVideoCaptureDeviceNV;
|
||||||
|
#define wglLockVideoCaptureDeviceNV glad_wglLockVideoCaptureDeviceNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC)(HDC, HVIDEOINPUTDEVICENV, int, int*);
|
||||||
|
GLAPI PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC glad_wglQueryVideoCaptureDeviceNV;
|
||||||
|
#define wglQueryVideoCaptureDeviceNV glad_wglQueryVideoCaptureDeviceNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC)(HDC, HVIDEOINPUTDEVICENV);
|
||||||
|
GLAPI PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC glad_wglReleaseVideoCaptureDeviceNV;
|
||||||
|
#define wglReleaseVideoCaptureDeviceNV glad_wglReleaseVideoCaptureDeviceNV
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_render_texture_rectangle
|
||||||
|
#define WGL_NV_render_texture_rectangle 1
|
||||||
|
GLAPI int GLAD_WGL_NV_render_texture_rectangle;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_create_context_es_profile
|
||||||
|
#define WGL_EXT_create_context_es_profile 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_create_context_es_profile;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_robustness_share_group_isolation
|
||||||
|
#define WGL_ARB_robustness_share_group_isolation 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_robustness_share_group_isolation;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_render_texture
|
||||||
|
#define WGL_ARB_render_texture 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_render_texture;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLBINDTEXIMAGEARBPROC)(HPBUFFERARB, int);
|
||||||
|
GLAPI PFNWGLBINDTEXIMAGEARBPROC glad_wglBindTexImageARB;
|
||||||
|
#define wglBindTexImageARB glad_wglBindTexImageARB
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLRELEASETEXIMAGEARBPROC)(HPBUFFERARB, int);
|
||||||
|
GLAPI PFNWGLRELEASETEXIMAGEARBPROC glad_wglReleaseTexImageARB;
|
||||||
|
#define wglReleaseTexImageARB glad_wglReleaseTexImageARB
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLSETPBUFFERATTRIBARBPROC)(HPBUFFERARB, const int*);
|
||||||
|
GLAPI PFNWGLSETPBUFFERATTRIBARBPROC glad_wglSetPbufferAttribARB;
|
||||||
|
#define wglSetPbufferAttribARB glad_wglSetPbufferAttribARB
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_depth_float
|
||||||
|
#define WGL_EXT_depth_float 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_depth_float;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_swap_control_tear
|
||||||
|
#define WGL_EXT_swap_control_tear 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_swap_control_tear;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_pixel_format
|
||||||
|
#define WGL_ARB_pixel_format 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_pixel_format;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETPIXELFORMATATTRIBIVARBPROC)(HDC, int, int, UINT, const int*, int*);
|
||||||
|
GLAPI PFNWGLGETPIXELFORMATATTRIBIVARBPROC glad_wglGetPixelFormatAttribivARB;
|
||||||
|
#define wglGetPixelFormatAttribivARB glad_wglGetPixelFormatAttribivARB
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETPIXELFORMATATTRIBFVARBPROC)(HDC, int, int, UINT, const int*, FLOAT*);
|
||||||
|
GLAPI PFNWGLGETPIXELFORMATATTRIBFVARBPROC glad_wglGetPixelFormatAttribfvARB;
|
||||||
|
#define wglGetPixelFormatAttribfvARB glad_wglGetPixelFormatAttribfvARB
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLCHOOSEPIXELFORMATARBPROC)(HDC, const int*, const FLOAT*, UINT, int*, UINT*);
|
||||||
|
GLAPI PFNWGLCHOOSEPIXELFORMATARBPROC glad_wglChoosePixelFormatARB;
|
||||||
|
#define wglChoosePixelFormatARB glad_wglChoosePixelFormatARB
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_multisample
|
||||||
|
#define WGL_ARB_multisample 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_multisample;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_I3D_genlock
|
||||||
|
#define WGL_I3D_genlock 1
|
||||||
|
GLAPI int GLAD_WGL_I3D_genlock;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLENABLEGENLOCKI3DPROC)(HDC);
|
||||||
|
GLAPI PFNWGLENABLEGENLOCKI3DPROC glad_wglEnableGenlockI3D;
|
||||||
|
#define wglEnableGenlockI3D glad_wglEnableGenlockI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDISABLEGENLOCKI3DPROC)(HDC);
|
||||||
|
GLAPI PFNWGLDISABLEGENLOCKI3DPROC glad_wglDisableGenlockI3D;
|
||||||
|
#define wglDisableGenlockI3D glad_wglDisableGenlockI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLISENABLEDGENLOCKI3DPROC)(HDC, BOOL*);
|
||||||
|
GLAPI PFNWGLISENABLEDGENLOCKI3DPROC glad_wglIsEnabledGenlockI3D;
|
||||||
|
#define wglIsEnabledGenlockI3D glad_wglIsEnabledGenlockI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGENLOCKSOURCEI3DPROC)(HDC, UINT);
|
||||||
|
GLAPI PFNWGLGENLOCKSOURCEI3DPROC glad_wglGenlockSourceI3D;
|
||||||
|
#define wglGenlockSourceI3D glad_wglGenlockSourceI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETGENLOCKSOURCEI3DPROC)(HDC, UINT*);
|
||||||
|
GLAPI PFNWGLGETGENLOCKSOURCEI3DPROC glad_wglGetGenlockSourceI3D;
|
||||||
|
#define wglGetGenlockSourceI3D glad_wglGetGenlockSourceI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGENLOCKSOURCEEDGEI3DPROC)(HDC, UINT);
|
||||||
|
GLAPI PFNWGLGENLOCKSOURCEEDGEI3DPROC glad_wglGenlockSourceEdgeI3D;
|
||||||
|
#define wglGenlockSourceEdgeI3D glad_wglGenlockSourceEdgeI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETGENLOCKSOURCEEDGEI3DPROC)(HDC, UINT*);
|
||||||
|
GLAPI PFNWGLGETGENLOCKSOURCEEDGEI3DPROC glad_wglGetGenlockSourceEdgeI3D;
|
||||||
|
#define wglGetGenlockSourceEdgeI3D glad_wglGetGenlockSourceEdgeI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGENLOCKSAMPLERATEI3DPROC)(HDC, UINT);
|
||||||
|
GLAPI PFNWGLGENLOCKSAMPLERATEI3DPROC glad_wglGenlockSampleRateI3D;
|
||||||
|
#define wglGenlockSampleRateI3D glad_wglGenlockSampleRateI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETGENLOCKSAMPLERATEI3DPROC)(HDC, UINT*);
|
||||||
|
GLAPI PFNWGLGETGENLOCKSAMPLERATEI3DPROC glad_wglGetGenlockSampleRateI3D;
|
||||||
|
#define wglGetGenlockSampleRateI3D glad_wglGetGenlockSampleRateI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGENLOCKSOURCEDELAYI3DPROC)(HDC, UINT);
|
||||||
|
GLAPI PFNWGLGENLOCKSOURCEDELAYI3DPROC glad_wglGenlockSourceDelayI3D;
|
||||||
|
#define wglGenlockSourceDelayI3D glad_wglGenlockSourceDelayI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETGENLOCKSOURCEDELAYI3DPROC)(HDC, UINT*);
|
||||||
|
GLAPI PFNWGLGETGENLOCKSOURCEDELAYI3DPROC glad_wglGetGenlockSourceDelayI3D;
|
||||||
|
#define wglGetGenlockSourceDelayI3D glad_wglGetGenlockSourceDelayI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC)(HDC, UINT*, UINT*);
|
||||||
|
GLAPI PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC glad_wglQueryGenlockMaxSourceDelayI3D;
|
||||||
|
#define wglQueryGenlockMaxSourceDelayI3D glad_wglQueryGenlockMaxSourceDelayI3D
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_DX_interop
|
||||||
|
#define WGL_NV_DX_interop 1
|
||||||
|
GLAPI int GLAD_WGL_NV_DX_interop;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDXSETRESOURCESHAREHANDLENVPROC)(void*, HANDLE);
|
||||||
|
GLAPI PFNWGLDXSETRESOURCESHAREHANDLENVPROC glad_wglDXSetResourceShareHandleNV;
|
||||||
|
#define wglDXSetResourceShareHandleNV glad_wglDXSetResourceShareHandleNV
|
||||||
|
typedef HANDLE (APIENTRYP PFNWGLDXOPENDEVICENVPROC)(void*);
|
||||||
|
GLAPI PFNWGLDXOPENDEVICENVPROC glad_wglDXOpenDeviceNV;
|
||||||
|
#define wglDXOpenDeviceNV glad_wglDXOpenDeviceNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDXCLOSEDEVICENVPROC)(HANDLE);
|
||||||
|
GLAPI PFNWGLDXCLOSEDEVICENVPROC glad_wglDXCloseDeviceNV;
|
||||||
|
#define wglDXCloseDeviceNV glad_wglDXCloseDeviceNV
|
||||||
|
typedef HANDLE (APIENTRYP PFNWGLDXREGISTEROBJECTNVPROC)(HANDLE, void*, GLuint, GLenum, GLenum);
|
||||||
|
GLAPI PFNWGLDXREGISTEROBJECTNVPROC glad_wglDXRegisterObjectNV;
|
||||||
|
#define wglDXRegisterObjectNV glad_wglDXRegisterObjectNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDXUNREGISTEROBJECTNVPROC)(HANDLE, HANDLE);
|
||||||
|
GLAPI PFNWGLDXUNREGISTEROBJECTNVPROC glad_wglDXUnregisterObjectNV;
|
||||||
|
#define wglDXUnregisterObjectNV glad_wglDXUnregisterObjectNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDXOBJECTACCESSNVPROC)(HANDLE, GLenum);
|
||||||
|
GLAPI PFNWGLDXOBJECTACCESSNVPROC glad_wglDXObjectAccessNV;
|
||||||
|
#define wglDXObjectAccessNV glad_wglDXObjectAccessNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDXLOCKOBJECTSNVPROC)(HANDLE, GLint, HANDLE*);
|
||||||
|
GLAPI PFNWGLDXLOCKOBJECTSNVPROC glad_wglDXLockObjectsNV;
|
||||||
|
#define wglDXLockObjectsNV glad_wglDXLockObjectsNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDXUNLOCKOBJECTSNVPROC)(HANDLE, GLint, HANDLE*);
|
||||||
|
GLAPI PFNWGLDXUNLOCKOBJECTSNVPROC glad_wglDXUnlockObjectsNV;
|
||||||
|
#define wglDXUnlockObjectsNV glad_wglDXUnlockObjectsNV
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_3DL_stereo_control
|
||||||
|
#define WGL_3DL_stereo_control 1
|
||||||
|
GLAPI int GLAD_WGL_3DL_stereo_control;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLSETSTEREOEMITTERSTATE3DLPROC)(HDC, UINT);
|
||||||
|
GLAPI PFNWGLSETSTEREOEMITTERSTATE3DLPROC glad_wglSetStereoEmitterState3DL;
|
||||||
|
#define wglSetStereoEmitterState3DL glad_wglSetStereoEmitterState3DL
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_pbuffer
|
||||||
|
#define WGL_EXT_pbuffer 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_pbuffer;
|
||||||
|
typedef HPBUFFEREXT (APIENTRYP PFNWGLCREATEPBUFFEREXTPROC)(HDC, int, int, int, const int*);
|
||||||
|
GLAPI PFNWGLCREATEPBUFFEREXTPROC glad_wglCreatePbufferEXT;
|
||||||
|
#define wglCreatePbufferEXT glad_wglCreatePbufferEXT
|
||||||
|
typedef HDC (APIENTRYP PFNWGLGETPBUFFERDCEXTPROC)(HPBUFFEREXT);
|
||||||
|
GLAPI PFNWGLGETPBUFFERDCEXTPROC glad_wglGetPbufferDCEXT;
|
||||||
|
#define wglGetPbufferDCEXT glad_wglGetPbufferDCEXT
|
||||||
|
typedef int (APIENTRYP PFNWGLRELEASEPBUFFERDCEXTPROC)(HPBUFFEREXT, HDC);
|
||||||
|
GLAPI PFNWGLRELEASEPBUFFERDCEXTPROC glad_wglReleasePbufferDCEXT;
|
||||||
|
#define wglReleasePbufferDCEXT glad_wglReleasePbufferDCEXT
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDESTROYPBUFFEREXTPROC)(HPBUFFEREXT);
|
||||||
|
GLAPI PFNWGLDESTROYPBUFFEREXTPROC glad_wglDestroyPbufferEXT;
|
||||||
|
#define wglDestroyPbufferEXT glad_wglDestroyPbufferEXT
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLQUERYPBUFFEREXTPROC)(HPBUFFEREXT, int, int*);
|
||||||
|
GLAPI PFNWGLQUERYPBUFFEREXTPROC glad_wglQueryPbufferEXT;
|
||||||
|
#define wglQueryPbufferEXT glad_wglQueryPbufferEXT
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_display_color_table
|
||||||
|
#define WGL_EXT_display_color_table 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_display_color_table;
|
||||||
|
typedef GLboolean (APIENTRYP PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC)(GLushort);
|
||||||
|
GLAPI PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC glad_wglCreateDisplayColorTableEXT;
|
||||||
|
#define wglCreateDisplayColorTableEXT glad_wglCreateDisplayColorTableEXT
|
||||||
|
typedef GLboolean (APIENTRYP PFNWGLLOADDISPLAYCOLORTABLEEXTPROC)(const GLushort*, GLuint);
|
||||||
|
GLAPI PFNWGLLOADDISPLAYCOLORTABLEEXTPROC glad_wglLoadDisplayColorTableEXT;
|
||||||
|
#define wglLoadDisplayColorTableEXT glad_wglLoadDisplayColorTableEXT
|
||||||
|
typedef GLboolean (APIENTRYP PFNWGLBINDDISPLAYCOLORTABLEEXTPROC)(GLushort);
|
||||||
|
GLAPI PFNWGLBINDDISPLAYCOLORTABLEEXTPROC glad_wglBindDisplayColorTableEXT;
|
||||||
|
#define wglBindDisplayColorTableEXT glad_wglBindDisplayColorTableEXT
|
||||||
|
typedef VOID (APIENTRYP PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC)(GLushort);
|
||||||
|
GLAPI PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC glad_wglDestroyDisplayColorTableEXT;
|
||||||
|
#define wglDestroyDisplayColorTableEXT glad_wglDestroyDisplayColorTableEXT
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_video_output
|
||||||
|
#define WGL_NV_video_output 1
|
||||||
|
GLAPI int GLAD_WGL_NV_video_output;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETVIDEODEVICENVPROC)(HDC, int, HPVIDEODEV*);
|
||||||
|
GLAPI PFNWGLGETVIDEODEVICENVPROC glad_wglGetVideoDeviceNV;
|
||||||
|
#define wglGetVideoDeviceNV glad_wglGetVideoDeviceNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLRELEASEVIDEODEVICENVPROC)(HPVIDEODEV);
|
||||||
|
GLAPI PFNWGLRELEASEVIDEODEVICENVPROC glad_wglReleaseVideoDeviceNV;
|
||||||
|
#define wglReleaseVideoDeviceNV glad_wglReleaseVideoDeviceNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLBINDVIDEOIMAGENVPROC)(HPVIDEODEV, HPBUFFERARB, int);
|
||||||
|
GLAPI PFNWGLBINDVIDEOIMAGENVPROC glad_wglBindVideoImageNV;
|
||||||
|
#define wglBindVideoImageNV glad_wglBindVideoImageNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLRELEASEVIDEOIMAGENVPROC)(HPBUFFERARB, int);
|
||||||
|
GLAPI PFNWGLRELEASEVIDEOIMAGENVPROC glad_wglReleaseVideoImageNV;
|
||||||
|
#define wglReleaseVideoImageNV glad_wglReleaseVideoImageNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLSENDPBUFFERTOVIDEONVPROC)(HPBUFFERARB, int, unsigned long*, BOOL);
|
||||||
|
GLAPI PFNWGLSENDPBUFFERTOVIDEONVPROC glad_wglSendPbufferToVideoNV;
|
||||||
|
#define wglSendPbufferToVideoNV glad_wglSendPbufferToVideoNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETVIDEOINFONVPROC)(HPVIDEODEV, unsigned long*, unsigned long*);
|
||||||
|
GLAPI PFNWGLGETVIDEOINFONVPROC glad_wglGetVideoInfoNV;
|
||||||
|
#define wglGetVideoInfoNV glad_wglGetVideoInfoNV
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_robustness_application_isolation
|
||||||
|
#define WGL_ARB_robustness_application_isolation 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_robustness_application_isolation;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_3DFX_multisample
|
||||||
|
#define WGL_3DFX_multisample 1
|
||||||
|
GLAPI int GLAD_WGL_3DFX_multisample;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_I3D_gamma
|
||||||
|
#define WGL_I3D_gamma 1
|
||||||
|
GLAPI int GLAD_WGL_I3D_gamma;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETGAMMATABLEPARAMETERSI3DPROC)(HDC, int, int*);
|
||||||
|
GLAPI PFNWGLGETGAMMATABLEPARAMETERSI3DPROC glad_wglGetGammaTableParametersI3D;
|
||||||
|
#define wglGetGammaTableParametersI3D glad_wglGetGammaTableParametersI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLSETGAMMATABLEPARAMETERSI3DPROC)(HDC, int, const int*);
|
||||||
|
GLAPI PFNWGLSETGAMMATABLEPARAMETERSI3DPROC glad_wglSetGammaTableParametersI3D;
|
||||||
|
#define wglSetGammaTableParametersI3D glad_wglSetGammaTableParametersI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETGAMMATABLEI3DPROC)(HDC, int, USHORT*, USHORT*, USHORT*);
|
||||||
|
GLAPI PFNWGLGETGAMMATABLEI3DPROC glad_wglGetGammaTableI3D;
|
||||||
|
#define wglGetGammaTableI3D glad_wglGetGammaTableI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLSETGAMMATABLEI3DPROC)(HDC, int, const USHORT*, const USHORT*, const USHORT*);
|
||||||
|
GLAPI PFNWGLSETGAMMATABLEI3DPROC glad_wglSetGammaTableI3D;
|
||||||
|
#define wglSetGammaTableI3D glad_wglSetGammaTableI3D
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_framebuffer_sRGB
|
||||||
|
#define WGL_ARB_framebuffer_sRGB 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_framebuffer_sRGB;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_copy_image
|
||||||
|
#define WGL_NV_copy_image 1
|
||||||
|
GLAPI int GLAD_WGL_NV_copy_image;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLCOPYIMAGESUBDATANVPROC)(HGLRC, GLuint, GLenum, GLint, GLint, GLint, GLint, HGLRC, GLuint, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei);
|
||||||
|
GLAPI PFNWGLCOPYIMAGESUBDATANVPROC glad_wglCopyImageSubDataNV;
|
||||||
|
#define wglCopyImageSubDataNV glad_wglCopyImageSubDataNV
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_framebuffer_sRGB
|
||||||
|
#define WGL_EXT_framebuffer_sRGB 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_framebuffer_sRGB;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_present_video
|
||||||
|
#define WGL_NV_present_video 1
|
||||||
|
GLAPI int GLAD_WGL_NV_present_video;
|
||||||
|
typedef int (APIENTRYP PFNWGLENUMERATEVIDEODEVICESNVPROC)(HDC, HVIDEOOUTPUTDEVICENV*);
|
||||||
|
GLAPI PFNWGLENUMERATEVIDEODEVICESNVPROC glad_wglEnumerateVideoDevicesNV;
|
||||||
|
#define wglEnumerateVideoDevicesNV glad_wglEnumerateVideoDevicesNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLBINDVIDEODEVICENVPROC)(HDC, unsigned int, HVIDEOOUTPUTDEVICENV, const int*);
|
||||||
|
GLAPI PFNWGLBINDVIDEODEVICENVPROC glad_wglBindVideoDeviceNV;
|
||||||
|
#define wglBindVideoDeviceNV glad_wglBindVideoDeviceNV
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLQUERYCURRENTCONTEXTNVPROC)(int, int*);
|
||||||
|
GLAPI PFNWGLQUERYCURRENTCONTEXTNVPROC glad_wglQueryCurrentContextNV;
|
||||||
|
#define wglQueryCurrentContextNV glad_wglQueryCurrentContextNV
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_create_context_es2_profile
|
||||||
|
#define WGL_EXT_create_context_es2_profile 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_create_context_es2_profile;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_create_context_robustness
|
||||||
|
#define WGL_ARB_create_context_robustness 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_create_context_robustness;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_make_current_read
|
||||||
|
#define WGL_ARB_make_current_read 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_make_current_read;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLMAKECONTEXTCURRENTARBPROC)(HDC, HDC, HGLRC);
|
||||||
|
GLAPI PFNWGLMAKECONTEXTCURRENTARBPROC glad_wglMakeContextCurrentARB;
|
||||||
|
#define wglMakeContextCurrentARB glad_wglMakeContextCurrentARB
|
||||||
|
typedef HDC (APIENTRYP PFNWGLGETCURRENTREADDCARBPROC)();
|
||||||
|
GLAPI PFNWGLGETCURRENTREADDCARBPROC glad_wglGetCurrentReadDCARB;
|
||||||
|
#define wglGetCurrentReadDCARB glad_wglGetCurrentReadDCARB
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_multisample
|
||||||
|
#define WGL_EXT_multisample 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_multisample;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_extensions_string
|
||||||
|
#define WGL_EXT_extensions_string 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_extensions_string;
|
||||||
|
typedef const char* (APIENTRYP PFNWGLGETEXTENSIONSSTRINGEXTPROC)();
|
||||||
|
GLAPI PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT;
|
||||||
|
#define wglGetExtensionsStringEXT glad_wglGetExtensionsStringEXT
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_render_depth_texture
|
||||||
|
#define WGL_NV_render_depth_texture 1
|
||||||
|
GLAPI int GLAD_WGL_NV_render_depth_texture;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ATI_pixel_format_float
|
||||||
|
#define WGL_ATI_pixel_format_float 1
|
||||||
|
GLAPI int GLAD_WGL_ATI_pixel_format_float;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_create_context_profile
|
||||||
|
#define WGL_ARB_create_context_profile 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_create_context_profile;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_swap_control
|
||||||
|
#define WGL_EXT_swap_control 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_swap_control;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLSWAPINTERVALEXTPROC)(int);
|
||||||
|
GLAPI PFNWGLSWAPINTERVALEXTPROC glad_wglSwapIntervalEXT;
|
||||||
|
#define wglSwapIntervalEXT glad_wglSwapIntervalEXT
|
||||||
|
typedef int (APIENTRYP PFNWGLGETSWAPINTERVALEXTPROC)();
|
||||||
|
GLAPI PFNWGLGETSWAPINTERVALEXTPROC glad_wglGetSwapIntervalEXT;
|
||||||
|
#define wglGetSwapIntervalEXT glad_wglGetSwapIntervalEXT
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_I3D_digital_video_control
|
||||||
|
#define WGL_I3D_digital_video_control 1
|
||||||
|
GLAPI int GLAD_WGL_I3D_digital_video_control;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC)(HDC, int, int*);
|
||||||
|
GLAPI PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC glad_wglGetDigitalVideoParametersI3D;
|
||||||
|
#define wglGetDigitalVideoParametersI3D glad_wglGetDigitalVideoParametersI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC)(HDC, int, const int*);
|
||||||
|
GLAPI PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC glad_wglSetDigitalVideoParametersI3D;
|
||||||
|
#define wglSetDigitalVideoParametersI3D glad_wglSetDigitalVideoParametersI3D
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_pbuffer
|
||||||
|
#define WGL_ARB_pbuffer 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_pbuffer;
|
||||||
|
typedef HPBUFFERARB (APIENTRYP PFNWGLCREATEPBUFFERARBPROC)(HDC, int, int, int, const int*);
|
||||||
|
GLAPI PFNWGLCREATEPBUFFERARBPROC glad_wglCreatePbufferARB;
|
||||||
|
#define wglCreatePbufferARB glad_wglCreatePbufferARB
|
||||||
|
typedef HDC (APIENTRYP PFNWGLGETPBUFFERDCARBPROC)(HPBUFFERARB);
|
||||||
|
GLAPI PFNWGLGETPBUFFERDCARBPROC glad_wglGetPbufferDCARB;
|
||||||
|
#define wglGetPbufferDCARB glad_wglGetPbufferDCARB
|
||||||
|
typedef int (APIENTRYP PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB, HDC);
|
||||||
|
GLAPI PFNWGLRELEASEPBUFFERDCARBPROC glad_wglReleasePbufferDCARB;
|
||||||
|
#define wglReleasePbufferDCARB glad_wglReleasePbufferDCARB
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDESTROYPBUFFERARBPROC)(HPBUFFERARB);
|
||||||
|
GLAPI PFNWGLDESTROYPBUFFERARBPROC glad_wglDestroyPbufferARB;
|
||||||
|
#define wglDestroyPbufferARB glad_wglDestroyPbufferARB
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLQUERYPBUFFERARBPROC)(HPBUFFERARB, int, int*);
|
||||||
|
GLAPI PFNWGLQUERYPBUFFERARBPROC glad_wglQueryPbufferARB;
|
||||||
|
#define wglQueryPbufferARB glad_wglQueryPbufferARB
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_NV_vertex_array_range
|
||||||
|
#define WGL_NV_vertex_array_range 1
|
||||||
|
GLAPI int GLAD_WGL_NV_vertex_array_range;
|
||||||
|
typedef void* (APIENTRYP PFNWGLALLOCATEMEMORYNVPROC)(GLsizei, GLfloat, GLfloat, GLfloat);
|
||||||
|
GLAPI PFNWGLALLOCATEMEMORYNVPROC glad_wglAllocateMemoryNV;
|
||||||
|
#define wglAllocateMemoryNV glad_wglAllocateMemoryNV
|
||||||
|
typedef void (APIENTRYP PFNWGLFREEMEMORYNVPROC)(void*);
|
||||||
|
GLAPI PFNWGLFREEMEMORYNVPROC glad_wglFreeMemoryNV;
|
||||||
|
#define wglFreeMemoryNV glad_wglFreeMemoryNV
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_AMD_gpu_association
|
||||||
|
#define WGL_AMD_gpu_association 1
|
||||||
|
GLAPI int GLAD_WGL_AMD_gpu_association;
|
||||||
|
typedef UINT (APIENTRYP PFNWGLGETGPUIDSAMDPROC)(UINT, UINT*);
|
||||||
|
GLAPI PFNWGLGETGPUIDSAMDPROC glad_wglGetGPUIDsAMD;
|
||||||
|
#define wglGetGPUIDsAMD glad_wglGetGPUIDsAMD
|
||||||
|
typedef INT (APIENTRYP PFNWGLGETGPUINFOAMDPROC)(UINT, int, GLenum, UINT, void*);
|
||||||
|
GLAPI PFNWGLGETGPUINFOAMDPROC glad_wglGetGPUInfoAMD;
|
||||||
|
#define wglGetGPUInfoAMD glad_wglGetGPUInfoAMD
|
||||||
|
typedef UINT (APIENTRYP PFNWGLGETCONTEXTGPUIDAMDPROC)(HGLRC);
|
||||||
|
GLAPI PFNWGLGETCONTEXTGPUIDAMDPROC glad_wglGetContextGPUIDAMD;
|
||||||
|
#define wglGetContextGPUIDAMD glad_wglGetContextGPUIDAMD
|
||||||
|
typedef HGLRC (APIENTRYP PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC)(UINT);
|
||||||
|
GLAPI PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC glad_wglCreateAssociatedContextAMD;
|
||||||
|
#define wglCreateAssociatedContextAMD glad_wglCreateAssociatedContextAMD
|
||||||
|
typedef HGLRC (APIENTRYP PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC)(UINT, HGLRC, const int*);
|
||||||
|
GLAPI PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC glad_wglCreateAssociatedContextAttribsAMD;
|
||||||
|
#define wglCreateAssociatedContextAttribsAMD glad_wglCreateAssociatedContextAttribsAMD
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC)(HGLRC);
|
||||||
|
GLAPI PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC glad_wglDeleteAssociatedContextAMD;
|
||||||
|
#define wglDeleteAssociatedContextAMD glad_wglDeleteAssociatedContextAMD
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)(HGLRC);
|
||||||
|
GLAPI PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_wglMakeAssociatedContextCurrentAMD;
|
||||||
|
#define wglMakeAssociatedContextCurrentAMD glad_wglMakeAssociatedContextCurrentAMD
|
||||||
|
typedef HGLRC (APIENTRYP PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC)();
|
||||||
|
GLAPI PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_wglGetCurrentAssociatedContextAMD;
|
||||||
|
#define wglGetCurrentAssociatedContextAMD glad_wglGetCurrentAssociatedContextAMD
|
||||||
|
typedef VOID (APIENTRYP PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC)(HGLRC, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
|
||||||
|
GLAPI PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC glad_wglBlitContextFramebufferAMD;
|
||||||
|
#define wglBlitContextFramebufferAMD glad_wglBlitContextFramebufferAMD
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_pixel_format_packed_float
|
||||||
|
#define WGL_EXT_pixel_format_packed_float 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_pixel_format_packed_float;
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_EXT_make_current_read
|
||||||
|
#define WGL_EXT_make_current_read 1
|
||||||
|
GLAPI int GLAD_WGL_EXT_make_current_read;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLMAKECONTEXTCURRENTEXTPROC)(HDC, HDC, HGLRC);
|
||||||
|
GLAPI PFNWGLMAKECONTEXTCURRENTEXTPROC glad_wglMakeContextCurrentEXT;
|
||||||
|
#define wglMakeContextCurrentEXT glad_wglMakeContextCurrentEXT
|
||||||
|
typedef HDC (APIENTRYP PFNWGLGETCURRENTREADDCEXTPROC)();
|
||||||
|
GLAPI PFNWGLGETCURRENTREADDCEXTPROC glad_wglGetCurrentReadDCEXT;
|
||||||
|
#define wglGetCurrentReadDCEXT glad_wglGetCurrentReadDCEXT
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_I3D_swap_frame_lock
|
||||||
|
#define WGL_I3D_swap_frame_lock 1
|
||||||
|
GLAPI int GLAD_WGL_I3D_swap_frame_lock;
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLENABLEFRAMELOCKI3DPROC)();
|
||||||
|
GLAPI PFNWGLENABLEFRAMELOCKI3DPROC glad_wglEnableFrameLockI3D;
|
||||||
|
#define wglEnableFrameLockI3D glad_wglEnableFrameLockI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLDISABLEFRAMELOCKI3DPROC)();
|
||||||
|
GLAPI PFNWGLDISABLEFRAMELOCKI3DPROC glad_wglDisableFrameLockI3D;
|
||||||
|
#define wglDisableFrameLockI3D glad_wglDisableFrameLockI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLISENABLEDFRAMELOCKI3DPROC)(BOOL*);
|
||||||
|
GLAPI PFNWGLISENABLEDFRAMELOCKI3DPROC glad_wglIsEnabledFrameLockI3D;
|
||||||
|
#define wglIsEnabledFrameLockI3D glad_wglIsEnabledFrameLockI3D
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLQUERYFRAMELOCKMASTERI3DPROC)(BOOL*);
|
||||||
|
GLAPI PFNWGLQUERYFRAMELOCKMASTERI3DPROC glad_wglQueryFrameLockMasterI3D;
|
||||||
|
#define wglQueryFrameLockMasterI3D glad_wglQueryFrameLockMasterI3D
|
||||||
|
#endif
|
||||||
|
#ifndef WGL_ARB_buffer_region
|
||||||
|
#define WGL_ARB_buffer_region 1
|
||||||
|
GLAPI int GLAD_WGL_ARB_buffer_region;
|
||||||
|
typedef HANDLE (APIENTRYP PFNWGLCREATEBUFFERREGIONARBPROC)(HDC, int, UINT);
|
||||||
|
GLAPI PFNWGLCREATEBUFFERREGIONARBPROC glad_wglCreateBufferRegionARB;
|
||||||
|
#define wglCreateBufferRegionARB glad_wglCreateBufferRegionARB
|
||||||
|
typedef VOID (APIENTRYP PFNWGLDELETEBUFFERREGIONARBPROC)(HANDLE);
|
||||||
|
GLAPI PFNWGLDELETEBUFFERREGIONARBPROC glad_wglDeleteBufferRegionARB;
|
||||||
|
#define wglDeleteBufferRegionARB glad_wglDeleteBufferRegionARB
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLSAVEBUFFERREGIONARBPROC)(HANDLE, int, int, int, int);
|
||||||
|
GLAPI PFNWGLSAVEBUFFERREGIONARBPROC glad_wglSaveBufferRegionARB;
|
||||||
|
#define wglSaveBufferRegionARB glad_wglSaveBufferRegionARB
|
||||||
|
typedef BOOL (APIENTRYP PFNWGLRESTOREBUFFERREGIONARBPROC)(HANDLE, int, int, int, int, int, int);
|
||||||
|
GLAPI PFNWGLRESTOREBUFFERREGIONARBPROC glad_wglRestoreBufferRegionARB;
|
||||||
|
#define wglRestoreBufferRegionARB glad_wglRestoreBufferRegionARB
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
7349
deps/glad/src/glad.c
vendored
Normal file
7349
deps/glad/src/glad.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
701
deps/glad/src/glad_glx.c
vendored
Normal file
701
deps/glad/src/glad_glx.c
vendored
Normal file
|
@ -0,0 +1,701 @@
|
||||||
|
#include <string.h>
|
||||||
|
#include <glad/glad_glx.h>
|
||||||
|
|
||||||
|
static void* get_proc(const char *namez);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
static HMODULE libGL;
|
||||||
|
|
||||||
|
typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
|
||||||
|
PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
|
||||||
|
|
||||||
|
static
|
||||||
|
int open_gl(void) {
|
||||||
|
libGL = LoadLibraryA("opengl32.dll");
|
||||||
|
if(libGL != NULL) {
|
||||||
|
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE)GetProcAddress(
|
||||||
|
libGL, "wglGetProcAddress");
|
||||||
|
return gladGetProcAddressPtr != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void close_gl(void) {
|
||||||
|
if(libGL != NULL) {
|
||||||
|
FreeLibrary(libGL);
|
||||||
|
libGL = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#include <dlfcn.h>
|
||||||
|
static void* libGL;
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
|
typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
|
||||||
|
PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static
|
||||||
|
int open_gl(void) {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
static const char *NAMES[] = {
|
||||||
|
"../Frameworks/OpenGL.framework/OpenGL",
|
||||||
|
"/Library/Frameworks/OpenGL.framework/OpenGL",
|
||||||
|
"/System/Library/Frameworks/OpenGL.framework/OpenGL",
|
||||||
|
"/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
static const char *NAMES[] = {"libGL.so.1", "libGL.so"};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
unsigned int index = 0;
|
||||||
|
for(index = 0; index < (sizeof(NAMES) / sizeof(NAMES[0])); index++) {
|
||||||
|
libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL);
|
||||||
|
|
||||||
|
if(libGL != NULL) {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
|
gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL,
|
||||||
|
"glXGetProcAddressARB");
|
||||||
|
return gladGetProcAddressPtr != NULL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void close_gl() {
|
||||||
|
if(libGL != NULL) {
|
||||||
|
dlclose(libGL);
|
||||||
|
libGL = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static
|
||||||
|
void* get_proc(const char *namez) {
|
||||||
|
void* result = NULL;
|
||||||
|
if(libGL == NULL) return NULL;
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
|
if(gladGetProcAddressPtr != NULL) {
|
||||||
|
result = gladGetProcAddressPtr(namez);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if(result == NULL) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
result = (void*)GetProcAddress(libGL, namez);
|
||||||
|
#else
|
||||||
|
result = dlsym(libGL, namez);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
int gladLoadGLX(Display *dpy, int screen) {
|
||||||
|
if(open_gl()) {
|
||||||
|
gladLoadGLXLoader((GLADloadproc)get_proc, dpy, screen);
|
||||||
|
close_gl();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Display *GLADGLXDisplay = 0;
|
||||||
|
static int GLADGLXscreen = 0;
|
||||||
|
|
||||||
|
static int has_ext(const char *ext) {
|
||||||
|
const char *terminator;
|
||||||
|
const char *loc;
|
||||||
|
const char *extensions;
|
||||||
|
|
||||||
|
if(!GLAD_GLX_VERSION_1_1)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
extensions = glXQueryExtensionsString(GLADGLXDisplay, GLADGLXscreen);
|
||||||
|
|
||||||
|
if(extensions == NULL || ext == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
while(1) {
|
||||||
|
loc = strstr(extensions, ext);
|
||||||
|
if(loc == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
|
terminator = loc + strlen(ext);
|
||||||
|
if((loc == extensions || *(loc - 1) == ' ') &&
|
||||||
|
(*terminator == ' ' || *terminator == '\0'))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
extensions = terminator;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int GLAD_GLX_VERSION_1_0;
|
||||||
|
int GLAD_GLX_VERSION_1_1;
|
||||||
|
int GLAD_GLX_VERSION_1_2;
|
||||||
|
int GLAD_GLX_VERSION_1_3;
|
||||||
|
int GLAD_GLX_VERSION_1_4;
|
||||||
|
PFNGLXGETSELECTEDEVENTPROC glad_glXGetSelectedEvent;
|
||||||
|
PFNGLXQUERYEXTENSIONPROC glad_glXQueryExtension;
|
||||||
|
PFNGLXMAKECURRENTPROC glad_glXMakeCurrent;
|
||||||
|
PFNGLXSELECTEVENTPROC glad_glXSelectEvent;
|
||||||
|
PFNGLXCREATECONTEXTPROC glad_glXCreateContext;
|
||||||
|
PFNGLXCREATEGLXPIXMAPPROC glad_glXCreateGLXPixmap;
|
||||||
|
PFNGLXQUERYVERSIONPROC glad_glXQueryVersion;
|
||||||
|
PFNGLXGETCURRENTREADDRAWABLEPROC glad_glXGetCurrentReadDrawable;
|
||||||
|
PFNGLXDESTROYPIXMAPPROC glad_glXDestroyPixmap;
|
||||||
|
PFNGLXGETCURRENTCONTEXTPROC glad_glXGetCurrentContext;
|
||||||
|
PFNGLXGETPROCADDRESSPROC glad_glXGetProcAddress;
|
||||||
|
PFNGLXWAITGLPROC glad_glXWaitGL;
|
||||||
|
PFNGLXISDIRECTPROC glad_glXIsDirect;
|
||||||
|
PFNGLXDESTROYWINDOWPROC glad_glXDestroyWindow;
|
||||||
|
PFNGLXCREATEWINDOWPROC glad_glXCreateWindow;
|
||||||
|
PFNGLXCOPYCONTEXTPROC glad_glXCopyContext;
|
||||||
|
PFNGLXCREATEPBUFFERPROC glad_glXCreatePbuffer;
|
||||||
|
PFNGLXSWAPBUFFERSPROC glad_glXSwapBuffers;
|
||||||
|
PFNGLXGETCURRENTDISPLAYPROC glad_glXGetCurrentDisplay;
|
||||||
|
PFNGLXGETCURRENTDRAWABLEPROC glad_glXGetCurrentDrawable;
|
||||||
|
PFNGLXQUERYCONTEXTPROC glad_glXQueryContext;
|
||||||
|
PFNGLXCHOOSEVISUALPROC glad_glXChooseVisual;
|
||||||
|
PFNGLXQUERYSERVERSTRINGPROC glad_glXQueryServerString;
|
||||||
|
PFNGLXDESTROYCONTEXTPROC glad_glXDestroyContext;
|
||||||
|
PFNGLXDESTROYGLXPIXMAPPROC glad_glXDestroyGLXPixmap;
|
||||||
|
PFNGLXGETFBCONFIGATTRIBPROC glad_glXGetFBConfigAttrib;
|
||||||
|
PFNGLXUSEXFONTPROC glad_glXUseXFont;
|
||||||
|
PFNGLXDESTROYPBUFFERPROC glad_glXDestroyPbuffer;
|
||||||
|
PFNGLXCHOOSEFBCONFIGPROC glad_glXChooseFBConfig;
|
||||||
|
PFNGLXCREATENEWCONTEXTPROC glad_glXCreateNewContext;
|
||||||
|
PFNGLXMAKECONTEXTCURRENTPROC glad_glXMakeContextCurrent;
|
||||||
|
PFNGLXGETCONFIGPROC glad_glXGetConfig;
|
||||||
|
PFNGLXGETFBCONFIGSPROC glad_glXGetFBConfigs;
|
||||||
|
PFNGLXCREATEPIXMAPPROC glad_glXCreatePixmap;
|
||||||
|
PFNGLXWAITXPROC glad_glXWaitX;
|
||||||
|
PFNGLXGETVISUALFROMFBCONFIGPROC glad_glXGetVisualFromFBConfig;
|
||||||
|
PFNGLXQUERYDRAWABLEPROC glad_glXQueryDrawable;
|
||||||
|
PFNGLXQUERYEXTENSIONSSTRINGPROC glad_glXQueryExtensionsString;
|
||||||
|
PFNGLXGETCLIENTSTRINGPROC glad_glXGetClientString;
|
||||||
|
int GLAD_GLX_ARB_framebuffer_sRGB;
|
||||||
|
int GLAD_GLX_EXT_import_context;
|
||||||
|
int GLAD_GLX_NV_multisample_coverage;
|
||||||
|
int GLAD_GLX_SGIS_shared_multisample;
|
||||||
|
int GLAD_GLX_SGIX_pbuffer;
|
||||||
|
int GLAD_GLX_NV_swap_group;
|
||||||
|
int GLAD_GLX_ARB_fbconfig_float;
|
||||||
|
int GLAD_GLX_SGIX_hyperpipe;
|
||||||
|
int GLAD_GLX_ARB_robustness_share_group_isolation;
|
||||||
|
int GLAD_GLX_INTEL_swap_event;
|
||||||
|
int GLAD_GLX_SGIX_video_resize;
|
||||||
|
int GLAD_GLX_EXT_create_context_es2_profile;
|
||||||
|
int GLAD_GLX_ARB_robustness_application_isolation;
|
||||||
|
int GLAD_GLX_NV_copy_image;
|
||||||
|
int GLAD_GLX_OML_sync_control;
|
||||||
|
int GLAD_GLX_EXT_framebuffer_sRGB;
|
||||||
|
int GLAD_GLX_SGI_make_current_read;
|
||||||
|
int GLAD_GLX_MESA_swap_control;
|
||||||
|
int GLAD_GLX_SGI_swap_control;
|
||||||
|
int GLAD_GLX_EXT_fbconfig_packed_float;
|
||||||
|
int GLAD_GLX_EXT_buffer_age;
|
||||||
|
int GLAD_GLX_3DFX_multisample;
|
||||||
|
int GLAD_GLX_EXT_visual_info;
|
||||||
|
int GLAD_GLX_SGI_video_sync;
|
||||||
|
int GLAD_GLX_MESA_agp_offset;
|
||||||
|
int GLAD_GLX_SGIS_multisample;
|
||||||
|
int GLAD_GLX_MESA_set_3dfx_mode;
|
||||||
|
int GLAD_GLX_EXT_texture_from_pixmap;
|
||||||
|
int GLAD_GLX_NV_video_capture;
|
||||||
|
int GLAD_GLX_ARB_multisample;
|
||||||
|
int GLAD_GLX_NV_delay_before_swap;
|
||||||
|
int GLAD_GLX_SGIX_swap_group;
|
||||||
|
int GLAD_GLX_EXT_swap_control;
|
||||||
|
int GLAD_GLX_SGIX_video_source;
|
||||||
|
int GLAD_GLX_MESA_query_renderer;
|
||||||
|
int GLAD_GLX_ARB_create_context;
|
||||||
|
int GLAD_GLX_EXT_create_context_es_profile;
|
||||||
|
int GLAD_GLX_SGIX_fbconfig;
|
||||||
|
int GLAD_GLX_MESA_pixmap_colormap;
|
||||||
|
int GLAD_GLX_SGIX_visual_select_group;
|
||||||
|
int GLAD_GLX_NV_video_output;
|
||||||
|
int GLAD_GLX_SGIS_blended_overlay;
|
||||||
|
int GLAD_GLX_SGIX_dmbuffer;
|
||||||
|
int GLAD_GLX_ARB_create_context_robustness;
|
||||||
|
int GLAD_GLX_SGIX_swap_barrier;
|
||||||
|
int GLAD_GLX_EXT_swap_control_tear;
|
||||||
|
int GLAD_GLX_MESA_release_buffers;
|
||||||
|
int GLAD_GLX_EXT_visual_rating;
|
||||||
|
int GLAD_GLX_MESA_copy_sub_buffer;
|
||||||
|
int GLAD_GLX_SGI_cushion;
|
||||||
|
int GLAD_GLX_NV_float_buffer;
|
||||||
|
int GLAD_GLX_OML_swap_method;
|
||||||
|
int GLAD_GLX_NV_present_video;
|
||||||
|
int GLAD_GLX_SUN_get_transparent_index;
|
||||||
|
int GLAD_GLX_AMD_gpu_association;
|
||||||
|
int GLAD_GLX_ARB_create_context_profile;
|
||||||
|
int GLAD_GLX_ARB_get_proc_address;
|
||||||
|
int GLAD_GLX_ARB_vertex_buffer_object;
|
||||||
|
PFNGLXGETCURRENTDISPLAYEXTPROC glad_glXGetCurrentDisplayEXT;
|
||||||
|
PFNGLXQUERYCONTEXTINFOEXTPROC glad_glXQueryContextInfoEXT;
|
||||||
|
PFNGLXGETCONTEXTIDEXTPROC glad_glXGetContextIDEXT;
|
||||||
|
PFNGLXIMPORTCONTEXTEXTPROC glad_glXImportContextEXT;
|
||||||
|
PFNGLXFREECONTEXTEXTPROC glad_glXFreeContextEXT;
|
||||||
|
PFNGLXCREATEGLXPBUFFERSGIXPROC glad_glXCreateGLXPbufferSGIX;
|
||||||
|
PFNGLXDESTROYGLXPBUFFERSGIXPROC glad_glXDestroyGLXPbufferSGIX;
|
||||||
|
PFNGLXQUERYGLXPBUFFERSGIXPROC glad_glXQueryGLXPbufferSGIX;
|
||||||
|
PFNGLXSELECTEVENTSGIXPROC glad_glXSelectEventSGIX;
|
||||||
|
PFNGLXGETSELECTEDEVENTSGIXPROC glad_glXGetSelectedEventSGIX;
|
||||||
|
PFNGLXJOINSWAPGROUPNVPROC glad_glXJoinSwapGroupNV;
|
||||||
|
PFNGLXBINDSWAPBARRIERNVPROC glad_glXBindSwapBarrierNV;
|
||||||
|
PFNGLXQUERYSWAPGROUPNVPROC glad_glXQuerySwapGroupNV;
|
||||||
|
PFNGLXQUERYMAXSWAPGROUPSNVPROC glad_glXQueryMaxSwapGroupsNV;
|
||||||
|
PFNGLXQUERYFRAMECOUNTNVPROC glad_glXQueryFrameCountNV;
|
||||||
|
PFNGLXRESETFRAMECOUNTNVPROC glad_glXResetFrameCountNV;
|
||||||
|
PFNGLXQUERYHYPERPIPENETWORKSGIXPROC glad_glXQueryHyperpipeNetworkSGIX;
|
||||||
|
PFNGLXHYPERPIPECONFIGSGIXPROC glad_glXHyperpipeConfigSGIX;
|
||||||
|
PFNGLXQUERYHYPERPIPECONFIGSGIXPROC glad_glXQueryHyperpipeConfigSGIX;
|
||||||
|
PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC glad_glXDestroyHyperpipeConfigSGIX;
|
||||||
|
PFNGLXBINDHYPERPIPESGIXPROC glad_glXBindHyperpipeSGIX;
|
||||||
|
PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC glad_glXQueryHyperpipeBestAttribSGIX;
|
||||||
|
PFNGLXHYPERPIPEATTRIBSGIXPROC glad_glXHyperpipeAttribSGIX;
|
||||||
|
PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC glad_glXQueryHyperpipeAttribSGIX;
|
||||||
|
PFNGLXBINDCHANNELTOWINDOWSGIXPROC glad_glXBindChannelToWindowSGIX;
|
||||||
|
PFNGLXCHANNELRECTSGIXPROC glad_glXChannelRectSGIX;
|
||||||
|
PFNGLXQUERYCHANNELRECTSGIXPROC glad_glXQueryChannelRectSGIX;
|
||||||
|
PFNGLXQUERYCHANNELDELTASSGIXPROC glad_glXQueryChannelDeltasSGIX;
|
||||||
|
PFNGLXCHANNELRECTSYNCSGIXPROC glad_glXChannelRectSyncSGIX;
|
||||||
|
PFNGLXCOPYIMAGESUBDATANVPROC glad_glXCopyImageSubDataNV;
|
||||||
|
PFNGLXGETSYNCVALUESOMLPROC glad_glXGetSyncValuesOML;
|
||||||
|
PFNGLXGETMSCRATEOMLPROC glad_glXGetMscRateOML;
|
||||||
|
PFNGLXSWAPBUFFERSMSCOMLPROC glad_glXSwapBuffersMscOML;
|
||||||
|
PFNGLXWAITFORMSCOMLPROC glad_glXWaitForMscOML;
|
||||||
|
PFNGLXWAITFORSBCOMLPROC glad_glXWaitForSbcOML;
|
||||||
|
PFNGLXMAKECURRENTREADSGIPROC glad_glXMakeCurrentReadSGI;
|
||||||
|
PFNGLXGETCURRENTREADDRAWABLESGIPROC glad_glXGetCurrentReadDrawableSGI;
|
||||||
|
PFNGLXSWAPINTERVALMESAPROC glad_glXSwapIntervalMESA;
|
||||||
|
PFNGLXSWAPINTERVALSGIPROC glad_glXSwapIntervalSGI;
|
||||||
|
PFNGLXGETVIDEOSYNCSGIPROC glad_glXGetVideoSyncSGI;
|
||||||
|
PFNGLXWAITVIDEOSYNCSGIPROC glad_glXWaitVideoSyncSGI;
|
||||||
|
PFNGLXGETAGPOFFSETMESAPROC glad_glXGetAGPOffsetMESA;
|
||||||
|
PFNGLXSET3DFXMODEMESAPROC glad_glXSet3DfxModeMESA;
|
||||||
|
PFNGLXBINDTEXIMAGEEXTPROC glad_glXBindTexImageEXT;
|
||||||
|
PFNGLXRELEASETEXIMAGEEXTPROC glad_glXReleaseTexImageEXT;
|
||||||
|
PFNGLXBINDVIDEOCAPTUREDEVICENVPROC glad_glXBindVideoCaptureDeviceNV;
|
||||||
|
PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_glXEnumerateVideoCaptureDevicesNV;
|
||||||
|
PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC glad_glXLockVideoCaptureDeviceNV;
|
||||||
|
PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC glad_glXQueryVideoCaptureDeviceNV;
|
||||||
|
PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC glad_glXReleaseVideoCaptureDeviceNV;
|
||||||
|
PFNGLXDELAYBEFORESWAPNVPROC glad_glXDelayBeforeSwapNV;
|
||||||
|
PFNGLXJOINSWAPGROUPSGIXPROC glad_glXJoinSwapGroupSGIX;
|
||||||
|
PFNGLXSWAPINTERVALEXTPROC glad_glXSwapIntervalEXT;
|
||||||
|
#ifdef _VL_H_
|
||||||
|
PFNGLXCREATEGLXVIDEOSOURCESGIXPROC glad_glXCreateGLXVideoSourceSGIX;
|
||||||
|
PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC glad_glXDestroyGLXVideoSourceSGIX;
|
||||||
|
#endif
|
||||||
|
PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC glad_glXQueryCurrentRendererIntegerMESA;
|
||||||
|
PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC glad_glXQueryCurrentRendererStringMESA;
|
||||||
|
PFNGLXQUERYRENDERERINTEGERMESAPROC glad_glXQueryRendererIntegerMESA;
|
||||||
|
PFNGLXQUERYRENDERERSTRINGMESAPROC glad_glXQueryRendererStringMESA;
|
||||||
|
PFNGLXCREATECONTEXTATTRIBSARBPROC glad_glXCreateContextAttribsARB;
|
||||||
|
PFNGLXGETFBCONFIGATTRIBSGIXPROC glad_glXGetFBConfigAttribSGIX;
|
||||||
|
PFNGLXCHOOSEFBCONFIGSGIXPROC glad_glXChooseFBConfigSGIX;
|
||||||
|
PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC glad_glXCreateGLXPixmapWithConfigSGIX;
|
||||||
|
PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC glad_glXCreateContextWithConfigSGIX;
|
||||||
|
PFNGLXGETVISUALFROMFBCONFIGSGIXPROC glad_glXGetVisualFromFBConfigSGIX;
|
||||||
|
PFNGLXGETFBCONFIGFROMVISUALSGIXPROC glad_glXGetFBConfigFromVisualSGIX;
|
||||||
|
PFNGLXCREATEGLXPIXMAPMESAPROC glad_glXCreateGLXPixmapMESA;
|
||||||
|
PFNGLXGETVIDEODEVICENVPROC glad_glXGetVideoDeviceNV;
|
||||||
|
PFNGLXRELEASEVIDEODEVICENVPROC glad_glXReleaseVideoDeviceNV;
|
||||||
|
PFNGLXBINDVIDEOIMAGENVPROC glad_glXBindVideoImageNV;
|
||||||
|
PFNGLXRELEASEVIDEOIMAGENVPROC glad_glXReleaseVideoImageNV;
|
||||||
|
PFNGLXSENDPBUFFERTOVIDEONVPROC glad_glXSendPbufferToVideoNV;
|
||||||
|
PFNGLXGETVIDEOINFONVPROC glad_glXGetVideoInfoNV;
|
||||||
|
#ifdef _DM_BUFFER_H_
|
||||||
|
PFNGLXASSOCIATEDMPBUFFERSGIXPROC glad_glXAssociateDMPbufferSGIX;
|
||||||
|
#endif
|
||||||
|
PFNGLXBINDSWAPBARRIERSGIXPROC glad_glXBindSwapBarrierSGIX;
|
||||||
|
PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC glad_glXQueryMaxSwapBarriersSGIX;
|
||||||
|
PFNGLXRELEASEBUFFERSMESAPROC glad_glXReleaseBuffersMESA;
|
||||||
|
PFNGLXCOPYSUBBUFFERMESAPROC glad_glXCopySubBufferMESA;
|
||||||
|
PFNGLXCUSHIONSGIPROC glad_glXCushionSGI;
|
||||||
|
PFNGLXENUMERATEVIDEODEVICESNVPROC glad_glXEnumerateVideoDevicesNV;
|
||||||
|
PFNGLXBINDVIDEODEVICENVPROC glad_glXBindVideoDeviceNV;
|
||||||
|
PFNGLXGETTRANSPARENTINDEXSUNPROC glad_glXGetTransparentIndexSUN;
|
||||||
|
PFNGLXGETPROCADDRESSARBPROC glad_glXGetProcAddressARB;
|
||||||
|
static void load_GLX_VERSION_1_0(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_VERSION_1_0) return;
|
||||||
|
glad_glXChooseVisual = (PFNGLXCHOOSEVISUALPROC)load("glXChooseVisual");
|
||||||
|
glad_glXCreateContext = (PFNGLXCREATECONTEXTPROC)load("glXCreateContext");
|
||||||
|
glad_glXDestroyContext = (PFNGLXDESTROYCONTEXTPROC)load("glXDestroyContext");
|
||||||
|
glad_glXMakeCurrent = (PFNGLXMAKECURRENTPROC)load("glXMakeCurrent");
|
||||||
|
glad_glXCopyContext = (PFNGLXCOPYCONTEXTPROC)load("glXCopyContext");
|
||||||
|
glad_glXSwapBuffers = (PFNGLXSWAPBUFFERSPROC)load("glXSwapBuffers");
|
||||||
|
glad_glXCreateGLXPixmap = (PFNGLXCREATEGLXPIXMAPPROC)load("glXCreateGLXPixmap");
|
||||||
|
glad_glXDestroyGLXPixmap = (PFNGLXDESTROYGLXPIXMAPPROC)load("glXDestroyGLXPixmap");
|
||||||
|
glad_glXQueryExtension = (PFNGLXQUERYEXTENSIONPROC)load("glXQueryExtension");
|
||||||
|
glad_glXQueryVersion = (PFNGLXQUERYVERSIONPROC)load("glXQueryVersion");
|
||||||
|
glad_glXIsDirect = (PFNGLXISDIRECTPROC)load("glXIsDirect");
|
||||||
|
glad_glXGetConfig = (PFNGLXGETCONFIGPROC)load("glXGetConfig");
|
||||||
|
glad_glXGetCurrentContext = (PFNGLXGETCURRENTCONTEXTPROC)load("glXGetCurrentContext");
|
||||||
|
glad_glXGetCurrentDrawable = (PFNGLXGETCURRENTDRAWABLEPROC)load("glXGetCurrentDrawable");
|
||||||
|
glad_glXWaitGL = (PFNGLXWAITGLPROC)load("glXWaitGL");
|
||||||
|
glad_glXWaitX = (PFNGLXWAITXPROC)load("glXWaitX");
|
||||||
|
glad_glXUseXFont = (PFNGLXUSEXFONTPROC)load("glXUseXFont");
|
||||||
|
}
|
||||||
|
static void load_GLX_VERSION_1_1(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_VERSION_1_1) return;
|
||||||
|
glad_glXQueryExtensionsString = (PFNGLXQUERYEXTENSIONSSTRINGPROC)load("glXQueryExtensionsString");
|
||||||
|
glad_glXQueryServerString = (PFNGLXQUERYSERVERSTRINGPROC)load("glXQueryServerString");
|
||||||
|
glad_glXGetClientString = (PFNGLXGETCLIENTSTRINGPROC)load("glXGetClientString");
|
||||||
|
}
|
||||||
|
static void load_GLX_VERSION_1_2(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_VERSION_1_2) return;
|
||||||
|
glad_glXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC)load("glXGetCurrentDisplay");
|
||||||
|
}
|
||||||
|
static void load_GLX_VERSION_1_3(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_VERSION_1_3) return;
|
||||||
|
glad_glXGetFBConfigs = (PFNGLXGETFBCONFIGSPROC)load("glXGetFBConfigs");
|
||||||
|
glad_glXChooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC)load("glXChooseFBConfig");
|
||||||
|
glad_glXGetFBConfigAttrib = (PFNGLXGETFBCONFIGATTRIBPROC)load("glXGetFBConfigAttrib");
|
||||||
|
glad_glXGetVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGPROC)load("glXGetVisualFromFBConfig");
|
||||||
|
glad_glXCreateWindow = (PFNGLXCREATEWINDOWPROC)load("glXCreateWindow");
|
||||||
|
glad_glXDestroyWindow = (PFNGLXDESTROYWINDOWPROC)load("glXDestroyWindow");
|
||||||
|
glad_glXCreatePixmap = (PFNGLXCREATEPIXMAPPROC)load("glXCreatePixmap");
|
||||||
|
glad_glXDestroyPixmap = (PFNGLXDESTROYPIXMAPPROC)load("glXDestroyPixmap");
|
||||||
|
glad_glXCreatePbuffer = (PFNGLXCREATEPBUFFERPROC)load("glXCreatePbuffer");
|
||||||
|
glad_glXDestroyPbuffer = (PFNGLXDESTROYPBUFFERPROC)load("glXDestroyPbuffer");
|
||||||
|
glad_glXQueryDrawable = (PFNGLXQUERYDRAWABLEPROC)load("glXQueryDrawable");
|
||||||
|
glad_glXCreateNewContext = (PFNGLXCREATENEWCONTEXTPROC)load("glXCreateNewContext");
|
||||||
|
glad_glXMakeContextCurrent = (PFNGLXMAKECONTEXTCURRENTPROC)load("glXMakeContextCurrent");
|
||||||
|
glad_glXGetCurrentReadDrawable = (PFNGLXGETCURRENTREADDRAWABLEPROC)load("glXGetCurrentReadDrawable");
|
||||||
|
glad_glXQueryContext = (PFNGLXQUERYCONTEXTPROC)load("glXQueryContext");
|
||||||
|
glad_glXSelectEvent = (PFNGLXSELECTEVENTPROC)load("glXSelectEvent");
|
||||||
|
glad_glXGetSelectedEvent = (PFNGLXGETSELECTEDEVENTPROC)load("glXGetSelectedEvent");
|
||||||
|
}
|
||||||
|
static void load_GLX_VERSION_1_4(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_VERSION_1_4) return;
|
||||||
|
glad_glXGetProcAddress = (PFNGLXGETPROCADDRESSPROC)load("glXGetProcAddress");
|
||||||
|
}
|
||||||
|
static void load_GLX_EXT_import_context(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_EXT_import_context) return;
|
||||||
|
glad_glXGetCurrentDisplayEXT = (PFNGLXGETCURRENTDISPLAYEXTPROC)load("glXGetCurrentDisplayEXT");
|
||||||
|
glad_glXQueryContextInfoEXT = (PFNGLXQUERYCONTEXTINFOEXTPROC)load("glXQueryContextInfoEXT");
|
||||||
|
glad_glXGetContextIDEXT = (PFNGLXGETCONTEXTIDEXTPROC)load("glXGetContextIDEXT");
|
||||||
|
glad_glXImportContextEXT = (PFNGLXIMPORTCONTEXTEXTPROC)load("glXImportContextEXT");
|
||||||
|
glad_glXFreeContextEXT = (PFNGLXFREECONTEXTEXTPROC)load("glXFreeContextEXT");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGIX_pbuffer(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGIX_pbuffer) return;
|
||||||
|
glad_glXCreateGLXPbufferSGIX = (PFNGLXCREATEGLXPBUFFERSGIXPROC)load("glXCreateGLXPbufferSGIX");
|
||||||
|
glad_glXDestroyGLXPbufferSGIX = (PFNGLXDESTROYGLXPBUFFERSGIXPROC)load("glXDestroyGLXPbufferSGIX");
|
||||||
|
glad_glXQueryGLXPbufferSGIX = (PFNGLXQUERYGLXPBUFFERSGIXPROC)load("glXQueryGLXPbufferSGIX");
|
||||||
|
glad_glXSelectEventSGIX = (PFNGLXSELECTEVENTSGIXPROC)load("glXSelectEventSGIX");
|
||||||
|
glad_glXGetSelectedEventSGIX = (PFNGLXGETSELECTEDEVENTSGIXPROC)load("glXGetSelectedEventSGIX");
|
||||||
|
}
|
||||||
|
static void load_GLX_NV_swap_group(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_NV_swap_group) return;
|
||||||
|
glad_glXJoinSwapGroupNV = (PFNGLXJOINSWAPGROUPNVPROC)load("glXJoinSwapGroupNV");
|
||||||
|
glad_glXBindSwapBarrierNV = (PFNGLXBINDSWAPBARRIERNVPROC)load("glXBindSwapBarrierNV");
|
||||||
|
glad_glXQuerySwapGroupNV = (PFNGLXQUERYSWAPGROUPNVPROC)load("glXQuerySwapGroupNV");
|
||||||
|
glad_glXQueryMaxSwapGroupsNV = (PFNGLXQUERYMAXSWAPGROUPSNVPROC)load("glXQueryMaxSwapGroupsNV");
|
||||||
|
glad_glXQueryFrameCountNV = (PFNGLXQUERYFRAMECOUNTNVPROC)load("glXQueryFrameCountNV");
|
||||||
|
glad_glXResetFrameCountNV = (PFNGLXRESETFRAMECOUNTNVPROC)load("glXResetFrameCountNV");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGIX_hyperpipe(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGIX_hyperpipe) return;
|
||||||
|
glad_glXQueryHyperpipeNetworkSGIX = (PFNGLXQUERYHYPERPIPENETWORKSGIXPROC)load("glXQueryHyperpipeNetworkSGIX");
|
||||||
|
glad_glXHyperpipeConfigSGIX = (PFNGLXHYPERPIPECONFIGSGIXPROC)load("glXHyperpipeConfigSGIX");
|
||||||
|
glad_glXQueryHyperpipeConfigSGIX = (PFNGLXQUERYHYPERPIPECONFIGSGIXPROC)load("glXQueryHyperpipeConfigSGIX");
|
||||||
|
glad_glXDestroyHyperpipeConfigSGIX = (PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC)load("glXDestroyHyperpipeConfigSGIX");
|
||||||
|
glad_glXBindHyperpipeSGIX = (PFNGLXBINDHYPERPIPESGIXPROC)load("glXBindHyperpipeSGIX");
|
||||||
|
glad_glXQueryHyperpipeBestAttribSGIX = (PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC)load("glXQueryHyperpipeBestAttribSGIX");
|
||||||
|
glad_glXHyperpipeAttribSGIX = (PFNGLXHYPERPIPEATTRIBSGIXPROC)load("glXHyperpipeAttribSGIX");
|
||||||
|
glad_glXQueryHyperpipeAttribSGIX = (PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC)load("glXQueryHyperpipeAttribSGIX");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGIX_video_resize(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGIX_video_resize) return;
|
||||||
|
glad_glXBindChannelToWindowSGIX = (PFNGLXBINDCHANNELTOWINDOWSGIXPROC)load("glXBindChannelToWindowSGIX");
|
||||||
|
glad_glXChannelRectSGIX = (PFNGLXCHANNELRECTSGIXPROC)load("glXChannelRectSGIX");
|
||||||
|
glad_glXQueryChannelRectSGIX = (PFNGLXQUERYCHANNELRECTSGIXPROC)load("glXQueryChannelRectSGIX");
|
||||||
|
glad_glXQueryChannelDeltasSGIX = (PFNGLXQUERYCHANNELDELTASSGIXPROC)load("glXQueryChannelDeltasSGIX");
|
||||||
|
glad_glXChannelRectSyncSGIX = (PFNGLXCHANNELRECTSYNCSGIXPROC)load("glXChannelRectSyncSGIX");
|
||||||
|
}
|
||||||
|
static void load_GLX_NV_copy_image(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_NV_copy_image) return;
|
||||||
|
glad_glXCopyImageSubDataNV = (PFNGLXCOPYIMAGESUBDATANVPROC)load("glXCopyImageSubDataNV");
|
||||||
|
}
|
||||||
|
static void load_GLX_OML_sync_control(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_OML_sync_control) return;
|
||||||
|
glad_glXGetSyncValuesOML = (PFNGLXGETSYNCVALUESOMLPROC)load("glXGetSyncValuesOML");
|
||||||
|
glad_glXGetMscRateOML = (PFNGLXGETMSCRATEOMLPROC)load("glXGetMscRateOML");
|
||||||
|
glad_glXSwapBuffersMscOML = (PFNGLXSWAPBUFFERSMSCOMLPROC)load("glXSwapBuffersMscOML");
|
||||||
|
glad_glXWaitForMscOML = (PFNGLXWAITFORMSCOMLPROC)load("glXWaitForMscOML");
|
||||||
|
glad_glXWaitForSbcOML = (PFNGLXWAITFORSBCOMLPROC)load("glXWaitForSbcOML");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGI_make_current_read(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGI_make_current_read) return;
|
||||||
|
glad_glXMakeCurrentReadSGI = (PFNGLXMAKECURRENTREADSGIPROC)load("glXMakeCurrentReadSGI");
|
||||||
|
glad_glXGetCurrentReadDrawableSGI = (PFNGLXGETCURRENTREADDRAWABLESGIPROC)load("glXGetCurrentReadDrawableSGI");
|
||||||
|
}
|
||||||
|
static void load_GLX_MESA_swap_control(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_MESA_swap_control) return;
|
||||||
|
glad_glXSwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)load("glXSwapIntervalMESA");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGI_swap_control(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGI_swap_control) return;
|
||||||
|
glad_glXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)load("glXSwapIntervalSGI");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGI_video_sync(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGI_video_sync) return;
|
||||||
|
glad_glXGetVideoSyncSGI = (PFNGLXGETVIDEOSYNCSGIPROC)load("glXGetVideoSyncSGI");
|
||||||
|
glad_glXWaitVideoSyncSGI = (PFNGLXWAITVIDEOSYNCSGIPROC)load("glXWaitVideoSyncSGI");
|
||||||
|
}
|
||||||
|
static void load_GLX_MESA_agp_offset(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_MESA_agp_offset) return;
|
||||||
|
glad_glXGetAGPOffsetMESA = (PFNGLXGETAGPOFFSETMESAPROC)load("glXGetAGPOffsetMESA");
|
||||||
|
}
|
||||||
|
static void load_GLX_MESA_set_3dfx_mode(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_MESA_set_3dfx_mode) return;
|
||||||
|
glad_glXSet3DfxModeMESA = (PFNGLXSET3DFXMODEMESAPROC)load("glXSet3DfxModeMESA");
|
||||||
|
}
|
||||||
|
static void load_GLX_EXT_texture_from_pixmap(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_EXT_texture_from_pixmap) return;
|
||||||
|
glad_glXBindTexImageEXT = (PFNGLXBINDTEXIMAGEEXTPROC)load("glXBindTexImageEXT");
|
||||||
|
glad_glXReleaseTexImageEXT = (PFNGLXRELEASETEXIMAGEEXTPROC)load("glXReleaseTexImageEXT");
|
||||||
|
}
|
||||||
|
static void load_GLX_NV_video_capture(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_NV_video_capture) return;
|
||||||
|
glad_glXBindVideoCaptureDeviceNV = (PFNGLXBINDVIDEOCAPTUREDEVICENVPROC)load("glXBindVideoCaptureDeviceNV");
|
||||||
|
glad_glXEnumerateVideoCaptureDevicesNV = (PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC)load("glXEnumerateVideoCaptureDevicesNV");
|
||||||
|
glad_glXLockVideoCaptureDeviceNV = (PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC)load("glXLockVideoCaptureDeviceNV");
|
||||||
|
glad_glXQueryVideoCaptureDeviceNV = (PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC)load("glXQueryVideoCaptureDeviceNV");
|
||||||
|
glad_glXReleaseVideoCaptureDeviceNV = (PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC)load("glXReleaseVideoCaptureDeviceNV");
|
||||||
|
}
|
||||||
|
static void load_GLX_NV_delay_before_swap(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_NV_delay_before_swap) return;
|
||||||
|
glad_glXDelayBeforeSwapNV = (PFNGLXDELAYBEFORESWAPNVPROC)load("glXDelayBeforeSwapNV");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGIX_swap_group(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGIX_swap_group) return;
|
||||||
|
glad_glXJoinSwapGroupSGIX = (PFNGLXJOINSWAPGROUPSGIXPROC)load("glXJoinSwapGroupSGIX");
|
||||||
|
}
|
||||||
|
static void load_GLX_EXT_swap_control(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_EXT_swap_control) return;
|
||||||
|
glad_glXSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)load("glXSwapIntervalEXT");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGIX_video_source(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGIX_video_source) return;
|
||||||
|
#ifdef _VL_H_
|
||||||
|
glad_glXCreateGLXVideoSourceSGIX = (PFNGLXCREATEGLXVIDEOSOURCESGIXPROC)load("glXCreateGLXVideoSourceSGIX");
|
||||||
|
glad_glXDestroyGLXVideoSourceSGIX = (PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC)load("glXDestroyGLXVideoSourceSGIX");
|
||||||
|
#else
|
||||||
|
(void)load;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
static void load_GLX_MESA_query_renderer(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_MESA_query_renderer) return;
|
||||||
|
glad_glXQueryCurrentRendererIntegerMESA = (PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC)load("glXQueryCurrentRendererIntegerMESA");
|
||||||
|
glad_glXQueryCurrentRendererStringMESA = (PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC)load("glXQueryCurrentRendererStringMESA");
|
||||||
|
glad_glXQueryRendererIntegerMESA = (PFNGLXQUERYRENDERERINTEGERMESAPROC)load("glXQueryRendererIntegerMESA");
|
||||||
|
glad_glXQueryRendererStringMESA = (PFNGLXQUERYRENDERERSTRINGMESAPROC)load("glXQueryRendererStringMESA");
|
||||||
|
}
|
||||||
|
static void load_GLX_ARB_create_context(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_ARB_create_context) return;
|
||||||
|
glad_glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)load("glXCreateContextAttribsARB");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGIX_fbconfig(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGIX_fbconfig) return;
|
||||||
|
glad_glXGetFBConfigAttribSGIX = (PFNGLXGETFBCONFIGATTRIBSGIXPROC)load("glXGetFBConfigAttribSGIX");
|
||||||
|
glad_glXChooseFBConfigSGIX = (PFNGLXCHOOSEFBCONFIGSGIXPROC)load("glXChooseFBConfigSGIX");
|
||||||
|
glad_glXCreateGLXPixmapWithConfigSGIX = (PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC)load("glXCreateGLXPixmapWithConfigSGIX");
|
||||||
|
glad_glXCreateContextWithConfigSGIX = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC)load("glXCreateContextWithConfigSGIX");
|
||||||
|
glad_glXGetVisualFromFBConfigSGIX = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC)load("glXGetVisualFromFBConfigSGIX");
|
||||||
|
glad_glXGetFBConfigFromVisualSGIX = (PFNGLXGETFBCONFIGFROMVISUALSGIXPROC)load("glXGetFBConfigFromVisualSGIX");
|
||||||
|
}
|
||||||
|
static void load_GLX_MESA_pixmap_colormap(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_MESA_pixmap_colormap) return;
|
||||||
|
glad_glXCreateGLXPixmapMESA = (PFNGLXCREATEGLXPIXMAPMESAPROC)load("glXCreateGLXPixmapMESA");
|
||||||
|
}
|
||||||
|
static void load_GLX_NV_video_output(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_NV_video_output) return;
|
||||||
|
glad_glXGetVideoDeviceNV = (PFNGLXGETVIDEODEVICENVPROC)load("glXGetVideoDeviceNV");
|
||||||
|
glad_glXReleaseVideoDeviceNV = (PFNGLXRELEASEVIDEODEVICENVPROC)load("glXReleaseVideoDeviceNV");
|
||||||
|
glad_glXBindVideoImageNV = (PFNGLXBINDVIDEOIMAGENVPROC)load("glXBindVideoImageNV");
|
||||||
|
glad_glXReleaseVideoImageNV = (PFNGLXRELEASEVIDEOIMAGENVPROC)load("glXReleaseVideoImageNV");
|
||||||
|
glad_glXSendPbufferToVideoNV = (PFNGLXSENDPBUFFERTOVIDEONVPROC)load("glXSendPbufferToVideoNV");
|
||||||
|
glad_glXGetVideoInfoNV = (PFNGLXGETVIDEOINFONVPROC)load("glXGetVideoInfoNV");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGIX_dmbuffer(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGIX_dmbuffer) return;
|
||||||
|
#ifdef _DM_BUFFER_H_
|
||||||
|
glad_glXAssociateDMPbufferSGIX = (PFNGLXASSOCIATEDMPBUFFERSGIXPROC)load("glXAssociateDMPbufferSGIX");
|
||||||
|
#else
|
||||||
|
(void)load;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
static void load_GLX_SGIX_swap_barrier(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGIX_swap_barrier) return;
|
||||||
|
glad_glXBindSwapBarrierSGIX = (PFNGLXBINDSWAPBARRIERSGIXPROC)load("glXBindSwapBarrierSGIX");
|
||||||
|
glad_glXQueryMaxSwapBarriersSGIX = (PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC)load("glXQueryMaxSwapBarriersSGIX");
|
||||||
|
}
|
||||||
|
static void load_GLX_MESA_release_buffers(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_MESA_release_buffers) return;
|
||||||
|
glad_glXReleaseBuffersMESA = (PFNGLXRELEASEBUFFERSMESAPROC)load("glXReleaseBuffersMESA");
|
||||||
|
}
|
||||||
|
static void load_GLX_MESA_copy_sub_buffer(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_MESA_copy_sub_buffer) return;
|
||||||
|
glad_glXCopySubBufferMESA = (PFNGLXCOPYSUBBUFFERMESAPROC)load("glXCopySubBufferMESA");
|
||||||
|
}
|
||||||
|
static void load_GLX_SGI_cushion(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SGI_cushion) return;
|
||||||
|
glad_glXCushionSGI = (PFNGLXCUSHIONSGIPROC)load("glXCushionSGI");
|
||||||
|
}
|
||||||
|
static void load_GLX_NV_present_video(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_NV_present_video) return;
|
||||||
|
glad_glXEnumerateVideoDevicesNV = (PFNGLXENUMERATEVIDEODEVICESNVPROC)load("glXEnumerateVideoDevicesNV");
|
||||||
|
glad_glXBindVideoDeviceNV = (PFNGLXBINDVIDEODEVICENVPROC)load("glXBindVideoDeviceNV");
|
||||||
|
}
|
||||||
|
static void load_GLX_SUN_get_transparent_index(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_SUN_get_transparent_index) return;
|
||||||
|
glad_glXGetTransparentIndexSUN = (PFNGLXGETTRANSPARENTINDEXSUNPROC)load("glXGetTransparentIndexSUN");
|
||||||
|
}
|
||||||
|
static void load_GLX_ARB_get_proc_address(GLADloadproc load) {
|
||||||
|
if(!GLAD_GLX_ARB_get_proc_address) return;
|
||||||
|
glad_glXGetProcAddressARB = (PFNGLXGETPROCADDRESSARBPROC)load("glXGetProcAddressARB");
|
||||||
|
}
|
||||||
|
static void find_extensionsGLX(void) {
|
||||||
|
GLAD_GLX_ARB_framebuffer_sRGB = has_ext("GLX_ARB_framebuffer_sRGB");
|
||||||
|
GLAD_GLX_EXT_import_context = has_ext("GLX_EXT_import_context");
|
||||||
|
GLAD_GLX_NV_multisample_coverage = has_ext("GLX_NV_multisample_coverage");
|
||||||
|
GLAD_GLX_SGIS_shared_multisample = has_ext("GLX_SGIS_shared_multisample");
|
||||||
|
GLAD_GLX_SGIX_pbuffer = has_ext("GLX_SGIX_pbuffer");
|
||||||
|
GLAD_GLX_NV_swap_group = has_ext("GLX_NV_swap_group");
|
||||||
|
GLAD_GLX_ARB_fbconfig_float = has_ext("GLX_ARB_fbconfig_float");
|
||||||
|
GLAD_GLX_SGIX_hyperpipe = has_ext("GLX_SGIX_hyperpipe");
|
||||||
|
GLAD_GLX_ARB_robustness_share_group_isolation = has_ext("GLX_ARB_robustness_share_group_isolation");
|
||||||
|
GLAD_GLX_INTEL_swap_event = has_ext("GLX_INTEL_swap_event");
|
||||||
|
GLAD_GLX_SGIX_video_resize = has_ext("GLX_SGIX_video_resize");
|
||||||
|
GLAD_GLX_EXT_create_context_es2_profile = has_ext("GLX_EXT_create_context_es2_profile");
|
||||||
|
GLAD_GLX_ARB_robustness_application_isolation = has_ext("GLX_ARB_robustness_application_isolation");
|
||||||
|
GLAD_GLX_NV_copy_image = has_ext("GLX_NV_copy_image");
|
||||||
|
GLAD_GLX_OML_sync_control = has_ext("GLX_OML_sync_control");
|
||||||
|
GLAD_GLX_EXT_framebuffer_sRGB = has_ext("GLX_EXT_framebuffer_sRGB");
|
||||||
|
GLAD_GLX_SGI_make_current_read = has_ext("GLX_SGI_make_current_read");
|
||||||
|
GLAD_GLX_MESA_swap_control = has_ext("GLX_MESA_swap_control");
|
||||||
|
GLAD_GLX_SGI_swap_control = has_ext("GLX_SGI_swap_control");
|
||||||
|
GLAD_GLX_EXT_fbconfig_packed_float = has_ext("GLX_EXT_fbconfig_packed_float");
|
||||||
|
GLAD_GLX_EXT_buffer_age = has_ext("GLX_EXT_buffer_age");
|
||||||
|
GLAD_GLX_3DFX_multisample = has_ext("GLX_3DFX_multisample");
|
||||||
|
GLAD_GLX_EXT_visual_info = has_ext("GLX_EXT_visual_info");
|
||||||
|
GLAD_GLX_SGI_video_sync = has_ext("GLX_SGI_video_sync");
|
||||||
|
GLAD_GLX_MESA_agp_offset = has_ext("GLX_MESA_agp_offset");
|
||||||
|
GLAD_GLX_SGIS_multisample = has_ext("GLX_SGIS_multisample");
|
||||||
|
GLAD_GLX_MESA_set_3dfx_mode = has_ext("GLX_MESA_set_3dfx_mode");
|
||||||
|
GLAD_GLX_EXT_texture_from_pixmap = has_ext("GLX_EXT_texture_from_pixmap");
|
||||||
|
GLAD_GLX_NV_video_capture = has_ext("GLX_NV_video_capture");
|
||||||
|
GLAD_GLX_ARB_multisample = has_ext("GLX_ARB_multisample");
|
||||||
|
GLAD_GLX_NV_delay_before_swap = has_ext("GLX_NV_delay_before_swap");
|
||||||
|
GLAD_GLX_SGIX_swap_group = has_ext("GLX_SGIX_swap_group");
|
||||||
|
GLAD_GLX_EXT_swap_control = has_ext("GLX_EXT_swap_control");
|
||||||
|
GLAD_GLX_SGIX_video_source = has_ext("GLX_SGIX_video_source");
|
||||||
|
GLAD_GLX_MESA_query_renderer = has_ext("GLX_MESA_query_renderer");
|
||||||
|
GLAD_GLX_ARB_create_context = has_ext("GLX_ARB_create_context");
|
||||||
|
GLAD_GLX_EXT_create_context_es_profile = has_ext("GLX_EXT_create_context_es_profile");
|
||||||
|
GLAD_GLX_SGIX_fbconfig = has_ext("GLX_SGIX_fbconfig");
|
||||||
|
GLAD_GLX_MESA_pixmap_colormap = has_ext("GLX_MESA_pixmap_colormap");
|
||||||
|
GLAD_GLX_SGIX_visual_select_group = has_ext("GLX_SGIX_visual_select_group");
|
||||||
|
GLAD_GLX_NV_video_output = has_ext("GLX_NV_video_output");
|
||||||
|
GLAD_GLX_SGIS_blended_overlay = has_ext("GLX_SGIS_blended_overlay");
|
||||||
|
GLAD_GLX_SGIX_dmbuffer = has_ext("GLX_SGIX_dmbuffer");
|
||||||
|
GLAD_GLX_ARB_create_context_robustness = has_ext("GLX_ARB_create_context_robustness");
|
||||||
|
GLAD_GLX_SGIX_swap_barrier = has_ext("GLX_SGIX_swap_barrier");
|
||||||
|
GLAD_GLX_EXT_swap_control_tear = has_ext("GLX_EXT_swap_control_tear");
|
||||||
|
GLAD_GLX_MESA_release_buffers = has_ext("GLX_MESA_release_buffers");
|
||||||
|
GLAD_GLX_EXT_visual_rating = has_ext("GLX_EXT_visual_rating");
|
||||||
|
GLAD_GLX_MESA_copy_sub_buffer = has_ext("GLX_MESA_copy_sub_buffer");
|
||||||
|
GLAD_GLX_SGI_cushion = has_ext("GLX_SGI_cushion");
|
||||||
|
GLAD_GLX_NV_float_buffer = has_ext("GLX_NV_float_buffer");
|
||||||
|
GLAD_GLX_OML_swap_method = has_ext("GLX_OML_swap_method");
|
||||||
|
GLAD_GLX_NV_present_video = has_ext("GLX_NV_present_video");
|
||||||
|
GLAD_GLX_SUN_get_transparent_index = has_ext("GLX_SUN_get_transparent_index");
|
||||||
|
GLAD_GLX_AMD_gpu_association = has_ext("GLX_AMD_gpu_association");
|
||||||
|
GLAD_GLX_ARB_create_context_profile = has_ext("GLX_ARB_create_context_profile");
|
||||||
|
GLAD_GLX_ARB_get_proc_address = has_ext("GLX_ARB_get_proc_address");
|
||||||
|
GLAD_GLX_ARB_vertex_buffer_object = has_ext("GLX_ARB_vertex_buffer_object");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void find_coreGLX(Display *dpy, int screen) {
|
||||||
|
int major = 0, minor = 0;
|
||||||
|
if(dpy == 0 && GLADGLXDisplay == 0) {
|
||||||
|
dpy = XOpenDisplay(0);
|
||||||
|
screen = XScreenNumberOfScreen(XDefaultScreenOfDisplay(dpy));
|
||||||
|
} else if(dpy == 0) {
|
||||||
|
dpy = GLADGLXDisplay;
|
||||||
|
screen = GLADGLXscreen;
|
||||||
|
}
|
||||||
|
glXQueryVersion(dpy, &major, &minor);
|
||||||
|
GLADGLXDisplay = dpy;
|
||||||
|
GLADGLXscreen = screen;
|
||||||
|
GLAD_GLX_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
|
||||||
|
GLAD_GLX_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
|
||||||
|
GLAD_GLX_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1;
|
||||||
|
GLAD_GLX_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1;
|
||||||
|
GLAD_GLX_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void gladLoadGLXLoader(GLADloadproc load, Display *dpy, int screen) {
|
||||||
|
glXQueryVersion = (PFNGLXQUERYVERSIONPROC)load("glXQueryVersion");
|
||||||
|
if(glXQueryVersion == NULL) return;
|
||||||
|
find_coreGLX(dpy, screen);
|
||||||
|
load_GLX_VERSION_1_0(load);
|
||||||
|
load_GLX_VERSION_1_1(load);
|
||||||
|
load_GLX_VERSION_1_2(load);
|
||||||
|
load_GLX_VERSION_1_3(load);
|
||||||
|
load_GLX_VERSION_1_4(load);
|
||||||
|
|
||||||
|
find_extensionsGLX();
|
||||||
|
load_GLX_EXT_import_context(load);
|
||||||
|
load_GLX_SGIX_pbuffer(load);
|
||||||
|
load_GLX_NV_swap_group(load);
|
||||||
|
load_GLX_SGIX_hyperpipe(load);
|
||||||
|
load_GLX_SGIX_video_resize(load);
|
||||||
|
load_GLX_NV_copy_image(load);
|
||||||
|
load_GLX_OML_sync_control(load);
|
||||||
|
load_GLX_SGI_make_current_read(load);
|
||||||
|
load_GLX_MESA_swap_control(load);
|
||||||
|
load_GLX_SGI_swap_control(load);
|
||||||
|
load_GLX_SGI_video_sync(load);
|
||||||
|
load_GLX_MESA_agp_offset(load);
|
||||||
|
load_GLX_MESA_set_3dfx_mode(load);
|
||||||
|
load_GLX_EXT_texture_from_pixmap(load);
|
||||||
|
load_GLX_NV_video_capture(load);
|
||||||
|
load_GLX_NV_delay_before_swap(load);
|
||||||
|
load_GLX_SGIX_swap_group(load);
|
||||||
|
load_GLX_EXT_swap_control(load);
|
||||||
|
load_GLX_SGIX_video_source(load);
|
||||||
|
load_GLX_MESA_query_renderer(load);
|
||||||
|
load_GLX_ARB_create_context(load);
|
||||||
|
load_GLX_SGIX_fbconfig(load);
|
||||||
|
load_GLX_MESA_pixmap_colormap(load);
|
||||||
|
load_GLX_NV_video_output(load);
|
||||||
|
load_GLX_SGIX_dmbuffer(load);
|
||||||
|
load_GLX_SGIX_swap_barrier(load);
|
||||||
|
load_GLX_MESA_release_buffers(load);
|
||||||
|
load_GLX_MESA_copy_sub_buffer(load);
|
||||||
|
load_GLX_SGI_cushion(load);
|
||||||
|
load_GLX_NV_present_video(load);
|
||||||
|
load_GLX_SUN_get_transparent_index(load);
|
||||||
|
load_GLX_ARB_get_proc_address(load);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
632
deps/glad/src/glad_wgl.c
vendored
Normal file
632
deps/glad/src/glad_wgl.c
vendored
Normal file
|
@ -0,0 +1,632 @@
|
||||||
|
#include <string.h>
|
||||||
|
#include <glad/glad_wgl.h>
|
||||||
|
|
||||||
|
static void* get_proc(const char *namez);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
static HMODULE libGL;
|
||||||
|
|
||||||
|
typedef void* (APIENTRYP PFNWGLGETPROCADDRESSPROC_PRIVATE)(const char*);
|
||||||
|
PFNWGLGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
|
||||||
|
|
||||||
|
static
|
||||||
|
int open_gl(void) {
|
||||||
|
libGL = LoadLibraryA("opengl32.dll");
|
||||||
|
if(libGL != NULL) {
|
||||||
|
gladGetProcAddressPtr = (PFNWGLGETPROCADDRESSPROC_PRIVATE)GetProcAddress(
|
||||||
|
libGL, "wglGetProcAddress");
|
||||||
|
return gladGetProcAddressPtr != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void close_gl(void) {
|
||||||
|
if(libGL != NULL) {
|
||||||
|
FreeLibrary(libGL);
|
||||||
|
libGL = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#include <dlfcn.h>
|
||||||
|
static void* libGL;
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
|
typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
|
||||||
|
PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static
|
||||||
|
int open_gl(void) {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
static const char *NAMES[] = {
|
||||||
|
"../Frameworks/OpenGL.framework/OpenGL",
|
||||||
|
"/Library/Frameworks/OpenGL.framework/OpenGL",
|
||||||
|
"/System/Library/Frameworks/OpenGL.framework/OpenGL",
|
||||||
|
"/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL"
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
static const char *NAMES[] = {"libGL.so.1", "libGL.so"};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
unsigned int index = 0;
|
||||||
|
for(index = 0; index < (sizeof(NAMES) / sizeof(NAMES[0])); index++) {
|
||||||
|
libGL = dlopen(NAMES[index], RTLD_NOW | RTLD_GLOBAL);
|
||||||
|
|
||||||
|
if(libGL != NULL) {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
|
gladGetProcAddressPtr = (PFNGLXGETPROCADDRESSPROC_PRIVATE)dlsym(libGL,
|
||||||
|
"glXGetProcAddressARB");
|
||||||
|
return gladGetProcAddressPtr != NULL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void close_gl() {
|
||||||
|
if(libGL != NULL) {
|
||||||
|
dlclose(libGL);
|
||||||
|
libGL = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static
|
||||||
|
void* get_proc(const char *namez) {
|
||||||
|
void* result = NULL;
|
||||||
|
if(libGL == NULL) return NULL;
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
|
if(gladGetProcAddressPtr != NULL) {
|
||||||
|
result = gladGetProcAddressPtr(namez);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if(result == NULL) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
result = (void*)GetProcAddress(libGL, namez);
|
||||||
|
#else
|
||||||
|
result = dlsym(libGL, namez);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
int gladLoadWGL(HDC hdc) {
|
||||||
|
if(open_gl()) {
|
||||||
|
gladLoadWGLLoader((GLADloadproc)get_proc, hdc);
|
||||||
|
close_gl();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HDC GLADWGLhdc = INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
|
static int has_ext(const char *ext) {
|
||||||
|
const char *terminator;
|
||||||
|
const char *loc;
|
||||||
|
const char *extensions;
|
||||||
|
|
||||||
|
if(wglGetExtensionsStringEXT == NULL && wglGetExtensionsStringARB == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if(wglGetExtensionsStringARB == NULL || GLADWGLhdc == INVALID_HANDLE_VALUE)
|
||||||
|
extensions = wglGetExtensionsStringEXT();
|
||||||
|
else
|
||||||
|
extensions = wglGetExtensionsStringARB(GLADWGLhdc);
|
||||||
|
|
||||||
|
if(extensions == NULL || ext == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
while(1) {
|
||||||
|
loc = strstr(extensions, ext);
|
||||||
|
if(loc == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
|
terminator = loc + strlen(ext);
|
||||||
|
if((loc == extensions || *(loc - 1) == ' ') &&
|
||||||
|
(*terminator == ' ' || *terminator == '\0'))
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
extensions = terminator;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int GLAD_WGL_VERSION_1_0;
|
||||||
|
int GLAD_WGL_NV_multisample_coverage;
|
||||||
|
int GLAD_WGL_I3D_image_buffer;
|
||||||
|
int GLAD_WGL_I3D_swap_frame_usage;
|
||||||
|
int GLAD_WGL_NV_DX_interop2;
|
||||||
|
int GLAD_WGL_NV_float_buffer;
|
||||||
|
int GLAD_WGL_NV_delay_before_swap;
|
||||||
|
int GLAD_WGL_OML_sync_control;
|
||||||
|
int GLAD_WGL_ARB_pixel_format_float;
|
||||||
|
int GLAD_WGL_ARB_create_context;
|
||||||
|
int GLAD_WGL_NV_swap_group;
|
||||||
|
int GLAD_WGL_NV_gpu_affinity;
|
||||||
|
int GLAD_WGL_EXT_pixel_format;
|
||||||
|
int GLAD_WGL_ARB_extensions_string;
|
||||||
|
int GLAD_WGL_NV_video_capture;
|
||||||
|
int GLAD_WGL_NV_render_texture_rectangle;
|
||||||
|
int GLAD_WGL_EXT_create_context_es_profile;
|
||||||
|
int GLAD_WGL_ARB_robustness_share_group_isolation;
|
||||||
|
int GLAD_WGL_ARB_render_texture;
|
||||||
|
int GLAD_WGL_EXT_depth_float;
|
||||||
|
int GLAD_WGL_EXT_swap_control_tear;
|
||||||
|
int GLAD_WGL_ARB_pixel_format;
|
||||||
|
int GLAD_WGL_ARB_multisample;
|
||||||
|
int GLAD_WGL_I3D_genlock;
|
||||||
|
int GLAD_WGL_NV_DX_interop;
|
||||||
|
int GLAD_WGL_3DL_stereo_control;
|
||||||
|
int GLAD_WGL_EXT_pbuffer;
|
||||||
|
int GLAD_WGL_EXT_display_color_table;
|
||||||
|
int GLAD_WGL_NV_video_output;
|
||||||
|
int GLAD_WGL_ARB_robustness_application_isolation;
|
||||||
|
int GLAD_WGL_3DFX_multisample;
|
||||||
|
int GLAD_WGL_I3D_gamma;
|
||||||
|
int GLAD_WGL_ARB_framebuffer_sRGB;
|
||||||
|
int GLAD_WGL_NV_copy_image;
|
||||||
|
int GLAD_WGL_EXT_framebuffer_sRGB;
|
||||||
|
int GLAD_WGL_NV_present_video;
|
||||||
|
int GLAD_WGL_EXT_create_context_es2_profile;
|
||||||
|
int GLAD_WGL_ARB_create_context_robustness;
|
||||||
|
int GLAD_WGL_ARB_make_current_read;
|
||||||
|
int GLAD_WGL_EXT_multisample;
|
||||||
|
int GLAD_WGL_EXT_extensions_string;
|
||||||
|
int GLAD_WGL_NV_render_depth_texture;
|
||||||
|
int GLAD_WGL_ATI_pixel_format_float;
|
||||||
|
int GLAD_WGL_ARB_create_context_profile;
|
||||||
|
int GLAD_WGL_EXT_swap_control;
|
||||||
|
int GLAD_WGL_I3D_digital_video_control;
|
||||||
|
int GLAD_WGL_ARB_pbuffer;
|
||||||
|
int GLAD_WGL_NV_vertex_array_range;
|
||||||
|
int GLAD_WGL_AMD_gpu_association;
|
||||||
|
int GLAD_WGL_EXT_pixel_format_packed_float;
|
||||||
|
int GLAD_WGL_EXT_make_current_read;
|
||||||
|
int GLAD_WGL_I3D_swap_frame_lock;
|
||||||
|
int GLAD_WGL_ARB_buffer_region;
|
||||||
|
PFNWGLCREATEIMAGEBUFFERI3DPROC glad_wglCreateImageBufferI3D;
|
||||||
|
PFNWGLDESTROYIMAGEBUFFERI3DPROC glad_wglDestroyImageBufferI3D;
|
||||||
|
PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC glad_wglAssociateImageBufferEventsI3D;
|
||||||
|
PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC glad_wglReleaseImageBufferEventsI3D;
|
||||||
|
PFNWGLGETFRAMEUSAGEI3DPROC glad_wglGetFrameUsageI3D;
|
||||||
|
PFNWGLBEGINFRAMETRACKINGI3DPROC glad_wglBeginFrameTrackingI3D;
|
||||||
|
PFNWGLENDFRAMETRACKINGI3DPROC glad_wglEndFrameTrackingI3D;
|
||||||
|
PFNWGLQUERYFRAMETRACKINGI3DPROC glad_wglQueryFrameTrackingI3D;
|
||||||
|
PFNWGLDELAYBEFORESWAPNVPROC glad_wglDelayBeforeSwapNV;
|
||||||
|
PFNWGLGETSYNCVALUESOMLPROC glad_wglGetSyncValuesOML;
|
||||||
|
PFNWGLGETMSCRATEOMLPROC glad_wglGetMscRateOML;
|
||||||
|
PFNWGLSWAPBUFFERSMSCOMLPROC glad_wglSwapBuffersMscOML;
|
||||||
|
PFNWGLSWAPLAYERBUFFERSMSCOMLPROC glad_wglSwapLayerBuffersMscOML;
|
||||||
|
PFNWGLWAITFORMSCOMLPROC glad_wglWaitForMscOML;
|
||||||
|
PFNWGLWAITFORSBCOMLPROC glad_wglWaitForSbcOML;
|
||||||
|
PFNWGLCREATECONTEXTATTRIBSARBPROC glad_wglCreateContextAttribsARB;
|
||||||
|
PFNWGLJOINSWAPGROUPNVPROC glad_wglJoinSwapGroupNV;
|
||||||
|
PFNWGLBINDSWAPBARRIERNVPROC glad_wglBindSwapBarrierNV;
|
||||||
|
PFNWGLQUERYSWAPGROUPNVPROC glad_wglQuerySwapGroupNV;
|
||||||
|
PFNWGLQUERYMAXSWAPGROUPSNVPROC glad_wglQueryMaxSwapGroupsNV;
|
||||||
|
PFNWGLQUERYFRAMECOUNTNVPROC glad_wglQueryFrameCountNV;
|
||||||
|
PFNWGLRESETFRAMECOUNTNVPROC glad_wglResetFrameCountNV;
|
||||||
|
PFNWGLENUMGPUSNVPROC glad_wglEnumGpusNV;
|
||||||
|
PFNWGLENUMGPUDEVICESNVPROC glad_wglEnumGpuDevicesNV;
|
||||||
|
PFNWGLCREATEAFFINITYDCNVPROC glad_wglCreateAffinityDCNV;
|
||||||
|
PFNWGLENUMGPUSFROMAFFINITYDCNVPROC glad_wglEnumGpusFromAffinityDCNV;
|
||||||
|
PFNWGLDELETEDCNVPROC glad_wglDeleteDCNV;
|
||||||
|
PFNWGLGETPIXELFORMATATTRIBIVEXTPROC glad_wglGetPixelFormatAttribivEXT;
|
||||||
|
PFNWGLGETPIXELFORMATATTRIBFVEXTPROC glad_wglGetPixelFormatAttribfvEXT;
|
||||||
|
PFNWGLCHOOSEPIXELFORMATEXTPROC glad_wglChoosePixelFormatEXT;
|
||||||
|
PFNWGLGETEXTENSIONSSTRINGARBPROC glad_wglGetExtensionsStringARB;
|
||||||
|
PFNWGLBINDVIDEOCAPTUREDEVICENVPROC glad_wglBindVideoCaptureDeviceNV;
|
||||||
|
PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC glad_wglEnumerateVideoCaptureDevicesNV;
|
||||||
|
PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC glad_wglLockVideoCaptureDeviceNV;
|
||||||
|
PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC glad_wglQueryVideoCaptureDeviceNV;
|
||||||
|
PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC glad_wglReleaseVideoCaptureDeviceNV;
|
||||||
|
PFNWGLBINDTEXIMAGEARBPROC glad_wglBindTexImageARB;
|
||||||
|
PFNWGLRELEASETEXIMAGEARBPROC glad_wglReleaseTexImageARB;
|
||||||
|
PFNWGLSETPBUFFERATTRIBARBPROC glad_wglSetPbufferAttribARB;
|
||||||
|
PFNWGLGETPIXELFORMATATTRIBIVARBPROC glad_wglGetPixelFormatAttribivARB;
|
||||||
|
PFNWGLGETPIXELFORMATATTRIBFVARBPROC glad_wglGetPixelFormatAttribfvARB;
|
||||||
|
PFNWGLCHOOSEPIXELFORMATARBPROC glad_wglChoosePixelFormatARB;
|
||||||
|
PFNWGLENABLEGENLOCKI3DPROC glad_wglEnableGenlockI3D;
|
||||||
|
PFNWGLDISABLEGENLOCKI3DPROC glad_wglDisableGenlockI3D;
|
||||||
|
PFNWGLISENABLEDGENLOCKI3DPROC glad_wglIsEnabledGenlockI3D;
|
||||||
|
PFNWGLGENLOCKSOURCEI3DPROC glad_wglGenlockSourceI3D;
|
||||||
|
PFNWGLGETGENLOCKSOURCEI3DPROC glad_wglGetGenlockSourceI3D;
|
||||||
|
PFNWGLGENLOCKSOURCEEDGEI3DPROC glad_wglGenlockSourceEdgeI3D;
|
||||||
|
PFNWGLGETGENLOCKSOURCEEDGEI3DPROC glad_wglGetGenlockSourceEdgeI3D;
|
||||||
|
PFNWGLGENLOCKSAMPLERATEI3DPROC glad_wglGenlockSampleRateI3D;
|
||||||
|
PFNWGLGETGENLOCKSAMPLERATEI3DPROC glad_wglGetGenlockSampleRateI3D;
|
||||||
|
PFNWGLGENLOCKSOURCEDELAYI3DPROC glad_wglGenlockSourceDelayI3D;
|
||||||
|
PFNWGLGETGENLOCKSOURCEDELAYI3DPROC glad_wglGetGenlockSourceDelayI3D;
|
||||||
|
PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC glad_wglQueryGenlockMaxSourceDelayI3D;
|
||||||
|
PFNWGLDXSETRESOURCESHAREHANDLENVPROC glad_wglDXSetResourceShareHandleNV;
|
||||||
|
PFNWGLDXOPENDEVICENVPROC glad_wglDXOpenDeviceNV;
|
||||||
|
PFNWGLDXCLOSEDEVICENVPROC glad_wglDXCloseDeviceNV;
|
||||||
|
PFNWGLDXREGISTEROBJECTNVPROC glad_wglDXRegisterObjectNV;
|
||||||
|
PFNWGLDXUNREGISTEROBJECTNVPROC glad_wglDXUnregisterObjectNV;
|
||||||
|
PFNWGLDXOBJECTACCESSNVPROC glad_wglDXObjectAccessNV;
|
||||||
|
PFNWGLDXLOCKOBJECTSNVPROC glad_wglDXLockObjectsNV;
|
||||||
|
PFNWGLDXUNLOCKOBJECTSNVPROC glad_wglDXUnlockObjectsNV;
|
||||||
|
PFNWGLSETSTEREOEMITTERSTATE3DLPROC glad_wglSetStereoEmitterState3DL;
|
||||||
|
PFNWGLCREATEPBUFFEREXTPROC glad_wglCreatePbufferEXT;
|
||||||
|
PFNWGLGETPBUFFERDCEXTPROC glad_wglGetPbufferDCEXT;
|
||||||
|
PFNWGLRELEASEPBUFFERDCEXTPROC glad_wglReleasePbufferDCEXT;
|
||||||
|
PFNWGLDESTROYPBUFFEREXTPROC glad_wglDestroyPbufferEXT;
|
||||||
|
PFNWGLQUERYPBUFFEREXTPROC glad_wglQueryPbufferEXT;
|
||||||
|
PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC glad_wglCreateDisplayColorTableEXT;
|
||||||
|
PFNWGLLOADDISPLAYCOLORTABLEEXTPROC glad_wglLoadDisplayColorTableEXT;
|
||||||
|
PFNWGLBINDDISPLAYCOLORTABLEEXTPROC glad_wglBindDisplayColorTableEXT;
|
||||||
|
PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC glad_wglDestroyDisplayColorTableEXT;
|
||||||
|
PFNWGLGETVIDEODEVICENVPROC glad_wglGetVideoDeviceNV;
|
||||||
|
PFNWGLRELEASEVIDEODEVICENVPROC glad_wglReleaseVideoDeviceNV;
|
||||||
|
PFNWGLBINDVIDEOIMAGENVPROC glad_wglBindVideoImageNV;
|
||||||
|
PFNWGLRELEASEVIDEOIMAGENVPROC glad_wglReleaseVideoImageNV;
|
||||||
|
PFNWGLSENDPBUFFERTOVIDEONVPROC glad_wglSendPbufferToVideoNV;
|
||||||
|
PFNWGLGETVIDEOINFONVPROC glad_wglGetVideoInfoNV;
|
||||||
|
PFNWGLGETGAMMATABLEPARAMETERSI3DPROC glad_wglGetGammaTableParametersI3D;
|
||||||
|
PFNWGLSETGAMMATABLEPARAMETERSI3DPROC glad_wglSetGammaTableParametersI3D;
|
||||||
|
PFNWGLGETGAMMATABLEI3DPROC glad_wglGetGammaTableI3D;
|
||||||
|
PFNWGLSETGAMMATABLEI3DPROC glad_wglSetGammaTableI3D;
|
||||||
|
PFNWGLCOPYIMAGESUBDATANVPROC glad_wglCopyImageSubDataNV;
|
||||||
|
PFNWGLENUMERATEVIDEODEVICESNVPROC glad_wglEnumerateVideoDevicesNV;
|
||||||
|
PFNWGLBINDVIDEODEVICENVPROC glad_wglBindVideoDeviceNV;
|
||||||
|
PFNWGLQUERYCURRENTCONTEXTNVPROC glad_wglQueryCurrentContextNV;
|
||||||
|
PFNWGLMAKECONTEXTCURRENTARBPROC glad_wglMakeContextCurrentARB;
|
||||||
|
PFNWGLGETCURRENTREADDCARBPROC glad_wglGetCurrentReadDCARB;
|
||||||
|
PFNWGLGETEXTENSIONSSTRINGEXTPROC glad_wglGetExtensionsStringEXT;
|
||||||
|
PFNWGLSWAPINTERVALEXTPROC glad_wglSwapIntervalEXT;
|
||||||
|
PFNWGLGETSWAPINTERVALEXTPROC glad_wglGetSwapIntervalEXT;
|
||||||
|
PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC glad_wglGetDigitalVideoParametersI3D;
|
||||||
|
PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC glad_wglSetDigitalVideoParametersI3D;
|
||||||
|
PFNWGLCREATEPBUFFERARBPROC glad_wglCreatePbufferARB;
|
||||||
|
PFNWGLGETPBUFFERDCARBPROC glad_wglGetPbufferDCARB;
|
||||||
|
PFNWGLRELEASEPBUFFERDCARBPROC glad_wglReleasePbufferDCARB;
|
||||||
|
PFNWGLDESTROYPBUFFERARBPROC glad_wglDestroyPbufferARB;
|
||||||
|
PFNWGLQUERYPBUFFERARBPROC glad_wglQueryPbufferARB;
|
||||||
|
PFNWGLALLOCATEMEMORYNVPROC glad_wglAllocateMemoryNV;
|
||||||
|
PFNWGLFREEMEMORYNVPROC glad_wglFreeMemoryNV;
|
||||||
|
PFNWGLGETGPUIDSAMDPROC glad_wglGetGPUIDsAMD;
|
||||||
|
PFNWGLGETGPUINFOAMDPROC glad_wglGetGPUInfoAMD;
|
||||||
|
PFNWGLGETCONTEXTGPUIDAMDPROC glad_wglGetContextGPUIDAMD;
|
||||||
|
PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC glad_wglCreateAssociatedContextAMD;
|
||||||
|
PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC glad_wglCreateAssociatedContextAttribsAMD;
|
||||||
|
PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC glad_wglDeleteAssociatedContextAMD;
|
||||||
|
PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC glad_wglMakeAssociatedContextCurrentAMD;
|
||||||
|
PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC glad_wglGetCurrentAssociatedContextAMD;
|
||||||
|
PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC glad_wglBlitContextFramebufferAMD;
|
||||||
|
PFNWGLMAKECONTEXTCURRENTEXTPROC glad_wglMakeContextCurrentEXT;
|
||||||
|
PFNWGLGETCURRENTREADDCEXTPROC glad_wglGetCurrentReadDCEXT;
|
||||||
|
PFNWGLENABLEFRAMELOCKI3DPROC glad_wglEnableFrameLockI3D;
|
||||||
|
PFNWGLDISABLEFRAMELOCKI3DPROC glad_wglDisableFrameLockI3D;
|
||||||
|
PFNWGLISENABLEDFRAMELOCKI3DPROC glad_wglIsEnabledFrameLockI3D;
|
||||||
|
PFNWGLQUERYFRAMELOCKMASTERI3DPROC glad_wglQueryFrameLockMasterI3D;
|
||||||
|
PFNWGLCREATEBUFFERREGIONARBPROC glad_wglCreateBufferRegionARB;
|
||||||
|
PFNWGLDELETEBUFFERREGIONARBPROC glad_wglDeleteBufferRegionARB;
|
||||||
|
PFNWGLSAVEBUFFERREGIONARBPROC glad_wglSaveBufferRegionARB;
|
||||||
|
PFNWGLRESTOREBUFFERREGIONARBPROC glad_wglRestoreBufferRegionARB;
|
||||||
|
static void load_WGL_I3D_image_buffer(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_I3D_image_buffer) return;
|
||||||
|
glad_wglCreateImageBufferI3D = (PFNWGLCREATEIMAGEBUFFERI3DPROC)load("wglCreateImageBufferI3D");
|
||||||
|
glad_wglDestroyImageBufferI3D = (PFNWGLDESTROYIMAGEBUFFERI3DPROC)load("wglDestroyImageBufferI3D");
|
||||||
|
glad_wglAssociateImageBufferEventsI3D = (PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC)load("wglAssociateImageBufferEventsI3D");
|
||||||
|
glad_wglReleaseImageBufferEventsI3D = (PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC)load("wglReleaseImageBufferEventsI3D");
|
||||||
|
}
|
||||||
|
static void load_WGL_I3D_swap_frame_usage(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_I3D_swap_frame_usage) return;
|
||||||
|
glad_wglGetFrameUsageI3D = (PFNWGLGETFRAMEUSAGEI3DPROC)load("wglGetFrameUsageI3D");
|
||||||
|
glad_wglBeginFrameTrackingI3D = (PFNWGLBEGINFRAMETRACKINGI3DPROC)load("wglBeginFrameTrackingI3D");
|
||||||
|
glad_wglEndFrameTrackingI3D = (PFNWGLENDFRAMETRACKINGI3DPROC)load("wglEndFrameTrackingI3D");
|
||||||
|
glad_wglQueryFrameTrackingI3D = (PFNWGLQUERYFRAMETRACKINGI3DPROC)load("wglQueryFrameTrackingI3D");
|
||||||
|
}
|
||||||
|
static void load_WGL_NV_delay_before_swap(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_NV_delay_before_swap) return;
|
||||||
|
glad_wglDelayBeforeSwapNV = (PFNWGLDELAYBEFORESWAPNVPROC)load("wglDelayBeforeSwapNV");
|
||||||
|
}
|
||||||
|
static void load_WGL_OML_sync_control(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_OML_sync_control) return;
|
||||||
|
glad_wglGetSyncValuesOML = (PFNWGLGETSYNCVALUESOMLPROC)load("wglGetSyncValuesOML");
|
||||||
|
glad_wglGetMscRateOML = (PFNWGLGETMSCRATEOMLPROC)load("wglGetMscRateOML");
|
||||||
|
glad_wglSwapBuffersMscOML = (PFNWGLSWAPBUFFERSMSCOMLPROC)load("wglSwapBuffersMscOML");
|
||||||
|
glad_wglSwapLayerBuffersMscOML = (PFNWGLSWAPLAYERBUFFERSMSCOMLPROC)load("wglSwapLayerBuffersMscOML");
|
||||||
|
glad_wglWaitForMscOML = (PFNWGLWAITFORMSCOMLPROC)load("wglWaitForMscOML");
|
||||||
|
glad_wglWaitForSbcOML = (PFNWGLWAITFORSBCOMLPROC)load("wglWaitForSbcOML");
|
||||||
|
}
|
||||||
|
static void load_WGL_ARB_create_context(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_ARB_create_context) return;
|
||||||
|
glad_wglCreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)load("wglCreateContextAttribsARB");
|
||||||
|
}
|
||||||
|
static void load_WGL_NV_swap_group(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_NV_swap_group) return;
|
||||||
|
glad_wglJoinSwapGroupNV = (PFNWGLJOINSWAPGROUPNVPROC)load("wglJoinSwapGroupNV");
|
||||||
|
glad_wglBindSwapBarrierNV = (PFNWGLBINDSWAPBARRIERNVPROC)load("wglBindSwapBarrierNV");
|
||||||
|
glad_wglQuerySwapGroupNV = (PFNWGLQUERYSWAPGROUPNVPROC)load("wglQuerySwapGroupNV");
|
||||||
|
glad_wglQueryMaxSwapGroupsNV = (PFNWGLQUERYMAXSWAPGROUPSNVPROC)load("wglQueryMaxSwapGroupsNV");
|
||||||
|
glad_wglQueryFrameCountNV = (PFNWGLQUERYFRAMECOUNTNVPROC)load("wglQueryFrameCountNV");
|
||||||
|
glad_wglResetFrameCountNV = (PFNWGLRESETFRAMECOUNTNVPROC)load("wglResetFrameCountNV");
|
||||||
|
}
|
||||||
|
static void load_WGL_NV_gpu_affinity(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_NV_gpu_affinity) return;
|
||||||
|
glad_wglEnumGpusNV = (PFNWGLENUMGPUSNVPROC)load("wglEnumGpusNV");
|
||||||
|
glad_wglEnumGpuDevicesNV = (PFNWGLENUMGPUDEVICESNVPROC)load("wglEnumGpuDevicesNV");
|
||||||
|
glad_wglCreateAffinityDCNV = (PFNWGLCREATEAFFINITYDCNVPROC)load("wglCreateAffinityDCNV");
|
||||||
|
glad_wglEnumGpusFromAffinityDCNV = (PFNWGLENUMGPUSFROMAFFINITYDCNVPROC)load("wglEnumGpusFromAffinityDCNV");
|
||||||
|
glad_wglDeleteDCNV = (PFNWGLDELETEDCNVPROC)load("wglDeleteDCNV");
|
||||||
|
}
|
||||||
|
static void load_WGL_EXT_pixel_format(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_EXT_pixel_format) return;
|
||||||
|
glad_wglGetPixelFormatAttribivEXT = (PFNWGLGETPIXELFORMATATTRIBIVEXTPROC)load("wglGetPixelFormatAttribivEXT");
|
||||||
|
glad_wglGetPixelFormatAttribfvEXT = (PFNWGLGETPIXELFORMATATTRIBFVEXTPROC)load("wglGetPixelFormatAttribfvEXT");
|
||||||
|
glad_wglChoosePixelFormatEXT = (PFNWGLCHOOSEPIXELFORMATEXTPROC)load("wglChoosePixelFormatEXT");
|
||||||
|
}
|
||||||
|
static void load_WGL_ARB_extensions_string(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_ARB_extensions_string) return;
|
||||||
|
glad_wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)load("wglGetExtensionsStringARB");
|
||||||
|
}
|
||||||
|
static void load_WGL_NV_video_capture(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_NV_video_capture) return;
|
||||||
|
glad_wglBindVideoCaptureDeviceNV = (PFNWGLBINDVIDEOCAPTUREDEVICENVPROC)load("wglBindVideoCaptureDeviceNV");
|
||||||
|
glad_wglEnumerateVideoCaptureDevicesNV = (PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC)load("wglEnumerateVideoCaptureDevicesNV");
|
||||||
|
glad_wglLockVideoCaptureDeviceNV = (PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC)load("wglLockVideoCaptureDeviceNV");
|
||||||
|
glad_wglQueryVideoCaptureDeviceNV = (PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC)load("wglQueryVideoCaptureDeviceNV");
|
||||||
|
glad_wglReleaseVideoCaptureDeviceNV = (PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC)load("wglReleaseVideoCaptureDeviceNV");
|
||||||
|
}
|
||||||
|
static void load_WGL_ARB_render_texture(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_ARB_render_texture) return;
|
||||||
|
glad_wglBindTexImageARB = (PFNWGLBINDTEXIMAGEARBPROC)load("wglBindTexImageARB");
|
||||||
|
glad_wglReleaseTexImageARB = (PFNWGLRELEASETEXIMAGEARBPROC)load("wglReleaseTexImageARB");
|
||||||
|
glad_wglSetPbufferAttribARB = (PFNWGLSETPBUFFERATTRIBARBPROC)load("wglSetPbufferAttribARB");
|
||||||
|
}
|
||||||
|
static void load_WGL_ARB_pixel_format(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_ARB_pixel_format) return;
|
||||||
|
glad_wglGetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)load("wglGetPixelFormatAttribivARB");
|
||||||
|
glad_wglGetPixelFormatAttribfvARB = (PFNWGLGETPIXELFORMATATTRIBFVARBPROC)load("wglGetPixelFormatAttribfvARB");
|
||||||
|
glad_wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)load("wglChoosePixelFormatARB");
|
||||||
|
}
|
||||||
|
static void load_WGL_I3D_genlock(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_I3D_genlock) return;
|
||||||
|
glad_wglEnableGenlockI3D = (PFNWGLENABLEGENLOCKI3DPROC)load("wglEnableGenlockI3D");
|
||||||
|
glad_wglDisableGenlockI3D = (PFNWGLDISABLEGENLOCKI3DPROC)load("wglDisableGenlockI3D");
|
||||||
|
glad_wglIsEnabledGenlockI3D = (PFNWGLISENABLEDGENLOCKI3DPROC)load("wglIsEnabledGenlockI3D");
|
||||||
|
glad_wglGenlockSourceI3D = (PFNWGLGENLOCKSOURCEI3DPROC)load("wglGenlockSourceI3D");
|
||||||
|
glad_wglGetGenlockSourceI3D = (PFNWGLGETGENLOCKSOURCEI3DPROC)load("wglGetGenlockSourceI3D");
|
||||||
|
glad_wglGenlockSourceEdgeI3D = (PFNWGLGENLOCKSOURCEEDGEI3DPROC)load("wglGenlockSourceEdgeI3D");
|
||||||
|
glad_wglGetGenlockSourceEdgeI3D = (PFNWGLGETGENLOCKSOURCEEDGEI3DPROC)load("wglGetGenlockSourceEdgeI3D");
|
||||||
|
glad_wglGenlockSampleRateI3D = (PFNWGLGENLOCKSAMPLERATEI3DPROC)load("wglGenlockSampleRateI3D");
|
||||||
|
glad_wglGetGenlockSampleRateI3D = (PFNWGLGETGENLOCKSAMPLERATEI3DPROC)load("wglGetGenlockSampleRateI3D");
|
||||||
|
glad_wglGenlockSourceDelayI3D = (PFNWGLGENLOCKSOURCEDELAYI3DPROC)load("wglGenlockSourceDelayI3D");
|
||||||
|
glad_wglGetGenlockSourceDelayI3D = (PFNWGLGETGENLOCKSOURCEDELAYI3DPROC)load("wglGetGenlockSourceDelayI3D");
|
||||||
|
glad_wglQueryGenlockMaxSourceDelayI3D = (PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC)load("wglQueryGenlockMaxSourceDelayI3D");
|
||||||
|
}
|
||||||
|
static void load_WGL_NV_DX_interop(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_NV_DX_interop) return;
|
||||||
|
glad_wglDXSetResourceShareHandleNV = (PFNWGLDXSETRESOURCESHAREHANDLENVPROC)load("wglDXSetResourceShareHandleNV");
|
||||||
|
glad_wglDXOpenDeviceNV = (PFNWGLDXOPENDEVICENVPROC)load("wglDXOpenDeviceNV");
|
||||||
|
glad_wglDXCloseDeviceNV = (PFNWGLDXCLOSEDEVICENVPROC)load("wglDXCloseDeviceNV");
|
||||||
|
glad_wglDXRegisterObjectNV = (PFNWGLDXREGISTEROBJECTNVPROC)load("wglDXRegisterObjectNV");
|
||||||
|
glad_wglDXUnregisterObjectNV = (PFNWGLDXUNREGISTEROBJECTNVPROC)load("wglDXUnregisterObjectNV");
|
||||||
|
glad_wglDXObjectAccessNV = (PFNWGLDXOBJECTACCESSNVPROC)load("wglDXObjectAccessNV");
|
||||||
|
glad_wglDXLockObjectsNV = (PFNWGLDXLOCKOBJECTSNVPROC)load("wglDXLockObjectsNV");
|
||||||
|
glad_wglDXUnlockObjectsNV = (PFNWGLDXUNLOCKOBJECTSNVPROC)load("wglDXUnlockObjectsNV");
|
||||||
|
}
|
||||||
|
static void load_WGL_3DL_stereo_control(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_3DL_stereo_control) return;
|
||||||
|
glad_wglSetStereoEmitterState3DL = (PFNWGLSETSTEREOEMITTERSTATE3DLPROC)load("wglSetStereoEmitterState3DL");
|
||||||
|
}
|
||||||
|
static void load_WGL_EXT_pbuffer(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_EXT_pbuffer) return;
|
||||||
|
glad_wglCreatePbufferEXT = (PFNWGLCREATEPBUFFEREXTPROC)load("wglCreatePbufferEXT");
|
||||||
|
glad_wglGetPbufferDCEXT = (PFNWGLGETPBUFFERDCEXTPROC)load("wglGetPbufferDCEXT");
|
||||||
|
glad_wglReleasePbufferDCEXT = (PFNWGLRELEASEPBUFFERDCEXTPROC)load("wglReleasePbufferDCEXT");
|
||||||
|
glad_wglDestroyPbufferEXT = (PFNWGLDESTROYPBUFFEREXTPROC)load("wglDestroyPbufferEXT");
|
||||||
|
glad_wglQueryPbufferEXT = (PFNWGLQUERYPBUFFEREXTPROC)load("wglQueryPbufferEXT");
|
||||||
|
}
|
||||||
|
static void load_WGL_EXT_display_color_table(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_EXT_display_color_table) return;
|
||||||
|
glad_wglCreateDisplayColorTableEXT = (PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC)load("wglCreateDisplayColorTableEXT");
|
||||||
|
glad_wglLoadDisplayColorTableEXT = (PFNWGLLOADDISPLAYCOLORTABLEEXTPROC)load("wglLoadDisplayColorTableEXT");
|
||||||
|
glad_wglBindDisplayColorTableEXT = (PFNWGLBINDDISPLAYCOLORTABLEEXTPROC)load("wglBindDisplayColorTableEXT");
|
||||||
|
glad_wglDestroyDisplayColorTableEXT = (PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC)load("wglDestroyDisplayColorTableEXT");
|
||||||
|
}
|
||||||
|
static void load_WGL_NV_video_output(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_NV_video_output) return;
|
||||||
|
glad_wglGetVideoDeviceNV = (PFNWGLGETVIDEODEVICENVPROC)load("wglGetVideoDeviceNV");
|
||||||
|
glad_wglReleaseVideoDeviceNV = (PFNWGLRELEASEVIDEODEVICENVPROC)load("wglReleaseVideoDeviceNV");
|
||||||
|
glad_wglBindVideoImageNV = (PFNWGLBINDVIDEOIMAGENVPROC)load("wglBindVideoImageNV");
|
||||||
|
glad_wglReleaseVideoImageNV = (PFNWGLRELEASEVIDEOIMAGENVPROC)load("wglReleaseVideoImageNV");
|
||||||
|
glad_wglSendPbufferToVideoNV = (PFNWGLSENDPBUFFERTOVIDEONVPROC)load("wglSendPbufferToVideoNV");
|
||||||
|
glad_wglGetVideoInfoNV = (PFNWGLGETVIDEOINFONVPROC)load("wglGetVideoInfoNV");
|
||||||
|
}
|
||||||
|
static void load_WGL_I3D_gamma(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_I3D_gamma) return;
|
||||||
|
glad_wglGetGammaTableParametersI3D = (PFNWGLGETGAMMATABLEPARAMETERSI3DPROC)load("wglGetGammaTableParametersI3D");
|
||||||
|
glad_wglSetGammaTableParametersI3D = (PFNWGLSETGAMMATABLEPARAMETERSI3DPROC)load("wglSetGammaTableParametersI3D");
|
||||||
|
glad_wglGetGammaTableI3D = (PFNWGLGETGAMMATABLEI3DPROC)load("wglGetGammaTableI3D");
|
||||||
|
glad_wglSetGammaTableI3D = (PFNWGLSETGAMMATABLEI3DPROC)load("wglSetGammaTableI3D");
|
||||||
|
}
|
||||||
|
static void load_WGL_NV_copy_image(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_NV_copy_image) return;
|
||||||
|
glad_wglCopyImageSubDataNV = (PFNWGLCOPYIMAGESUBDATANVPROC)load("wglCopyImageSubDataNV");
|
||||||
|
}
|
||||||
|
static void load_WGL_NV_present_video(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_NV_present_video) return;
|
||||||
|
glad_wglEnumerateVideoDevicesNV = (PFNWGLENUMERATEVIDEODEVICESNVPROC)load("wglEnumerateVideoDevicesNV");
|
||||||
|
glad_wglBindVideoDeviceNV = (PFNWGLBINDVIDEODEVICENVPROC)load("wglBindVideoDeviceNV");
|
||||||
|
glad_wglQueryCurrentContextNV = (PFNWGLQUERYCURRENTCONTEXTNVPROC)load("wglQueryCurrentContextNV");
|
||||||
|
}
|
||||||
|
static void load_WGL_ARB_make_current_read(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_ARB_make_current_read) return;
|
||||||
|
glad_wglMakeContextCurrentARB = (PFNWGLMAKECONTEXTCURRENTARBPROC)load("wglMakeContextCurrentARB");
|
||||||
|
glad_wglGetCurrentReadDCARB = (PFNWGLGETCURRENTREADDCARBPROC)load("wglGetCurrentReadDCARB");
|
||||||
|
}
|
||||||
|
static void load_WGL_EXT_extensions_string(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_EXT_extensions_string) return;
|
||||||
|
glad_wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)load("wglGetExtensionsStringEXT");
|
||||||
|
}
|
||||||
|
static void load_WGL_EXT_swap_control(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_EXT_swap_control) return;
|
||||||
|
glad_wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)load("wglSwapIntervalEXT");
|
||||||
|
glad_wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)load("wglGetSwapIntervalEXT");
|
||||||
|
}
|
||||||
|
static void load_WGL_I3D_digital_video_control(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_I3D_digital_video_control) return;
|
||||||
|
glad_wglGetDigitalVideoParametersI3D = (PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC)load("wglGetDigitalVideoParametersI3D");
|
||||||
|
glad_wglSetDigitalVideoParametersI3D = (PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC)load("wglSetDigitalVideoParametersI3D");
|
||||||
|
}
|
||||||
|
static void load_WGL_ARB_pbuffer(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_ARB_pbuffer) return;
|
||||||
|
glad_wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC)load("wglCreatePbufferARB");
|
||||||
|
glad_wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC)load("wglGetPbufferDCARB");
|
||||||
|
glad_wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC)load("wglReleasePbufferDCARB");
|
||||||
|
glad_wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC)load("wglDestroyPbufferARB");
|
||||||
|
glad_wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC)load("wglQueryPbufferARB");
|
||||||
|
}
|
||||||
|
static void load_WGL_NV_vertex_array_range(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_NV_vertex_array_range) return;
|
||||||
|
glad_wglAllocateMemoryNV = (PFNWGLALLOCATEMEMORYNVPROC)load("wglAllocateMemoryNV");
|
||||||
|
glad_wglFreeMemoryNV = (PFNWGLFREEMEMORYNVPROC)load("wglFreeMemoryNV");
|
||||||
|
}
|
||||||
|
static void load_WGL_AMD_gpu_association(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_AMD_gpu_association) return;
|
||||||
|
glad_wglGetGPUIDsAMD = (PFNWGLGETGPUIDSAMDPROC)load("wglGetGPUIDsAMD");
|
||||||
|
glad_wglGetGPUInfoAMD = (PFNWGLGETGPUINFOAMDPROC)load("wglGetGPUInfoAMD");
|
||||||
|
glad_wglGetContextGPUIDAMD = (PFNWGLGETCONTEXTGPUIDAMDPROC)load("wglGetContextGPUIDAMD");
|
||||||
|
glad_wglCreateAssociatedContextAMD = (PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC)load("wglCreateAssociatedContextAMD");
|
||||||
|
glad_wglCreateAssociatedContextAttribsAMD = (PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC)load("wglCreateAssociatedContextAttribsAMD");
|
||||||
|
glad_wglDeleteAssociatedContextAMD = (PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC)load("wglDeleteAssociatedContextAMD");
|
||||||
|
glad_wglMakeAssociatedContextCurrentAMD = (PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC)load("wglMakeAssociatedContextCurrentAMD");
|
||||||
|
glad_wglGetCurrentAssociatedContextAMD = (PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC)load("wglGetCurrentAssociatedContextAMD");
|
||||||
|
glad_wglBlitContextFramebufferAMD = (PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC)load("wglBlitContextFramebufferAMD");
|
||||||
|
}
|
||||||
|
static void load_WGL_EXT_make_current_read(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_EXT_make_current_read) return;
|
||||||
|
glad_wglMakeContextCurrentEXT = (PFNWGLMAKECONTEXTCURRENTEXTPROC)load("wglMakeContextCurrentEXT");
|
||||||
|
glad_wglGetCurrentReadDCEXT = (PFNWGLGETCURRENTREADDCEXTPROC)load("wglGetCurrentReadDCEXT");
|
||||||
|
}
|
||||||
|
static void load_WGL_I3D_swap_frame_lock(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_I3D_swap_frame_lock) return;
|
||||||
|
glad_wglEnableFrameLockI3D = (PFNWGLENABLEFRAMELOCKI3DPROC)load("wglEnableFrameLockI3D");
|
||||||
|
glad_wglDisableFrameLockI3D = (PFNWGLDISABLEFRAMELOCKI3DPROC)load("wglDisableFrameLockI3D");
|
||||||
|
glad_wglIsEnabledFrameLockI3D = (PFNWGLISENABLEDFRAMELOCKI3DPROC)load("wglIsEnabledFrameLockI3D");
|
||||||
|
glad_wglQueryFrameLockMasterI3D = (PFNWGLQUERYFRAMELOCKMASTERI3DPROC)load("wglQueryFrameLockMasterI3D");
|
||||||
|
}
|
||||||
|
static void load_WGL_ARB_buffer_region(GLADloadproc load) {
|
||||||
|
if(!GLAD_WGL_ARB_buffer_region) return;
|
||||||
|
glad_wglCreateBufferRegionARB = (PFNWGLCREATEBUFFERREGIONARBPROC)load("wglCreateBufferRegionARB");
|
||||||
|
glad_wglDeleteBufferRegionARB = (PFNWGLDELETEBUFFERREGIONARBPROC)load("wglDeleteBufferRegionARB");
|
||||||
|
glad_wglSaveBufferRegionARB = (PFNWGLSAVEBUFFERREGIONARBPROC)load("wglSaveBufferRegionARB");
|
||||||
|
glad_wglRestoreBufferRegionARB = (PFNWGLRESTOREBUFFERREGIONARBPROC)load("wglRestoreBufferRegionARB");
|
||||||
|
}
|
||||||
|
static void find_extensionsWGL(void) {
|
||||||
|
GLAD_WGL_NV_multisample_coverage = has_ext("WGL_NV_multisample_coverage");
|
||||||
|
GLAD_WGL_I3D_image_buffer = has_ext("WGL_I3D_image_buffer");
|
||||||
|
GLAD_WGL_I3D_swap_frame_usage = has_ext("WGL_I3D_swap_frame_usage");
|
||||||
|
GLAD_WGL_NV_DX_interop2 = has_ext("WGL_NV_DX_interop2");
|
||||||
|
GLAD_WGL_NV_float_buffer = has_ext("WGL_NV_float_buffer");
|
||||||
|
GLAD_WGL_NV_delay_before_swap = has_ext("WGL_NV_delay_before_swap");
|
||||||
|
GLAD_WGL_OML_sync_control = has_ext("WGL_OML_sync_control");
|
||||||
|
GLAD_WGL_ARB_pixel_format_float = has_ext("WGL_ARB_pixel_format_float");
|
||||||
|
GLAD_WGL_ARB_create_context = has_ext("WGL_ARB_create_context");
|
||||||
|
GLAD_WGL_NV_swap_group = has_ext("WGL_NV_swap_group");
|
||||||
|
GLAD_WGL_NV_gpu_affinity = has_ext("WGL_NV_gpu_affinity");
|
||||||
|
GLAD_WGL_EXT_pixel_format = has_ext("WGL_EXT_pixel_format");
|
||||||
|
GLAD_WGL_ARB_extensions_string = has_ext("WGL_ARB_extensions_string");
|
||||||
|
GLAD_WGL_NV_video_capture = has_ext("WGL_NV_video_capture");
|
||||||
|
GLAD_WGL_NV_render_texture_rectangle = has_ext("WGL_NV_render_texture_rectangle");
|
||||||
|
GLAD_WGL_EXT_create_context_es_profile = has_ext("WGL_EXT_create_context_es_profile");
|
||||||
|
GLAD_WGL_ARB_robustness_share_group_isolation = has_ext("WGL_ARB_robustness_share_group_isolation");
|
||||||
|
GLAD_WGL_ARB_render_texture = has_ext("WGL_ARB_render_texture");
|
||||||
|
GLAD_WGL_EXT_depth_float = has_ext("WGL_EXT_depth_float");
|
||||||
|
GLAD_WGL_EXT_swap_control_tear = has_ext("WGL_EXT_swap_control_tear");
|
||||||
|
GLAD_WGL_ARB_pixel_format = has_ext("WGL_ARB_pixel_format");
|
||||||
|
GLAD_WGL_ARB_multisample = has_ext("WGL_ARB_multisample");
|
||||||
|
GLAD_WGL_I3D_genlock = has_ext("WGL_I3D_genlock");
|
||||||
|
GLAD_WGL_NV_DX_interop = has_ext("WGL_NV_DX_interop");
|
||||||
|
GLAD_WGL_3DL_stereo_control = has_ext("WGL_3DL_stereo_control");
|
||||||
|
GLAD_WGL_EXT_pbuffer = has_ext("WGL_EXT_pbuffer");
|
||||||
|
GLAD_WGL_EXT_display_color_table = has_ext("WGL_EXT_display_color_table");
|
||||||
|
GLAD_WGL_NV_video_output = has_ext("WGL_NV_video_output");
|
||||||
|
GLAD_WGL_ARB_robustness_application_isolation = has_ext("WGL_ARB_robustness_application_isolation");
|
||||||
|
GLAD_WGL_3DFX_multisample = has_ext("WGL_3DFX_multisample");
|
||||||
|
GLAD_WGL_I3D_gamma = has_ext("WGL_I3D_gamma");
|
||||||
|
GLAD_WGL_ARB_framebuffer_sRGB = has_ext("WGL_ARB_framebuffer_sRGB");
|
||||||
|
GLAD_WGL_NV_copy_image = has_ext("WGL_NV_copy_image");
|
||||||
|
GLAD_WGL_EXT_framebuffer_sRGB = has_ext("WGL_EXT_framebuffer_sRGB");
|
||||||
|
GLAD_WGL_NV_present_video = has_ext("WGL_NV_present_video");
|
||||||
|
GLAD_WGL_EXT_create_context_es2_profile = has_ext("WGL_EXT_create_context_es2_profile");
|
||||||
|
GLAD_WGL_ARB_create_context_robustness = has_ext("WGL_ARB_create_context_robustness");
|
||||||
|
GLAD_WGL_ARB_make_current_read = has_ext("WGL_ARB_make_current_read");
|
||||||
|
GLAD_WGL_EXT_multisample = has_ext("WGL_EXT_multisample");
|
||||||
|
GLAD_WGL_EXT_extensions_string = has_ext("WGL_EXT_extensions_string");
|
||||||
|
GLAD_WGL_NV_render_depth_texture = has_ext("WGL_NV_render_depth_texture");
|
||||||
|
GLAD_WGL_ATI_pixel_format_float = has_ext("WGL_ATI_pixel_format_float");
|
||||||
|
GLAD_WGL_ARB_create_context_profile = has_ext("WGL_ARB_create_context_profile");
|
||||||
|
GLAD_WGL_EXT_swap_control = has_ext("WGL_EXT_swap_control");
|
||||||
|
GLAD_WGL_I3D_digital_video_control = has_ext("WGL_I3D_digital_video_control");
|
||||||
|
GLAD_WGL_ARB_pbuffer = has_ext("WGL_ARB_pbuffer");
|
||||||
|
GLAD_WGL_NV_vertex_array_range = has_ext("WGL_NV_vertex_array_range");
|
||||||
|
GLAD_WGL_AMD_gpu_association = has_ext("WGL_AMD_gpu_association");
|
||||||
|
GLAD_WGL_EXT_pixel_format_packed_float = has_ext("WGL_EXT_pixel_format_packed_float");
|
||||||
|
GLAD_WGL_EXT_make_current_read = has_ext("WGL_EXT_make_current_read");
|
||||||
|
GLAD_WGL_I3D_swap_frame_lock = has_ext("WGL_I3D_swap_frame_lock");
|
||||||
|
GLAD_WGL_ARB_buffer_region = has_ext("WGL_ARB_buffer_region");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void find_coreWGL(HDC hdc) {
|
||||||
|
//int major = 9;
|
||||||
|
//int minor = 9;
|
||||||
|
GLADWGLhdc = hdc;
|
||||||
|
}
|
||||||
|
|
||||||
|
void gladLoadWGLLoader(GLADloadproc load, HDC hdc) {
|
||||||
|
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)load("wglGetExtensionsStringARB");
|
||||||
|
wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)load("wglGetExtensionsStringEXT");
|
||||||
|
if(wglGetExtensionsStringARB == NULL && wglGetExtensionsStringEXT == NULL) return;
|
||||||
|
find_coreWGL(hdc);
|
||||||
|
|
||||||
|
find_extensionsWGL();
|
||||||
|
load_WGL_I3D_image_buffer(load);
|
||||||
|
load_WGL_I3D_swap_frame_usage(load);
|
||||||
|
load_WGL_NV_delay_before_swap(load);
|
||||||
|
load_WGL_OML_sync_control(load);
|
||||||
|
load_WGL_ARB_create_context(load);
|
||||||
|
load_WGL_NV_swap_group(load);
|
||||||
|
load_WGL_NV_gpu_affinity(load);
|
||||||
|
load_WGL_EXT_pixel_format(load);
|
||||||
|
load_WGL_ARB_extensions_string(load);
|
||||||
|
load_WGL_NV_video_capture(load);
|
||||||
|
load_WGL_ARB_render_texture(load);
|
||||||
|
load_WGL_ARB_pixel_format(load);
|
||||||
|
load_WGL_I3D_genlock(load);
|
||||||
|
load_WGL_NV_DX_interop(load);
|
||||||
|
load_WGL_3DL_stereo_control(load);
|
||||||
|
load_WGL_EXT_pbuffer(load);
|
||||||
|
load_WGL_EXT_display_color_table(load);
|
||||||
|
load_WGL_NV_video_output(load);
|
||||||
|
load_WGL_I3D_gamma(load);
|
||||||
|
load_WGL_NV_copy_image(load);
|
||||||
|
load_WGL_NV_present_video(load);
|
||||||
|
load_WGL_ARB_make_current_read(load);
|
||||||
|
load_WGL_EXT_extensions_string(load);
|
||||||
|
load_WGL_EXT_swap_control(load);
|
||||||
|
load_WGL_I3D_digital_video_control(load);
|
||||||
|
load_WGL_ARB_pbuffer(load);
|
||||||
|
load_WGL_NV_vertex_array_range(load);
|
||||||
|
load_WGL_AMD_gpu_association(load);
|
||||||
|
load_WGL_EXT_make_current_read(load);
|
||||||
|
load_WGL_I3D_swap_frame_lock(load);
|
||||||
|
load_WGL_ARB_buffer_region(load);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
30
deps/ipc-util/CMakeLists.txt
vendored
Normal file
30
deps/ipc-util/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# TODO: Add posix support
|
||||||
|
if(NOT WIN32)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
project(ipc-util)
|
||||||
|
|
||||||
|
set(ipc-util_HEADERS
|
||||||
|
ipc-util/pipe.h)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(ipc-util_HEADERS
|
||||||
|
${ipc-util_HEADERS}
|
||||||
|
ipc-util/pipe-windows.h)
|
||||||
|
set(ipc-util_SOURCES
|
||||||
|
ipc-util/pipe-windows.c)
|
||||||
|
else()
|
||||||
|
set(ipc-util_HEADERS
|
||||||
|
${ipc-util_HEADERS}
|
||||||
|
ipc-util/pipe-posix.h)
|
||||||
|
set(ipc-util_SOURCES
|
||||||
|
ipc-util/pipe-posix.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(ipc-util STATIC
|
||||||
|
${ipc-util_SOURCES}
|
||||||
|
${ipc-util_HEADERS})
|
||||||
|
target_include_directories(ipc-util
|
||||||
|
PUBLIC .)
|
||||||
|
target_link_libraries(ipc-util)
|
17
deps/ipc-util/ipc-util/pipe-posix.c
vendored
Normal file
17
deps/ipc-util/ipc-util/pipe-posix.c
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2014 Hugh Bailey <obs.jim@gmail.com>
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* TODO */
|
21
deps/ipc-util/ipc-util/pipe-posix.h
vendored
Normal file
21
deps/ipc-util/ipc-util/pipe-posix.h
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2014 Hugh Bailey <obs.jim@gmail.com>
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
|
/* TODO */
|
269
deps/ipc-util/ipc-util/pipe-windows.c
vendored
Normal file
269
deps/ipc-util/ipc-util/pipe-windows.c
vendored
Normal file
|
@ -0,0 +1,269 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2014 Hugh Bailey <obs.jim@gmail.com>
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "pipe.h"
|
||||||
|
|
||||||
|
#define IPC_PIPE_BUF_SIZE 1024
|
||||||
|
|
||||||
|
static inline bool ipc_pipe_internal_create_events(ipc_pipe_server_t *pipe)
|
||||||
|
{
|
||||||
|
pipe->ready_event = CreateEvent(NULL, false, false, NULL);
|
||||||
|
return !!pipe->ready_event;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void *create_full_access_security_descriptor()
|
||||||
|
{
|
||||||
|
void *sd = malloc(SECURITY_DESCRIPTOR_MIN_LENGTH);
|
||||||
|
if (!sd) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION)) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SetSecurityDescriptorDacl(sd, true, NULL, false)) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sd;
|
||||||
|
|
||||||
|
error:
|
||||||
|
free(sd);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool ipc_pipe_internal_create_pipe(ipc_pipe_server_t *pipe,
|
||||||
|
const char *name)
|
||||||
|
{
|
||||||
|
SECURITY_ATTRIBUTES sa;
|
||||||
|
char new_name[512];
|
||||||
|
void *sd;
|
||||||
|
const DWORD access = PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED;
|
||||||
|
const DWORD flags = PIPE_TYPE_MESSAGE |
|
||||||
|
PIPE_READMODE_MESSAGE |
|
||||||
|
PIPE_WAIT;
|
||||||
|
|
||||||
|
strcpy_s(new_name, sizeof(new_name), "\\\\.\\pipe\\");
|
||||||
|
strcat_s(new_name, sizeof(new_name), name);
|
||||||
|
|
||||||
|
sd = create_full_access_security_descriptor();
|
||||||
|
if (!sd) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sa.nLength = sizeof(sa);
|
||||||
|
sa.lpSecurityDescriptor = sd;
|
||||||
|
sa.bInheritHandle = false;
|
||||||
|
|
||||||
|
pipe->handle = CreateNamedPipeA(new_name, access, flags, 1,
|
||||||
|
IPC_PIPE_BUF_SIZE, IPC_PIPE_BUF_SIZE, 0, &sa);
|
||||||
|
free(sd);
|
||||||
|
|
||||||
|
return pipe->handle != INVALID_HANDLE_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void ipc_pipe_internal_ensure_capacity(ipc_pipe_server_t *pipe,
|
||||||
|
size_t new_size)
|
||||||
|
{
|
||||||
|
if (pipe->capacity >= new_size) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pipe->read_data = realloc(pipe->read_data, new_size);
|
||||||
|
pipe->capacity = new_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void ipc_pipe_internal_append_bytes(ipc_pipe_server_t *pipe,
|
||||||
|
uint8_t *bytes, size_t size)
|
||||||
|
{
|
||||||
|
size_t new_size = pipe->size + size;
|
||||||
|
ipc_pipe_internal_ensure_capacity(pipe, new_size);
|
||||||
|
memcpy(pipe->read_data + pipe->size, bytes, size);
|
||||||
|
pipe->size = new_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool ipc_pipe_internal_io_pending(void)
|
||||||
|
{
|
||||||
|
return GetLastError() == ERROR_IO_PENDING;
|
||||||
|
}
|
||||||
|
|
||||||
|
static DWORD CALLBACK ipc_pipe_internal_server_thread(LPVOID param)
|
||||||
|
{
|
||||||
|
ipc_pipe_server_t *pipe = param;
|
||||||
|
uint8_t buf[IPC_PIPE_BUF_SIZE];
|
||||||
|
|
||||||
|
/* wait for connection */
|
||||||
|
DWORD wait = WaitForSingleObject(pipe->ready_event, INFINITE);
|
||||||
|
if (wait != WAIT_OBJECT_0) {
|
||||||
|
pipe->read_callback(pipe->param, NULL, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
DWORD bytes = 0;
|
||||||
|
bool success;
|
||||||
|
|
||||||
|
success = !!ReadFile(pipe->handle, buf, IPC_PIPE_BUF_SIZE, NULL,
|
||||||
|
&pipe->overlap);
|
||||||
|
if (!success && !ipc_pipe_internal_io_pending()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
DWORD wait = WaitForSingleObject(pipe->ready_event, INFINITE);
|
||||||
|
if (wait != WAIT_OBJECT_0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
success = !!GetOverlappedResult(pipe->handle, &pipe->overlap,
|
||||||
|
&bytes, true);
|
||||||
|
if (!success || !bytes) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ipc_pipe_internal_append_bytes(pipe, buf, (size_t)bytes);
|
||||||
|
|
||||||
|
if (success) {
|
||||||
|
pipe->read_callback(pipe->param, pipe->read_data,
|
||||||
|
pipe->size);
|
||||||
|
pipe->size = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pipe->read_callback(pipe->param, NULL, 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool ipc_pipe_internal_start_server_thread(
|
||||||
|
ipc_pipe_server_t *pipe)
|
||||||
|
{
|
||||||
|
pipe->thread = CreateThread(NULL, 0, ipc_pipe_internal_server_thread,
|
||||||
|
pipe, 0, NULL);
|
||||||
|
return pipe->thread != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool ipc_pipe_internal_wait_for_connection(
|
||||||
|
ipc_pipe_server_t *pipe)
|
||||||
|
{
|
||||||
|
bool success;
|
||||||
|
|
||||||
|
pipe->overlap.hEvent = pipe->ready_event;
|
||||||
|
success = !!ConnectNamedPipe(pipe->handle, &pipe->overlap);
|
||||||
|
return success || (!success && ipc_pipe_internal_io_pending());
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool ipc_pipe_internal_open_pipe(ipc_pipe_client_t *pipe,
|
||||||
|
const char *name)
|
||||||
|
{
|
||||||
|
DWORD mode = PIPE_READMODE_MESSAGE;
|
||||||
|
char new_name[512];
|
||||||
|
|
||||||
|
strcpy_s(new_name, sizeof(new_name), "\\\\.\\pipe\\");
|
||||||
|
strcat_s(new_name, sizeof(new_name), name);
|
||||||
|
|
||||||
|
pipe->handle = CreateFileA(new_name, GENERIC_READ | GENERIC_WRITE,
|
||||||
|
0, NULL, OPEN_EXISTING, 0, NULL);
|
||||||
|
if (pipe->handle == INVALID_HANDLE_VALUE) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return !!SetNamedPipeHandleState(pipe->handle, &mode, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
bool ipc_pipe_server_start(ipc_pipe_server_t *pipe, const char *name,
|
||||||
|
ipc_pipe_read_t read_callback, void *param)
|
||||||
|
{
|
||||||
|
pipe->read_callback = read_callback;
|
||||||
|
pipe->param = param;
|
||||||
|
|
||||||
|
if (!ipc_pipe_internal_create_events(pipe)) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
if (!ipc_pipe_internal_create_pipe(pipe, name)) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
if (!ipc_pipe_internal_wait_for_connection(pipe)) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
if (!ipc_pipe_internal_start_server_thread(pipe)) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
error:
|
||||||
|
ipc_pipe_server_free(pipe);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ipc_pipe_server_free(ipc_pipe_server_t *pipe)
|
||||||
|
{
|
||||||
|
if (!pipe)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (pipe->thread) {
|
||||||
|
CancelIoEx(pipe->handle, &pipe->overlap);
|
||||||
|
SetEvent(pipe->ready_event);
|
||||||
|
WaitForSingleObject(pipe->thread, INFINITE);
|
||||||
|
CloseHandle(pipe->thread);
|
||||||
|
}
|
||||||
|
if (pipe->ready_event)
|
||||||
|
CloseHandle(pipe->ready_event);
|
||||||
|
if (pipe->handle)
|
||||||
|
CloseHandle(pipe->handle);
|
||||||
|
|
||||||
|
free(pipe->read_data);
|
||||||
|
memset(pipe, 0, sizeof(*pipe));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ipc_pipe_client_open(ipc_pipe_client_t *pipe, const char *name)
|
||||||
|
{
|
||||||
|
if (!ipc_pipe_internal_open_pipe(pipe, name)) {
|
||||||
|
ipc_pipe_client_free(pipe);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ipc_pipe_client_free(ipc_pipe_client_t *pipe)
|
||||||
|
{
|
||||||
|
if (!pipe)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (pipe->handle)
|
||||||
|
CloseHandle(pipe->handle);
|
||||||
|
|
||||||
|
memset(pipe, 0, sizeof(*pipe));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ipc_pipe_client_write(ipc_pipe_client_t *pipe, const void *data,
|
||||||
|
size_t size)
|
||||||
|
{
|
||||||
|
DWORD bytes;
|
||||||
|
|
||||||
|
if (!pipe) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pipe->handle || pipe->handle == INVALID_HANDLE_VALUE) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return !!WriteFile(pipe->handle, data, (DWORD)size, &bytes, NULL);
|
||||||
|
}
|
42
deps/ipc-util/ipc-util/pipe-windows.h
vendored
Normal file
42
deps/ipc-util/ipc-util/pipe-windows.h
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2014 Hugh Bailey <obs.jim@gmail.com>
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
struct ipc_pipe_server {
|
||||||
|
OVERLAPPED overlap;
|
||||||
|
HANDLE handle;
|
||||||
|
HANDLE ready_event;
|
||||||
|
HANDLE thread;
|
||||||
|
|
||||||
|
uint8_t *read_data;
|
||||||
|
size_t size;
|
||||||
|
size_t capacity;
|
||||||
|
|
||||||
|
ipc_pipe_read_t read_callback;
|
||||||
|
void *param;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ipc_pipe_client {
|
||||||
|
HANDLE handle;
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline bool ipc_pipe_client_valid(ipc_pipe_client_t *pipe)
|
||||||
|
{
|
||||||
|
return pipe->handle != NULL && pipe->handle != INVALID_HANDLE_VALUE;
|
||||||
|
}
|
55
deps/ipc-util/ipc-util/pipe.h
vendored
Normal file
55
deps/ipc-util/ipc-util/pipe.h
vendored
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2014 Hugh Bailey <obs.jim@gmail.com>
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#elif _MSC_VER
|
||||||
|
#ifndef inline
|
||||||
|
#define inline __inline
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct ipc_pipe_server;
|
||||||
|
struct ipc_pipe_client;
|
||||||
|
typedef struct ipc_pipe_server ipc_pipe_server_t;
|
||||||
|
typedef struct ipc_pipe_client ipc_pipe_client_t;
|
||||||
|
|
||||||
|
typedef void (*ipc_pipe_read_t)(void *param, uint8_t *data, size_t size);
|
||||||
|
|
||||||
|
bool ipc_pipe_server_start(ipc_pipe_server_t *pipe, const char *name,
|
||||||
|
ipc_pipe_read_t read_callback, void *param);
|
||||||
|
void ipc_pipe_server_free(ipc_pipe_server_t *pipe);
|
||||||
|
|
||||||
|
bool ipc_pipe_client_open(ipc_pipe_client_t *pipe, const char *name);
|
||||||
|
void ipc_pipe_client_free(ipc_pipe_client_t *pipe);
|
||||||
|
bool ipc_pipe_client_write(ipc_pipe_client_t *pipe, const void *data,
|
||||||
|
size_t size);
|
||||||
|
static inline bool ipc_pipe_client_valid(ipc_pipe_client_t *pipe);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include "pipe-windows.h"
|
||||||
|
#else /* assume posix */
|
||||||
|
#include "pipe-posix.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
28
deps/jansson/.gitignore
vendored
Normal file
28
deps/jansson/.gitignore
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
*~
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
.libs
|
||||||
|
.deps
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache
|
||||||
|
config.guess
|
||||||
|
config.h
|
||||||
|
config.h.in
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
config.sub
|
||||||
|
configure
|
||||||
|
depcomp
|
||||||
|
install-sh
|
||||||
|
libtool
|
||||||
|
ltmain.sh
|
||||||
|
missing
|
||||||
|
*.lo
|
||||||
|
*.la
|
||||||
|
stamp-h1
|
||||||
|
*.pyc
|
||||||
|
*.pc
|
||||||
|
/src/jansson_config.h
|
||||||
|
*.exe
|
5
deps/jansson/.travis.yml
vendored
Normal file
5
deps/jansson/.travis.yml
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
language: c
|
||||||
|
compiler:
|
||||||
|
- gcc
|
||||||
|
- clang
|
||||||
|
script: autoreconf -f -i && CFLAGS=-Werror ./configure && make check
|
29
deps/jansson/Android.mk
vendored
Normal file
29
deps/jansson/Android.mk
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
LOCAL_PATH:= $(call my-dir)
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_ARM_MODE := arm
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := \
|
||||||
|
src/dump.c \
|
||||||
|
src/error.c \
|
||||||
|
src/hashtable.c \
|
||||||
|
src/load.c \
|
||||||
|
src/memory.c \
|
||||||
|
src/pack_unpack.c \
|
||||||
|
src/strbuffer.c \
|
||||||
|
src/strconv.c \
|
||||||
|
src/utf.c \
|
||||||
|
src/value.c
|
||||||
|
|
||||||
|
LOCAL_C_INCLUDES += \
|
||||||
|
$(LOCAL_PATH) \
|
||||||
|
$(LOCAL_PATH)/android \
|
||||||
|
$(LOCAL_PATH)/src
|
||||||
|
|
||||||
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
LOCAL_SHARED_LIBRARIES := libc
|
||||||
|
LOCAL_CFLAGS += -O3
|
||||||
|
|
||||||
|
LOCAL_MODULE:= libjansson
|
||||||
|
|
||||||
|
include $(BUILD_SHARED_LIBRARY)
|
586
deps/jansson/CHANGES
vendored
Normal file
586
deps/jansson/CHANGES
vendored
Normal file
|
@ -0,0 +1,586 @@
|
||||||
|
Version 2.6 (in development)
|
||||||
|
============================
|
||||||
|
|
||||||
|
Released XXXX-XX-XX
|
||||||
|
|
||||||
|
* New features:
|
||||||
|
|
||||||
|
- `json_pack()` and friends: Add format specifiers ``s%`` and ``+%``
|
||||||
|
for a size_t string length.
|
||||||
|
|
||||||
|
- `json_unpack()` and friends: Add format specifier ``s%`` for
|
||||||
|
unpacking the string length along with the string itself.
|
||||||
|
|
||||||
|
- Add length-aware string constructors `json_stringn()` and
|
||||||
|
`json_stringn_nocheck()`, length-aware string mutators
|
||||||
|
`json_string_setn()` and `json_string_setn_nocheck()`, and a
|
||||||
|
function for getting string's length `json_string_length()`.
|
||||||
|
|
||||||
|
- Support ``\u0000`` escapes in the decoder. The support can be
|
||||||
|
enabled by using the ``JSON_ALLOW_NUL`` decoding flag.
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
|
||||||
|
- Some malformed ``\uNNNN`` escapes could crash the decoder with an
|
||||||
|
assertion failure.
|
||||||
|
|
||||||
|
* Other changes:
|
||||||
|
|
||||||
|
- ``\uNNNN`` escapes are now encoded in upper case for better
|
||||||
|
readability.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.5
|
||||||
|
===========
|
||||||
|
|
||||||
|
Released 2013-09-19
|
||||||
|
|
||||||
|
* New features:
|
||||||
|
|
||||||
|
- `json_pack()` and friends: Add format specifiers ``s#``, ``+`` and
|
||||||
|
``+#``.
|
||||||
|
|
||||||
|
- Add ``JSON_DECODE_INT_AS_REAL`` decoding flag to treat all numbers
|
||||||
|
as real in the decoder (#123).
|
||||||
|
|
||||||
|
- Add `json_array_foreach()`, paralleling `json_object_foreach()`
|
||||||
|
(#118).
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
|
||||||
|
- `json_dumps()` and friends: Don't crash if json is *NULL* and
|
||||||
|
``JSON_ENCODE_ANY`` is set.
|
||||||
|
|
||||||
|
- Fix a theoretical integer overflow in `jsonp_strdup()`.
|
||||||
|
|
||||||
|
- Fix `l_isxdigit()` macro (#97).
|
||||||
|
|
||||||
|
- Fix an off-by-one error in `json_array_remove()`.
|
||||||
|
|
||||||
|
* Build:
|
||||||
|
|
||||||
|
- Support CMake in addition to GNU Autotools (#106, #107, #112,
|
||||||
|
#115, #120, #127).
|
||||||
|
|
||||||
|
- Support building for Android (#109).
|
||||||
|
|
||||||
|
- Don't use ``-Werror`` by default.
|
||||||
|
|
||||||
|
- Support building and testing with VPATH (#93).
|
||||||
|
|
||||||
|
- Fix compilation when ``NDEBUG`` is defined (#128)
|
||||||
|
|
||||||
|
* Tests:
|
||||||
|
|
||||||
|
- Fix a refleak in ``test/bin/json_process.c``.
|
||||||
|
|
||||||
|
* Documentation:
|
||||||
|
|
||||||
|
- Clarify the return value of `json_load_callback_t`.
|
||||||
|
|
||||||
|
- Document how to circumvent problems with separate heaps on Windows.
|
||||||
|
|
||||||
|
- Fix memory leaks and warnings in ``github_commits.c``.
|
||||||
|
|
||||||
|
- Use `json_decref()` properly in tutorial.
|
||||||
|
|
||||||
|
* Other:
|
||||||
|
|
||||||
|
- Make it possible to forward declare ``struct json_t``.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.4
|
||||||
|
===========
|
||||||
|
|
||||||
|
Released 2012-09-23
|
||||||
|
|
||||||
|
* New features:
|
||||||
|
|
||||||
|
- Add `json_boolean()` macro that returns the JSON true or false
|
||||||
|
value based on its argument (#86).
|
||||||
|
|
||||||
|
- Add `json_load_callback()` that calls a callback function
|
||||||
|
repeatedly to read the JSON input (#57).
|
||||||
|
|
||||||
|
- Add JSON_ESCAPE_SLASH encoding flag to escape all occurences of
|
||||||
|
``/`` with ``\/``.
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
|
||||||
|
- Check for and reject NaN and Inf values for reals. Encoding these
|
||||||
|
values resulted in invalid JSON.
|
||||||
|
|
||||||
|
- Fix `json_real_set()` to return -1 on error.
|
||||||
|
|
||||||
|
* Build:
|
||||||
|
|
||||||
|
- Jansson now builds on Windows with Visual Studio 2010, and
|
||||||
|
includes solution and project files in ``win32/vs2010/``
|
||||||
|
directory.
|
||||||
|
|
||||||
|
- Fix build warnings (#77, #78).
|
||||||
|
|
||||||
|
- Add ``-no-undefined`` to LDFLAGS (#90).
|
||||||
|
|
||||||
|
* Tests:
|
||||||
|
|
||||||
|
- Fix the symbol exports test on Linux/PPC64 (#88).
|
||||||
|
|
||||||
|
* Documentation:
|
||||||
|
|
||||||
|
- Fix typos (#73, #84).
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.3.1
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2012-04-20
|
||||||
|
|
||||||
|
* Build issues:
|
||||||
|
|
||||||
|
- Only use ``long long`` if ``strtoll()`` is also available.
|
||||||
|
|
||||||
|
* Documentation:
|
||||||
|
|
||||||
|
- Fix the names of library version constants in documentation. (#52)
|
||||||
|
|
||||||
|
- Change the tutorial to use GitHub API v3. (#65)
|
||||||
|
|
||||||
|
* Tests:
|
||||||
|
|
||||||
|
- Make some tests locale independent. (#51)
|
||||||
|
|
||||||
|
- Distribute the library exports test in the tarball.
|
||||||
|
|
||||||
|
- Make test run on shells that don't support the ``export FOO=bar``
|
||||||
|
syntax.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.3
|
||||||
|
===========
|
||||||
|
|
||||||
|
Released 2012-01-27
|
||||||
|
|
||||||
|
* New features:
|
||||||
|
|
||||||
|
- `json_unpack()` and friends: Add support for optional object keys
|
||||||
|
with the ``{s?o}`` syntax.
|
||||||
|
|
||||||
|
- Add `json_object_update_existing()` and
|
||||||
|
`json_object_update_missing()`, for updating only existing keys or
|
||||||
|
only adding missing keys to an object. (#37)
|
||||||
|
|
||||||
|
- Add `json_object_foreach()` for more convenient iteration over
|
||||||
|
objects. (#45, #46)
|
||||||
|
|
||||||
|
- When decoding JSON, write the number of bytes that were read from
|
||||||
|
input to ``error.position`` also on success. This is handy with
|
||||||
|
``JSON_DISABLE_EOF_CHECK``.
|
||||||
|
|
||||||
|
- Add support for decoding any JSON value, not just arrays or
|
||||||
|
objects. The support is enabled with the new ``JSON_DECODE_ANY``
|
||||||
|
flag. Patch by Andrea Marchesini. (#4)
|
||||||
|
|
||||||
|
* Bug fixes
|
||||||
|
|
||||||
|
- Avoid problems with object's serial number growing too big. (#40,
|
||||||
|
#41)
|
||||||
|
|
||||||
|
- Decoding functions now return NULL if the first argument is NULL.
|
||||||
|
Patch by Andrea Marchesini.
|
||||||
|
|
||||||
|
- Include ``jansson_config.h.win32`` in the distribution tarball.
|
||||||
|
|
||||||
|
- Remove ``+`` and leading zeros from exponents in the encoder.
|
||||||
|
(#39)
|
||||||
|
|
||||||
|
- Make Jansson build and work on MinGW. (#39, #38)
|
||||||
|
|
||||||
|
* Documentation
|
||||||
|
|
||||||
|
- Note that the same JSON values must not be encoded in parallel by
|
||||||
|
separate threads. (#42)
|
||||||
|
|
||||||
|
- Document MinGW support.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.2.1
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2011-10-06
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
|
||||||
|
- Fix real number encoding and decoding under non-C locales. (#32)
|
||||||
|
|
||||||
|
- Fix identifier decoding under non-UTF-8 locales. (#35)
|
||||||
|
|
||||||
|
- `json_load_file()`: Open the input file in binary mode for maximum
|
||||||
|
compatiblity.
|
||||||
|
|
||||||
|
* Documentation:
|
||||||
|
|
||||||
|
- Clarify the lifecycle of the result of the ``s`` fromat of
|
||||||
|
`json_unpack()`. (#31)
|
||||||
|
|
||||||
|
- Add some portability info. (#36)
|
||||||
|
|
||||||
|
- Little clarifications here and there.
|
||||||
|
|
||||||
|
* Other:
|
||||||
|
|
||||||
|
- Some style fixes, issues detected by static analyzers.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.2
|
||||||
|
===========
|
||||||
|
|
||||||
|
Released 2011-09-03
|
||||||
|
|
||||||
|
* New features:
|
||||||
|
|
||||||
|
- `json_dump_callback()`: Pass the encoder output to a callback
|
||||||
|
function in chunks.
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
|
||||||
|
- `json_string_set()`: Check that target is a string and value is
|
||||||
|
not NULL.
|
||||||
|
|
||||||
|
* Other:
|
||||||
|
|
||||||
|
- Documentation typo fixes and clarifications.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.1
|
||||||
|
===========
|
||||||
|
|
||||||
|
Released 2011-06-10
|
||||||
|
|
||||||
|
* New features:
|
||||||
|
|
||||||
|
- `json_loadb()`: Decode a string with a given size, useful if the
|
||||||
|
string is not null terminated.
|
||||||
|
|
||||||
|
- Add ``JSON_ENCODE_ANY`` encoding flag to allow encoding any JSON
|
||||||
|
value. By default, only arrays and objects can be encoded. (#19)
|
||||||
|
|
||||||
|
- Add ``JSON_REJECT_DUPLICATES`` decoding flag to issue a decoding
|
||||||
|
error if any JSON object in the input contins duplicate keys. (#3)
|
||||||
|
|
||||||
|
- Add ``JSON_DISABLE_EOF_CHECK`` decoding flag to stop decoding after a
|
||||||
|
valid JSON input. This allows other data after the JSON data.
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
|
||||||
|
- Fix an additional memory leak when memory allocation fails in
|
||||||
|
`json_object_set()` and friends.
|
||||||
|
|
||||||
|
- Clear errno before calling `strtod()` for better portability. (#27)
|
||||||
|
|
||||||
|
* Building:
|
||||||
|
|
||||||
|
- Avoid set-but-not-used warning/error in a test. (#20)
|
||||||
|
|
||||||
|
* Other:
|
||||||
|
|
||||||
|
- Minor clarifications to documentation.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.0.1
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2011-03-31
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
|
||||||
|
- Replace a few `malloc()` and `free()` calls with their
|
||||||
|
counterparts that support custom memory management.
|
||||||
|
|
||||||
|
- Fix object key hashing in json_unpack() strict checking mode.
|
||||||
|
|
||||||
|
- Fix the parentheses in ``JANSSON_VERSION_HEX`` macro.
|
||||||
|
|
||||||
|
- Fix `json_object_size()` return value.
|
||||||
|
|
||||||
|
- Fix a few compilation issues.
|
||||||
|
|
||||||
|
* Portability:
|
||||||
|
|
||||||
|
- Enhance portability of `va_copy()`.
|
||||||
|
|
||||||
|
- Test framework portability enhancements.
|
||||||
|
|
||||||
|
* Documentation:
|
||||||
|
|
||||||
|
- Distribute ``doc/upgrading.rst`` with the source tarball.
|
||||||
|
|
||||||
|
- Build documentation in strict mode in ``make distcheck``.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
===========
|
||||||
|
|
||||||
|
Released 2011-02-28
|
||||||
|
|
||||||
|
This release is backwards incompatible with the 1.x release series.
|
||||||
|
See the chapter "Upgrading from older versions" in documentation for
|
||||||
|
details.
|
||||||
|
|
||||||
|
* Backwards incompatible changes:
|
||||||
|
|
||||||
|
- Unify unsigned integer usage in the API: All occurences of
|
||||||
|
unsigned int and unsigned long have been replaced with size_t.
|
||||||
|
|
||||||
|
- Change JSON integer's underlying type to the widest signed integer
|
||||||
|
type available, i.e. long long if it's supported, otherwise long.
|
||||||
|
Add a typedef json_int_t that defines the type.
|
||||||
|
|
||||||
|
- Change the maximum indentation depth to 31 spaces in encoder. This
|
||||||
|
frees up bits from the flags parameter of encoding functions
|
||||||
|
`json_dumpf()`, `json_dumps()` and `json_dump_file()`.
|
||||||
|
|
||||||
|
- For future needs, add a flags parameter to all decoding functions
|
||||||
|
`json_loadf()`, `json_loads()` and `json_load_file()`.
|
||||||
|
|
||||||
|
* New features
|
||||||
|
|
||||||
|
- `json_pack()`, `json_pack_ex()`, `json_vpack_ex()`: Create JSON
|
||||||
|
values based on a format string.
|
||||||
|
|
||||||
|
- `json_unpack()`, `json_unpack_ex()`, `json_vunpack_ex()`: Simple
|
||||||
|
value extraction and validation functionality based on a format
|
||||||
|
string.
|
||||||
|
|
||||||
|
- Add column, position and source fields to the ``json_error_t``
|
||||||
|
struct.
|
||||||
|
|
||||||
|
- Enhance error reporting in the decoder.
|
||||||
|
|
||||||
|
- ``JANSSON_VERSION`` et al.: Preprocessor constants that define the
|
||||||
|
library version.
|
||||||
|
|
||||||
|
- `json_set_alloc_funcs()`: Set custom memory allocation functions.
|
||||||
|
|
||||||
|
* Fix many portability issues, especially on Windows.
|
||||||
|
|
||||||
|
* Configuration
|
||||||
|
|
||||||
|
- Add file ``jansson_config.h`` that contains site specific
|
||||||
|
configuration. It's created automatically by the configure script,
|
||||||
|
or can be created by hand if the configure script cannot be used.
|
||||||
|
The file ``jansson_config.h.win32`` can be used without
|
||||||
|
modifications on Windows systems.
|
||||||
|
|
||||||
|
- Add a section to documentation describing how to build Jansson on
|
||||||
|
Windows.
|
||||||
|
|
||||||
|
- Documentation now requires Sphinx 1.0 or newer.
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.3
|
||||||
|
===========
|
||||||
|
|
||||||
|
Released 2010-06-13
|
||||||
|
|
||||||
|
* New functions:
|
||||||
|
|
||||||
|
- `json_object_iter_set()`, `json_object_iter_set_new()`: Change
|
||||||
|
object contents while iterating over it.
|
||||||
|
|
||||||
|
- `json_object_iter_at()`: Return an iterator that points to a
|
||||||
|
specific object item.
|
||||||
|
|
||||||
|
* New encoding flags:
|
||||||
|
|
||||||
|
- ``JSON_PRESERVE_ORDER``: Preserve the insertion order of object
|
||||||
|
keys.
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
|
||||||
|
- Fix an error that occured when an array or object was first
|
||||||
|
encoded as empty, then populated with some data, and then
|
||||||
|
re-encoded
|
||||||
|
|
||||||
|
- Fix the situation like above, but when the first encoding resulted
|
||||||
|
in an error
|
||||||
|
|
||||||
|
* Documentation:
|
||||||
|
|
||||||
|
- Clarify the documentation on reference stealing, providing an
|
||||||
|
example usage pattern
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.2.1
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2010-04-03
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
|
||||||
|
- Fix reference counting on ``true``, ``false`` and ``null``
|
||||||
|
- Estimate real number underflows in decoder with 0.0 instead of
|
||||||
|
issuing an error
|
||||||
|
|
||||||
|
* Portability:
|
||||||
|
|
||||||
|
- Make ``int32_t`` available on all systems
|
||||||
|
- Support compilers that don't have the ``inline`` keyword
|
||||||
|
- Require Autoconf 2.60 (for ``int32_t``)
|
||||||
|
|
||||||
|
* Tests:
|
||||||
|
|
||||||
|
- Print test names correctly when ``VERBOSE=1``
|
||||||
|
- ``test/suites/api``: Fail when a test fails
|
||||||
|
- Enhance tests for iterators
|
||||||
|
- Enhance tests for decoding texts that contain null bytes
|
||||||
|
|
||||||
|
* Documentation:
|
||||||
|
|
||||||
|
- Don't remove ``changes.rst`` in ``make clean``
|
||||||
|
- Add a chapter on RFC conformance
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.2
|
||||||
|
===========
|
||||||
|
|
||||||
|
Released 2010-01-21
|
||||||
|
|
||||||
|
* New functions:
|
||||||
|
|
||||||
|
- `json_equal()`: Test whether two JSON values are equal
|
||||||
|
- `json_copy()` and `json_deep_copy()`: Make shallow and deep copies
|
||||||
|
of JSON values
|
||||||
|
- Add a version of all functions taking a string argument that
|
||||||
|
doesn't check for valid UTF-8: `json_string_nocheck()`,
|
||||||
|
`json_string_set_nocheck()`, `json_object_set_nocheck()`,
|
||||||
|
`json_object_set_new_nocheck()`
|
||||||
|
|
||||||
|
* New encoding flags:
|
||||||
|
|
||||||
|
- ``JSON_SORT_KEYS``: Sort objects by key
|
||||||
|
- ``JSON_ENSURE_ASCII``: Escape all non-ASCII Unicode characters
|
||||||
|
- ``JSON_COMPACT``: Use a compact representation with all unneeded
|
||||||
|
whitespace stripped
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
|
||||||
|
- Revise and unify whitespace usage in encoder: Add spaces between
|
||||||
|
array and object items, never append newline to output.
|
||||||
|
- Remove const qualifier from the ``json_t`` parameter in
|
||||||
|
`json_string_set()`, `json_integer_set()` and `json_real_set`.
|
||||||
|
- Use ``int32_t`` internally for representing Unicode code points
|
||||||
|
(int is not enough on all platforms)
|
||||||
|
|
||||||
|
* Other changes:
|
||||||
|
|
||||||
|
- Convert ``CHANGES`` (this file) to reStructured text and add it to
|
||||||
|
HTML documentation
|
||||||
|
- The test system has been refactored. Python is no longer required
|
||||||
|
to run the tests.
|
||||||
|
- Documentation can now be built by invoking ``make html``
|
||||||
|
- Support for pkg-config
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.1.3
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2009-12-18
|
||||||
|
|
||||||
|
* Encode reals correctly, so that first encoding and then decoding a
|
||||||
|
real always produces the same value
|
||||||
|
* Don't export private symbols in ``libjansson.so``
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.1.2
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2009-11-08
|
||||||
|
|
||||||
|
* Fix a bug where an error message was not produced if the input file
|
||||||
|
could not be opened in `json_load_file()`
|
||||||
|
* Fix an assertion failure in decoder caused by a minus sign without a
|
||||||
|
digit after it
|
||||||
|
* Remove an unneeded include of ``stdint.h`` in ``jansson.h``
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.1.1
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2009-10-26
|
||||||
|
|
||||||
|
* All documentation files were not distributed with v1.1; build
|
||||||
|
documentation in make distcheck to prevent this in the future
|
||||||
|
* Fix v1.1 release date in ``CHANGES``
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.1
|
||||||
|
===========
|
||||||
|
|
||||||
|
Released 2009-10-20
|
||||||
|
|
||||||
|
* API additions and improvements:
|
||||||
|
|
||||||
|
- Extend array and object APIs
|
||||||
|
- Add functions to modify integer, real and string values
|
||||||
|
- Improve argument validation
|
||||||
|
- Use unsigned int instead of ``uint32_t`` for encoding flags
|
||||||
|
|
||||||
|
* Enhance documentation
|
||||||
|
|
||||||
|
- Add getting started guide and tutorial
|
||||||
|
- Fix some typos
|
||||||
|
- General clarifications and cleanup
|
||||||
|
|
||||||
|
* Check for integer and real overflows and underflows in decoder
|
||||||
|
* Make singleton values thread-safe (``true``, ``false`` and ``null``)
|
||||||
|
* Enhance circular reference handling
|
||||||
|
* Don't define ``-std=c99`` in ``AM_CFLAGS``
|
||||||
|
* Add C++ guards to ``jansson.h``
|
||||||
|
* Minor performance and portability improvements
|
||||||
|
* Expand test coverage
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.0.4
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2009-10-11
|
||||||
|
|
||||||
|
* Relax Autoconf version requirement to 2.59
|
||||||
|
* Make Jansson compile on platforms where plain ``char`` is unsigned
|
||||||
|
* Fix API tests for object
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.0.3
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2009-09-14
|
||||||
|
|
||||||
|
* Check for integer and real overflows and underflows in decoder
|
||||||
|
* Use the Python json module for tests, or simplejson if the json
|
||||||
|
module is not found
|
||||||
|
* Distribute changelog (this file)
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.0.2
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2009-09-08
|
||||||
|
|
||||||
|
* Handle EOF correctly in decoder
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.0.1
|
||||||
|
=============
|
||||||
|
|
||||||
|
Released 2009-09-04
|
||||||
|
|
||||||
|
* Fixed broken `json_is_boolean()`
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.0
|
||||||
|
===========
|
||||||
|
|
||||||
|
Released 2009-08-25
|
||||||
|
|
||||||
|
* Initial release
|
476
deps/jansson/CMakeLists.txt
vendored
Normal file
476
deps/jansson/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,476 @@
|
||||||
|
# Notes:
|
||||||
|
#
|
||||||
|
# Author: Paul Harris, June 2012
|
||||||
|
# Additions: Joakim Soderberg, Febuary 2013
|
||||||
|
#
|
||||||
|
# Supports: building static/shared, release/debug/etc, can also build html docs
|
||||||
|
# and some of the tests.
|
||||||
|
# Note that its designed for out-of-tree builds, so it will not pollute your
|
||||||
|
# source tree.
|
||||||
|
#
|
||||||
|
# TODO 1: Finish implementing tests. api tests are working, but the valgrind
|
||||||
|
# variants are not flagging problems.
|
||||||
|
#
|
||||||
|
# TODO 2: There is a check_exports script that would try and incorporate.
|
||||||
|
#
|
||||||
|
# TODO 3: Consolidate version numbers, currently the version number is written
|
||||||
|
# into: * cmake (here) * autotools (the configure) * source code header files.
|
||||||
|
# Should not be written directly into header files, autotools/cmake can do
|
||||||
|
# that job.
|
||||||
|
#
|
||||||
|
# Brief intro on how to use cmake:
|
||||||
|
# > mkdir build (somewhere - we do out-of-tree builds)
|
||||||
|
# > use cmake, ccmake, or cmake-gui to configure the project. for linux, you
|
||||||
|
# can only choose one variant: release,debug,etc... and static or shared.
|
||||||
|
# >> example:
|
||||||
|
# >> cd build
|
||||||
|
# >> ccmake -i ../path_to_jansson_dir
|
||||||
|
# >> inside, configure your options. press C until there are no lines
|
||||||
|
# with * next to them.
|
||||||
|
# >> note, I like to configure the 'install' path to ../install, so I get
|
||||||
|
# self-contained clean installs I can point other projects to.
|
||||||
|
# >> press G to 'generate' the project files.
|
||||||
|
# >> make (to build the project)
|
||||||
|
# >> make install
|
||||||
|
# >> make test (to run the tests, if you enabled them)
|
||||||
|
#
|
||||||
|
# Brief description on how it works:
|
||||||
|
# There is a small heirachy of CMakeLists.txt files which define how the
|
||||||
|
# project is built.
|
||||||
|
# Header file detection etc is done, and the results are written into config.h
|
||||||
|
# and jansson_config.h, which are generated from the corresponding
|
||||||
|
# config.h.cmake and jansson_config.h.cmake template files.
|
||||||
|
# The generated header files end up in the build directory - not in
|
||||||
|
# the source directory.
|
||||||
|
# The rest is down to the usual make process.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cmake_minimum_required (VERSION 2.8)
|
||||||
|
# required for exports? cmake_minimum_required (VERSION 2.8.6)
|
||||||
|
project (jansson C)
|
||||||
|
|
||||||
|
# Set some nicer output dirs.
|
||||||
|
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||||
|
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||||
|
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||||
|
|
||||||
|
# Give the debug version a different postfix for windows,
|
||||||
|
# so both the debug and release version can be built in the
|
||||||
|
# same build-tree on Windows (MSVC).
|
||||||
|
if (WIN32)
|
||||||
|
SET (CMAKE_DEBUG_POSTFIX "_d")
|
||||||
|
else (WIN32)
|
||||||
|
endif (WIN32)
|
||||||
|
|
||||||
|
# This is how I thought it should go
|
||||||
|
# set (JANSSON_VERSION "2.3.1")
|
||||||
|
# set (JANSSON_SOVERSION 2)
|
||||||
|
|
||||||
|
set(JANSSON_DISPLAY_VERSION "2.5")
|
||||||
|
|
||||||
|
# This is what is required to match the same numbers as automake's
|
||||||
|
set (JANSSON_VERSION "4.5.0")
|
||||||
|
set (JANSSON_SOVERSION 4)
|
||||||
|
|
||||||
|
# for CheckFunctionKeywords
|
||||||
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
|
include (CheckFunctionExists)
|
||||||
|
include (CheckFunctionKeywords)
|
||||||
|
include (CheckIncludeFiles)
|
||||||
|
include (CheckTypeSize)
|
||||||
|
include (CheckSymbolExists)
|
||||||
|
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
# Turn off Microsofts "security" warnings.
|
||||||
|
add_definitions( "/W3 /D_CRT_SECURE_NO_WARNINGS /wd4005 /wd4996 /nologo" )
|
||||||
|
|
||||||
|
# Disabled by OBS, options already set by top level CMakeLists
|
||||||
|
if (FALSE)
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "/MT")
|
||||||
|
set(CMAKE_C_FLAGS_DEBUG "/MTd")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT WIN32 AND NOT APPLE)
|
||||||
|
set(CMAKE_C_FLAGS "-fPIC")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Check for the int-type includes
|
||||||
|
check_include_files (sys/types.h HAVE_SYS_TYPES_H)
|
||||||
|
check_include_files (inttypes.h HAVE_INTTYPES_H)
|
||||||
|
check_include_files (stdint.h HAVE_STDINT_H)
|
||||||
|
|
||||||
|
|
||||||
|
# Check our 64 bit integer sizes
|
||||||
|
check_type_size (__int64 __INT64)
|
||||||
|
check_type_size (int64_t INT64_T)
|
||||||
|
check_type_size ("long long" LONG_LONG_INT)
|
||||||
|
|
||||||
|
# Check our 32 bit integer sizes
|
||||||
|
check_type_size (int32_t INT32_T)
|
||||||
|
check_type_size (__int32 __INT32)
|
||||||
|
check_type_size ("long" LONG_INT)
|
||||||
|
check_type_size ("int" INT)
|
||||||
|
|
||||||
|
if (HAVE_INT32_T)
|
||||||
|
set (JSON_INT32 int32_t)
|
||||||
|
elseif (HAVE___INT32)
|
||||||
|
set (JSON_INT32 __int32)
|
||||||
|
elseif (HAVE_LONG AND (${LONG_INT} EQUAL 4))
|
||||||
|
set (JSON_INT32 long)
|
||||||
|
elseif (HAVE_INT AND (${INT} EQUAL 4))
|
||||||
|
set (JSON_INT32 int)
|
||||||
|
else ()
|
||||||
|
message (FATAL_ERROR "Could not detect a valid 32 bit integer type")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Check for ssize_t and SSIZE_T existance.
|
||||||
|
check_type_size(ssize_t SSIZE_T)
|
||||||
|
check_type_size(SSIZE_T UPPERCASE_SSIZE_T)
|
||||||
|
if(NOT HAVE_SSIZE_T)
|
||||||
|
if(HAVE_UPPERCASE_SSIZE_T)
|
||||||
|
set(JSON_SSIZE SSIZE_T)
|
||||||
|
else()
|
||||||
|
set(JSON_SSIZE int)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
set(CMAKE_EXTRA_INCLUDE_FILES "")
|
||||||
|
|
||||||
|
# Check for all the variants of strtoll
|
||||||
|
check_function_exists (strtoll HAVE_STRTOLL)
|
||||||
|
check_function_exists (strtoq HAVE_STRTOQ)
|
||||||
|
check_function_exists (_strtoi64 HAVE__STRTOI64)
|
||||||
|
|
||||||
|
# Figure out what variant we should use
|
||||||
|
if (HAVE_STRTOLL)
|
||||||
|
set (JSON_STRTOINT strtoll)
|
||||||
|
elseif (HAVE_STRTOQ)
|
||||||
|
set (JSON_STRTOINT strtoq)
|
||||||
|
elseif (HAVE__STRTOI64)
|
||||||
|
set (JSON_STRTOINT _strtoi64)
|
||||||
|
else ()
|
||||||
|
# fallback to strtol (32 bit)
|
||||||
|
# this will set all the required variables
|
||||||
|
set (JSON_STRTOINT strtol)
|
||||||
|
set (JSON_INT_T long)
|
||||||
|
set (JSON_INTEGER_FORMAT "\"ld\"")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# if we haven't defined JSON_INT_T, then we have a 64 bit conversion function.
|
||||||
|
# detect what to use for the 64 bit type.
|
||||||
|
# Note: I will prefer long long if I can get it, as that is what the automake system aimed for.
|
||||||
|
if (NOT DEFINED JSON_INT_T)
|
||||||
|
if (HAVE_LONG_LONG_INT AND (${LONG_LONG_INT} EQUAL 8))
|
||||||
|
set (JSON_INT_T "long long")
|
||||||
|
elseif (HAVE_INT64_T)
|
||||||
|
set (JSON_INT_T int64_t)
|
||||||
|
elseif (HAVE___INT64)
|
||||||
|
set (JSON_INT_T __int64)
|
||||||
|
else ()
|
||||||
|
message (FATAL_ERROR "Could not detect 64 bit type, although I detected the strtoll equivalent")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Apparently, Borland BCC and MSVC wants I64d,
|
||||||
|
# Borland BCC could also accept LD
|
||||||
|
# and gcc wants ldd,
|
||||||
|
# I am not sure what cygwin will want, so I will assume I64d
|
||||||
|
|
||||||
|
if (WIN32) # matches both msvc and cygwin
|
||||||
|
set (JSON_INTEGER_FORMAT "\"I64d\"")
|
||||||
|
else ()
|
||||||
|
set (JSON_INTEGER_FORMAT "\"lld\"")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
# If locale.h and localeconv() are available, define to 1, otherwise to 0.
|
||||||
|
check_include_files (locale.h HAVE_LOCALE_H)
|
||||||
|
check_function_exists (localeconv HAVE_LOCALECONV)
|
||||||
|
|
||||||
|
if (HAVE_LOCALECONV AND HAVE_LOCALE_H)
|
||||||
|
set (JSON_HAVE_LOCALECONV 1)
|
||||||
|
else ()
|
||||||
|
set (JSON_HAVE_LOCALECONV 0)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
# check if we have setlocale
|
||||||
|
check_function_exists (setlocale HAVE_SETLOCALE)
|
||||||
|
|
||||||
|
|
||||||
|
# Check what the inline keyword is.
|
||||||
|
# Note that the original JSON_INLINE was always set to just 'inline', so this goes further.
|
||||||
|
check_function_keywords("inline")
|
||||||
|
check_function_keywords("__inline")
|
||||||
|
check_function_keywords("__inline__")
|
||||||
|
|
||||||
|
if (HAVE_INLINE)
|
||||||
|
set (JSON_INLINE inline)
|
||||||
|
elseif (HAVE___INLINE)
|
||||||
|
set (JSON_INLINE __inline)
|
||||||
|
elseif (HAVE___INLINE__)
|
||||||
|
set (JSON_INLINE __inline__)
|
||||||
|
else (HAVE_INLINE)
|
||||||
|
# no inline on this platform
|
||||||
|
set (JSON_INLINE)
|
||||||
|
endif (HAVE_INLINE)
|
||||||
|
|
||||||
|
# Find our snprintf
|
||||||
|
check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
|
||||||
|
check_symbol_exists(_snprintf "stdio.h" HAVE__SNPRINTF)
|
||||||
|
|
||||||
|
if (HAVE_SNPRINTF)
|
||||||
|
set (JSON_SNPRINTF snprintf)
|
||||||
|
elseif (HAVE__SNPRINTF)
|
||||||
|
set (JSON_SNPRINTF _snprintf)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Create pkg-conf file.
|
||||||
|
# (We use the same files as ./configure does, so we
|
||||||
|
# have to defined the same variables used there).
|
||||||
|
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||||
|
set(CMAKE_INSTALL_LIBDIR lib)
|
||||||
|
endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||||
|
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||||
|
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||||
|
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
||||||
|
set(VERSION ${JANSSON_DISPLAY_VERSION})
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/jansson.pc.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/jansson.pc @ONLY)
|
||||||
|
|
||||||
|
# configure the public config file
|
||||||
|
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/cmake/jansson_config.h.cmake
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/include/jansson_config.h)
|
||||||
|
|
||||||
|
# Copy the jansson.h file to the public include folder
|
||||||
|
file (COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/jansson.h
|
||||||
|
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||||
|
|
||||||
|
|
||||||
|
# configure the private config file
|
||||||
|
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.cmake
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/private_include/config.h)
|
||||||
|
|
||||||
|
# and tell the source code to include it
|
||||||
|
add_definitions (-DHAVE_CONFIG_H)
|
||||||
|
|
||||||
|
include_directories (${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||||
|
include_directories (${CMAKE_CURRENT_BINARY_DIR}/private_include)
|
||||||
|
|
||||||
|
# Add the lib sources.
|
||||||
|
file (GLOB C_FILES src/*.c)
|
||||||
|
|
||||||
|
# Disabled by OBS, we use it as a static library
|
||||||
|
if (FALSE)
|
||||||
|
|
||||||
|
add_library (jansson SHARED ${C_FILES} src/jansson.def)
|
||||||
|
|
||||||
|
set_target_properties (jansson PROPERTIES
|
||||||
|
VERSION ${JANSSON_VERSION}
|
||||||
|
SOVERSION ${JANSSON_SOVERSION})
|
||||||
|
|
||||||
|
else ()
|
||||||
|
|
||||||
|
add_library (jansson ${C_FILES})
|
||||||
|
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# LIBRARY for linux
|
||||||
|
# RUNTIME for windows (when building shared)
|
||||||
|
#install (TARGETS jansson
|
||||||
|
# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
# RUNTIME DESTINATION bin
|
||||||
|
#)
|
||||||
|
|
||||||
|
#install (FILES
|
||||||
|
# ${CMAKE_CURRENT_BINARY_DIR}/include/jansson_config.h
|
||||||
|
# ${CMAKE_CURRENT_SOURCE_DIR}/src/jansson.h
|
||||||
|
# DESTINATION include)
|
||||||
|
|
||||||
|
#install (FILES
|
||||||
|
# ${CMAKE_CURRENT_BINARY_DIR}/jansson.pc
|
||||||
|
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||||
|
|
||||||
|
# For building Documentation (uses Sphinx)
|
||||||
|
# OPTION (BUILD_DOCS "Build documentation (uses python-sphinx)." ON)
|
||||||
|
# Disabled by OBS
|
||||||
|
if (FALSE)
|
||||||
|
find_package(Sphinx)
|
||||||
|
|
||||||
|
if (NOT SPHINX_FOUND)
|
||||||
|
message(WARNING "Sphinx not found. Cannot generate documentation!
|
||||||
|
Set -DBUILD_DOCS=0 to get rid of this message.")
|
||||||
|
else()
|
||||||
|
if (Sphinx_VERSION_STRING VERSION_LESS 1.0)
|
||||||
|
message(WARNING "Your Sphinx version is too old!
|
||||||
|
This project requires Sphinx v1.0 or above to produce
|
||||||
|
proper documentation (you have v${Sphinx_VERSION_STRING}).
|
||||||
|
You will get output but it will have errors.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# configured documentation tools and intermediate build results
|
||||||
|
set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")
|
||||||
|
|
||||||
|
# Sphinx cache with pickled ReST documents
|
||||||
|
set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
|
||||||
|
|
||||||
|
# CMake could be used to build the conf.py file too,
|
||||||
|
# eg it could automatically write the version of the program or change the theme.
|
||||||
|
# if(NOT DEFINED SPHINX_THEME)
|
||||||
|
# set(SPHINX_THEME default)
|
||||||
|
# endif()
|
||||||
|
#
|
||||||
|
# if(NOT DEFINED SPHINX_THEME_DIR)
|
||||||
|
# set(SPHINX_THEME_DIR)
|
||||||
|
# endif()
|
||||||
|
#
|
||||||
|
# configure_file(
|
||||||
|
# "${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
|
||||||
|
# "${BINARY_BUILD_DIR}/conf.py"
|
||||||
|
# @ONLY)
|
||||||
|
|
||||||
|
# TODO: Add support for all sphinx builders: http://sphinx-doc.org/builders.html
|
||||||
|
|
||||||
|
# Add documentation targets.
|
||||||
|
set(DOC_TARGETS html)
|
||||||
|
|
||||||
|
OPTION(BUILD_MAN "Create a target for building man pages." ON)
|
||||||
|
|
||||||
|
if (BUILD_MAN)
|
||||||
|
if (Sphinx_VERSION_STRING VERSION_LESS 1.0)
|
||||||
|
message(WARNING "Sphinx version 1.0 > is required to build man pages. You have v${Sphinx_VERSION_STRING}.")
|
||||||
|
else()
|
||||||
|
list(APPEND DOC_TARGETS man)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
OPTION(BUILD_LATEX "Create a target for building latex docs (to create PDF)." OFF)
|
||||||
|
|
||||||
|
if (BUILD_LATEX)
|
||||||
|
find_package(LATEX)
|
||||||
|
|
||||||
|
if (NOT LATEX_COMPILER)
|
||||||
|
message("Couldn't find Latex, can't build latex docs using Sphinx")
|
||||||
|
else()
|
||||||
|
message("Latex found! If you have problems building, see Sphinx documentation for required Latex packages.")
|
||||||
|
list(APPEND DOC_TARGETS latex)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# The doc target will build all documentation targets.
|
||||||
|
add_custom_target(doc)
|
||||||
|
|
||||||
|
foreach (DOC_TARGET ${DOC_TARGETS})
|
||||||
|
add_custom_target(${DOC_TARGET}
|
||||||
|
${SPHINX_EXECUTABLE}
|
||||||
|
# -q # Enable for quiet mode
|
||||||
|
-b ${DOC_TARGET}
|
||||||
|
-d "${SPHINX_CACHE_DIR}"
|
||||||
|
# -c "${BINARY_BUILD_DIR}" # enable if using cmake-generated conf.py
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/doc"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/doc/${DOC_TARGET}"
|
||||||
|
COMMENT "Building ${DOC_TARGET} documentation with Sphinx")
|
||||||
|
|
||||||
|
add_dependencies(doc ${DOC_TARGET})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
message("Building documentation enabled for: ${DOC_TARGETS}")
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Disabled by OBS, we don't test this.
|
||||||
|
if (FALSE)
|
||||||
|
OPTION (TEST_WITH_VALGRIND "Enable valgrind tests." OFF)
|
||||||
|
|
||||||
|
ENABLE_TESTING()
|
||||||
|
|
||||||
|
if (TEST_WITH_VALGRIND)
|
||||||
|
# TODO: Add FindValgrind.cmake instead of having a hardcoded path.
|
||||||
|
|
||||||
|
# enable valgrind
|
||||||
|
set(CMAKE_MEMORYCHECK_COMMAND valgrind)
|
||||||
|
set(CMAKE_MEMORYCHECK_COMMAND_OPTIONS
|
||||||
|
"--leak-check=full --show-reachable=yes --track-origins=yes -q")
|
||||||
|
|
||||||
|
set(MEMCHECK_COMMAND
|
||||||
|
"${CMAKE_MEMORYCHECK_COMMAND} ${CMAKE_MEMORYCHECK_COMMAND_OPTIONS}")
|
||||||
|
separate_arguments(MEMCHECK_COMMAND)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
#
|
||||||
|
# Test suites.
|
||||||
|
#
|
||||||
|
if (CMAKE_COMPILER_IS_GNUCC)
|
||||||
|
add_definitions(-Wall -Wextra -Wdeclaration-after-statement)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set(api_tests
|
||||||
|
test_array
|
||||||
|
test_copy
|
||||||
|
test_dump
|
||||||
|
test_dump_callback
|
||||||
|
test_equal
|
||||||
|
test_load
|
||||||
|
test_loadb
|
||||||
|
test_number
|
||||||
|
test_object
|
||||||
|
test_pack
|
||||||
|
test_simple
|
||||||
|
test_unpack)
|
||||||
|
|
||||||
|
# Doing arithmetic on void pointers is not allowed by Microsofts compiler
|
||||||
|
# such as secure_malloc and secure_free is doing, so exclude it for now.
|
||||||
|
if (NOT MSVC)
|
||||||
|
list(APPEND api_tests test_memory_funcs)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Helper macro for building and linking a test program.
|
||||||
|
macro(build_testprog name dir)
|
||||||
|
add_executable(${name} ${dir}/${name}.c)
|
||||||
|
add_dependencies(${name} jansson)
|
||||||
|
target_link_libraries(${name} jansson)
|
||||||
|
endmacro(build_testprog)
|
||||||
|
|
||||||
|
# Create executables and tests/valgrind tests for API tests.
|
||||||
|
foreach (test ${api_tests})
|
||||||
|
build_testprog(${test} ${PROJECT_SOURCE_DIR}/test/suites/api)
|
||||||
|
add_test(${test} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${test})
|
||||||
|
|
||||||
|
if (TEST_WITH_VALGRIND)
|
||||||
|
add_test(memcheck_${test} ${MEMCHECK_COMMAND}
|
||||||
|
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${test})
|
||||||
|
endif ()
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
# Test harness for the suites tests.
|
||||||
|
build_testprog(json_process ${PROJECT_SOURCE_DIR}/test/bin)
|
||||||
|
|
||||||
|
set(SUITES encoding-flags valid invalid invalid-unicode)
|
||||||
|
foreach (SUITE ${SUITES})
|
||||||
|
file(GLOB TESTDIRS ${jansson_SOURCE_DIR}/test/suites/${SUITE}/*)
|
||||||
|
foreach (TESTDIR ${TESTDIRS})
|
||||||
|
if (IS_DIRECTORY ${TESTDIR})
|
||||||
|
get_filename_component(TNAME ${TESTDIR} NAME)
|
||||||
|
add_test(${SUITE}__${TNAME}
|
||||||
|
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/json_process ${TESTDIR})
|
||||||
|
if ((${SUITE} STREQUAL "valid" OR ${SUITE} STREQUAL "invalid") AND NOT EXISTS ${TESTDIR}/nostrip)
|
||||||
|
add_test(${SUITE}__${TNAME}__strip
|
||||||
|
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/json_process --strip ${TESTDIR})
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
endforeach ()
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
|
||||||
|
DEPENDS json_process ${api_tests})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
target_include_directories(jansson
|
||||||
|
PUBLIC src "${CMAKE_CURRENT_BINARY_DIR}/include")
|
49
deps/jansson/CleanSpec.mk
vendored
Normal file
49
deps/jansson/CleanSpec.mk
vendored
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# Copyright (C) 2007 The Android Open Source Project
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
# If you don't need to do a full clean build but would like to touch
|
||||||
|
# a file or delete some intermediate files, add a clean step to the end
|
||||||
|
# of the list. These steps will only be run once, if they haven't been
|
||||||
|
# run before.
|
||||||
|
#
|
||||||
|
# E.g.:
|
||||||
|
# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
|
||||||
|
# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
|
||||||
|
#
|
||||||
|
# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
|
||||||
|
# files that are missing or have been moved.
|
||||||
|
#
|
||||||
|
# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
|
||||||
|
# Use $(OUT_DIR) to refer to the "out" directory.
|
||||||
|
#
|
||||||
|
# If you need to re-do something that's already mentioned, just copy
|
||||||
|
# the command and add it to the bottom of the list. E.g., if a change
|
||||||
|
# that you made last week required touching a file and a change you
|
||||||
|
# made today requires touching the same file, just copy the old
|
||||||
|
# touch step and add it to the end of the list.
|
||||||
|
#
|
||||||
|
# ************************************************
|
||||||
|
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
|
||||||
|
# ************************************************
|
||||||
|
|
||||||
|
# For example:
|
||||||
|
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
|
||||||
|
#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
|
||||||
|
#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
|
||||||
|
#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
|
||||||
|
|
||||||
|
# ************************************************
|
||||||
|
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
|
||||||
|
# ************************************************
|
19
deps/jansson/LICENSE
vendored
Normal file
19
deps/jansson/LICENSE
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
Copyright (c) 2009-2013 Petri Lehtinen <petri@digip.org>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
15
deps/jansson/Makefile.am
vendored
Normal file
15
deps/jansson/Makefile.am
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
EXTRA_DIST = CHANGES LICENSE README.rst win32 CMakeLists.txt cmake
|
||||||
|
SUBDIRS = doc src test
|
||||||
|
|
||||||
|
# "make distcheck" builds the dvi target, so use it to check that the
|
||||||
|
# documentation is built correctly.
|
||||||
|
dvi:
|
||||||
|
$(MAKE) SPHINXOPTS_EXTRA=-W html
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = jansson.pc
|
||||||
|
|
||||||
|
if GCC
|
||||||
|
# These flags are gcc specific
|
||||||
|
export AM_CFLAGS = -Wall -Wextra -Wdeclaration-after-statement
|
||||||
|
endif
|
63
deps/jansson/README.rst
vendored
Normal file
63
deps/jansson/README.rst
vendored
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
Jansson README
|
||||||
|
==============
|
||||||
|
|
||||||
|
.. image:: https://travis-ci.org/akheron/jansson.png
|
||||||
|
:alt: Build status
|
||||||
|
:target: https://travis-ci.org/akheron/jansson
|
||||||
|
|
||||||
|
Jansson_ is a C library for encoding, decoding and manipulating JSON
|
||||||
|
data. Its main features and design principles are:
|
||||||
|
|
||||||
|
- Simple and intuitive API and data model
|
||||||
|
|
||||||
|
- Comprehensive documentation
|
||||||
|
|
||||||
|
- No dependencies on other libraries
|
||||||
|
|
||||||
|
- Full Unicode support (UTF-8)
|
||||||
|
|
||||||
|
- Extensive test suite
|
||||||
|
|
||||||
|
Jansson is licensed under the `MIT license`_; see LICENSE in the
|
||||||
|
source distribution for details.
|
||||||
|
|
||||||
|
|
||||||
|
Compilation and Installation
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
If you obtained a source tarball, just use the standard autotools
|
||||||
|
commands::
|
||||||
|
|
||||||
|
$ ./configure
|
||||||
|
$ make
|
||||||
|
$ make install
|
||||||
|
|
||||||
|
To run the test suite, invoke::
|
||||||
|
|
||||||
|
$ make check
|
||||||
|
|
||||||
|
If the source has been checked out from a Git repository, the
|
||||||
|
./configure script has to be generated first. The easiest way is to
|
||||||
|
use autoreconf::
|
||||||
|
|
||||||
|
$ autoreconf -i
|
||||||
|
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Prebuilt HTML documentation is available at
|
||||||
|
http://www.digip.org/jansson/doc/.
|
||||||
|
|
||||||
|
The documentation source is in the ``doc/`` subdirectory. To generate
|
||||||
|
HTML documentation, invoke::
|
||||||
|
|
||||||
|
$ make html
|
||||||
|
|
||||||
|
Then, point your browser to ``doc/_build/html/index.html``. Sphinx_
|
||||||
|
1.0 or newer is required to generate the documentation.
|
||||||
|
|
||||||
|
|
||||||
|
.. _Jansson: http://www.digip.org/jansson/
|
||||||
|
.. _`MIT license`: http://www.opensource.org/licenses/mit-license.php
|
||||||
|
.. _Sphinx: http://sphinx.pocoo.org/
|
39
deps/jansson/android/jansson_config.h
vendored
Normal file
39
deps/jansson/android/jansson_config.h
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2010-2013 Petri Lehtinen <petri@digip.org>
|
||||||
|
*
|
||||||
|
* Jansson is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* This file specifies a part of the site-specific configuration for
|
||||||
|
* Jansson, namely those things that affect the public API in
|
||||||
|
* jansson.h.
|
||||||
|
*
|
||||||
|
* The configure script copies this file to jansson_config.h and
|
||||||
|
* replaces @var@ substitutions by values that fit your system. If you
|
||||||
|
* cannot run the configure script, you can do the value substitution
|
||||||
|
* by hand.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef JANSSON_CONFIG_H
|
||||||
|
#define JANSSON_CONFIG_H
|
||||||
|
|
||||||
|
/* If your compiler supports the inline keyword in C, JSON_INLINE is
|
||||||
|
defined to `inline', otherwise empty. In C++, the inline is always
|
||||||
|
supported. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define JSON_INLINE inline
|
||||||
|
#else
|
||||||
|
#define JSON_INLINE inline
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* If your compiler supports the `long long` type and the strtoll()
|
||||||
|
library function, JSON_INTEGER_IS_LONG_LONG is defined to 1,
|
||||||
|
otherwise to 0. */
|
||||||
|
#define JSON_INTEGER_IS_LONG_LONG 1
|
||||||
|
|
||||||
|
/* If locale.h and localeconv() are available, define to 1,
|
||||||
|
otherwise to 0. */
|
||||||
|
#define JSON_HAVE_LOCALECONV 0
|
||||||
|
|
||||||
|
#endif
|
15
deps/jansson/cmake/CheckFunctionKeywords.cmake
vendored
Normal file
15
deps/jansson/cmake/CheckFunctionKeywords.cmake
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
|
||||||
|
macro(check_function_keywords _wordlist)
|
||||||
|
set(${_result} "")
|
||||||
|
foreach(flag ${_wordlist})
|
||||||
|
string(REGEX REPLACE "[-+/ ()]" "_" flagname "${flag}")
|
||||||
|
string(TOUPPER "${flagname}" flagname)
|
||||||
|
set(have_flag "HAVE_${flagname}")
|
||||||
|
check_c_source_compiles("${flag} void func(); void func() { } int main() { func(); return 0; }" ${have_flag})
|
||||||
|
if(${have_flag} AND NOT ${_result})
|
||||||
|
set(${_result} "${flag}")
|
||||||
|
# break()
|
||||||
|
endif(${have_flag} AND NOT ${_result})
|
||||||
|
endforeach(flag)
|
||||||
|
endmacro(check_function_keywords)
|
301
deps/jansson/cmake/FindSphinx.cmake
vendored
Normal file
301
deps/jansson/cmake/FindSphinx.cmake
vendored
Normal file
|
@ -0,0 +1,301 @@
|
||||||
|
#
|
||||||
|
# PART B. DOWNLOADING AGREEMENT - LICENSE FROM SBIA WITH RIGHT TO SUBLICENSE ("SOFTWARE LICENSE").
|
||||||
|
# ------------------------------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# 1. As used in this Software License, "you" means the individual downloading and/or
|
||||||
|
# using, reproducing, modifying, displaying and/or distributing the Software and
|
||||||
|
# the institution or entity which employs or is otherwise affiliated with such
|
||||||
|
# individual in connection therewith. The Section of Biomedical Image Analysis,
|
||||||
|
# Department of Radiology at the Universiy of Pennsylvania ("SBIA") hereby grants
|
||||||
|
# you, with right to sublicense, with respect to SBIA's rights in the software,
|
||||||
|
# and data, if any, which is the subject of this Software License (collectively,
|
||||||
|
# the "Software"), a royalty-free, non-exclusive license to use, reproduce, make
|
||||||
|
# derivative works of, display and distribute the Software, provided that:
|
||||||
|
# (a) you accept and adhere to all of the terms and conditions of this Software
|
||||||
|
# License; (b) in connection with any copy of or sublicense of all or any portion
|
||||||
|
# of the Software, all of the terms and conditions in this Software License shall
|
||||||
|
# appear in and shall apply to such copy and such sublicense, including without
|
||||||
|
# limitation all source and executable forms and on any user documentation,
|
||||||
|
# prefaced with the following words: "All or portions of this licensed product
|
||||||
|
# (such portions are the "Software") have been obtained under license from the
|
||||||
|
# Section of Biomedical Image Analysis, Department of Radiology at the University
|
||||||
|
# of Pennsylvania and are subject to the following terms and conditions:"
|
||||||
|
# (c) you preserve and maintain all applicable attributions, copyright notices
|
||||||
|
# and licenses included in or applicable to the Software; (d) modified versions
|
||||||
|
# of the Software must be clearly identified and marked as such, and must not
|
||||||
|
# be misrepresented as being the original Software; and (e) you consider making,
|
||||||
|
# but are under no obligation to make, the source code of any of your modifications
|
||||||
|
# to the Software freely available to others on an open source basis.
|
||||||
|
#
|
||||||
|
# 2. The license granted in this Software License includes without limitation the
|
||||||
|
# right to (i) incorporate the Software into proprietary programs (subject to
|
||||||
|
# any restrictions applicable to such programs), (ii) add your own copyright
|
||||||
|
# statement to your modifications of the Software, and (iii) provide additional
|
||||||
|
# or different license terms and conditions in your sublicenses of modifications
|
||||||
|
# of the Software; provided that in each case your use, reproduction or
|
||||||
|
# distribution of such modifications otherwise complies with the conditions
|
||||||
|
# stated in this Software License.
|
||||||
|
#
|
||||||
|
# 3. This Software License does not grant any rights with respect to third party
|
||||||
|
# software, except those rights that SBIA has been authorized by a third
|
||||||
|
# party to grant to you, and accordingly you are solely responsible for
|
||||||
|
# (i) obtaining any permissions from third parties that you need to use,
|
||||||
|
# reproduce, make derivative works of, display and distribute the Software,
|
||||||
|
# and (ii) informing your sublicensees, including without limitation your
|
||||||
|
# end-users, of their obligations to secure any such required permissions.
|
||||||
|
#
|
||||||
|
# 4. The Software has been designed for research purposes only and has not been
|
||||||
|
# reviewed or approved by the Food and Drug Administration or by any other
|
||||||
|
# agency. YOU ACKNOWLEDGE AND AGREE THAT CLINICAL APPLICATIONS ARE NEITHER
|
||||||
|
# RECOMMENDED NOR ADVISED. Any commercialization of the Software is at the
|
||||||
|
# sole risk of the party or parties engaged in such commercialization.
|
||||||
|
# You further agree to use, reproduce, make derivative works of, display
|
||||||
|
# and distribute the Software in compliance with all applicable governmental
|
||||||
|
# laws, regulations and orders, including without limitation those relating
|
||||||
|
# to export and import control.
|
||||||
|
#
|
||||||
|
# 5. The Software is provided "AS IS" and neither SBIA nor any contributor to
|
||||||
|
# the software (each a "Contributor") shall have any obligation to provide
|
||||||
|
# maintenance, support, updates, enhancements or modifications thereto.
|
||||||
|
# SBIA AND ALL CONTRIBUTORS SPECIFICALLY DISCLAIM ALL EXPRESS AND IMPLIED
|
||||||
|
# WARRANTIES OF ANY KIND INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF
|
||||||
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
||||||
|
# IN NO EVENT SHALL SBIA OR ANY CONTRIBUTOR BE LIABLE TO ANY PARTY FOR
|
||||||
|
# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES
|
||||||
|
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ARISING IN ANY WAY RELATED
|
||||||
|
# TO THE SOFTWARE, EVEN IF SBIA OR ANY CONTRIBUTOR HAS BEEN ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGES. TO THE MAXIMUM EXTENT NOT PROHIBITED BY LAW OR
|
||||||
|
# REGULATION, YOU FURTHER ASSUME ALL LIABILITY FOR YOUR USE, REPRODUCTION,
|
||||||
|
# MAKING OF DERIVATIVE WORKS, DISPLAY, LICENSE OR DISTRIBUTION OF THE SOFTWARE
|
||||||
|
# AND AGREE TO INDEMNIFY AND HOLD HARMLESS SBIA AND ALL CONTRIBUTORS FROM
|
||||||
|
# AND AGAINST ANY AND ALL CLAIMS, SUITS, ACTIONS, DEMANDS AND JUDGMENTS ARISING
|
||||||
|
# THEREFROM.
|
||||||
|
#
|
||||||
|
# 6. None of the names, logos or trademarks of SBIA or any of SBIA's affiliates
|
||||||
|
# or any of the Contributors, or any funding agency, may be used to endorse
|
||||||
|
# or promote products produced in whole or in part by operation of the Software
|
||||||
|
# or derived from or based on the Software without specific prior written
|
||||||
|
# permission from the applicable party.
|
||||||
|
#
|
||||||
|
# 7. Any use, reproduction or distribution of the Software which is not in accordance
|
||||||
|
# with this Software License shall automatically revoke all rights granted to you
|
||||||
|
# under this Software License and render Paragraphs 1 and 2 of this Software
|
||||||
|
# License null and void.
|
||||||
|
#
|
||||||
|
# 8. This Software License does not grant any rights in or to any intellectual
|
||||||
|
# property owned by SBIA or any Contributor except those rights expressly
|
||||||
|
# granted hereunder.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# PART C. MISCELLANEOUS
|
||||||
|
# ---------------------
|
||||||
|
#
|
||||||
|
# This Agreement shall be governed by and construed in accordance with the laws
|
||||||
|
# of The Commonwealth of Pennsylvania without regard to principles of conflicts
|
||||||
|
# of law. This Agreement shall supercede and replace any license terms that you
|
||||||
|
# may have agreed to previously with respect to Software from SBIA.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
# @file FindSphinx.cmake
|
||||||
|
# @brief Find Sphinx documentation build tools.
|
||||||
|
#
|
||||||
|
# @par Input variables:
|
||||||
|
# <table border="0">
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx_DIR @endtp
|
||||||
|
# <td>Installation directory of Sphinx tools. Can also be set as environment variable.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b SPHINX_DIR @endtp
|
||||||
|
# <td>Alternative environment variable for @c Sphinx_DIR.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx_FIND_COMPONENTS @endtp
|
||||||
|
# <td>Sphinx build tools to look for, i.e., 'apidoc' and/or 'build'.</td>
|
||||||
|
# </tr>
|
||||||
|
# </table>
|
||||||
|
#
|
||||||
|
# @par Output variables:
|
||||||
|
# <table border="0">
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx_FOUND @endtp
|
||||||
|
# <td>Whether all or only the requested Sphinx build tools were found.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b SPHINX_FOUND @endtp
|
||||||
|
# <td>Alias for @c Sphinx_FOUND.<td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b SPHINX_EXECUTABLE @endtp
|
||||||
|
# <td>Non-cached alias for @c Sphinx-build_EXECUTABLE.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx_PYTHON_EXECUTABLE @endtp
|
||||||
|
# <td>Python executable used to run sphinx-build. This is either the
|
||||||
|
# by default found Python interpreter or a specific version as
|
||||||
|
# specified by the shebang (#!) of the sphinx-build script.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx_PYTHON_OPTIONS @endtp
|
||||||
|
# <td>A list of Python options extracted from the shebang (#!) of the
|
||||||
|
# sphinx-build script. The -E option is added by this module
|
||||||
|
# if the Python executable is not the system default to avoid
|
||||||
|
# problems with a differing setting of the @c PYTHONHOME.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx-build_EXECUTABLE @endtp
|
||||||
|
# <td>Absolute path of the found sphinx-build tool.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx-apidoc_EXECUTABLE @endtp
|
||||||
|
# <td>Absolute path of the found sphinx-apidoc tool.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx_VERSION_STRING @endtp
|
||||||
|
# <td>Sphinx version found e.g. 1.1.2.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx_VERSION_MAJOR @endtp
|
||||||
|
# <td>Sphinx major version found e.g. 1.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx_VERSION_MINOR @endtp
|
||||||
|
# <td>Sphinx minor version found e.g. 1.</td>
|
||||||
|
# </tr>
|
||||||
|
# <tr>
|
||||||
|
# @tp @b Sphinx_VERSION_PATCH @endtp
|
||||||
|
# <td>Sphinx patch version found e.g. 2.</td>
|
||||||
|
# </tr>
|
||||||
|
# </table>
|
||||||
|
#
|
||||||
|
# @ingroup CMakeFindModules
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
set (_Sphinx_REQUIRED_VARS)
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# initialize search
|
||||||
|
if (NOT Sphinx_DIR)
|
||||||
|
if (NOT $ENV{Sphinx_DIR} STREQUAL "")
|
||||||
|
set (Sphinx_DIR "$ENV{Sphinx_DIR}" CACHE PATH "Installation prefix of Sphinx (docutils)." FORCE)
|
||||||
|
else ()
|
||||||
|
set (Sphinx_DIR "$ENV{SPHINX_DIR}" CACHE PATH "Installation prefix of Sphinx (docutils)." FORCE)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# default components to look for
|
||||||
|
if (NOT Sphinx_FIND_COMPONENTS)
|
||||||
|
set (Sphinx_FIND_COMPONENTS "build")
|
||||||
|
elseif (NOT Sphinx_FIND_COMPONENTS MATCHES "^(build|apidoc)$")
|
||||||
|
message (FATAL_ERROR "Invalid Sphinx component in: ${Sphinx_FIND_COMPONENTS}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# find components, i.e., build tools
|
||||||
|
foreach (_Sphinx_TOOL IN LISTS Sphinx_FIND_COMPONENTS)
|
||||||
|
if (Sphinx_DIR)
|
||||||
|
find_program (
|
||||||
|
Sphinx-${_Sphinx_TOOL}_EXECUTABLE
|
||||||
|
NAMES sphinx-${_Sphinx_TOOL} sphinx-${_Sphinx_TOOL}.py
|
||||||
|
HINTS "${Sphinx_DIR}"
|
||||||
|
PATH_SUFFIXES bin
|
||||||
|
DOC "The sphinx-${_Sphinx_TOOL} Python script."
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
else ()
|
||||||
|
find_program (
|
||||||
|
Sphinx-${_Sphinx_TOOL}_EXECUTABLE
|
||||||
|
NAMES sphinx-${_Sphinx_TOOL} sphinx-${_Sphinx_TOOL}.py
|
||||||
|
DOC "The sphinx-${_Sphinx_TOOL} Python script."
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
mark_as_advanced (Sphinx-${_Sphinx_TOOL}_EXECUTABLE)
|
||||||
|
list (APPEND _Sphinx_REQUIRED_VARS Sphinx-${_Sphinx_TOOL}_EXECUTABLE)
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# determine Python executable used by Sphinx
|
||||||
|
if (Sphinx-build_EXECUTABLE)
|
||||||
|
# extract python executable from shebang of sphinx-build
|
||||||
|
find_package (PythonInterp QUIET)
|
||||||
|
set (Sphinx_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
|
||||||
|
set (Sphinx_PYTHON_OPTIONS)
|
||||||
|
file (STRINGS "${Sphinx-build_EXECUTABLE}" FIRST_LINE LIMIT_COUNT 1)
|
||||||
|
if (FIRST_LINE MATCHES "^#!(.*/python.*)") # does not match "#!/usr/bin/env python" !
|
||||||
|
string (REGEX REPLACE "^ +| +$" "" Sphinx_PYTHON_EXECUTABLE "${CMAKE_MATCH_1}")
|
||||||
|
if (Sphinx_PYTHON_EXECUTABLE MATCHES "([^ ]+) (.*)")
|
||||||
|
set (Sphinx_PYTHON_EXECUTABLE "${CMAKE_MATCH_1}")
|
||||||
|
string (REGEX REPLACE " +" ";" Sphinx_PYTHON_OPTIONS "${CMAKE_MATCH_2}")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
# this is done to avoid problems with multiple Python versions being installed
|
||||||
|
# remember: CMake command if(STR EQUAL STR) is bad and may cause many troubles !
|
||||||
|
string (REGEX REPLACE "([.+*?^$])" "\\\\\\1" _Sphinx_PYTHON_EXECUTABLE_RE "${PYTHON_EXECUTABLE}")
|
||||||
|
list (FIND Sphinx_PYTHON_OPTIONS -E IDX)
|
||||||
|
if (IDX EQUAL -1 AND NOT Sphinx_PYTHON_EXECUTABLE MATCHES "^${_Sphinx_PYTHON_EXECUTABLE_RE}$")
|
||||||
|
list (INSERT Sphinx_PYTHON_OPTIONS 0 -E)
|
||||||
|
endif ()
|
||||||
|
unset (_Sphinx_PYTHON_EXECUTABLE_RE)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# determine Sphinx version
|
||||||
|
if (Sphinx-build_EXECUTABLE)
|
||||||
|
# intentionally use invalid -h option here as the help that is shown then
|
||||||
|
# will include the Sphinx version information
|
||||||
|
if (Sphinx_PYTHON_EXECUTABLE)
|
||||||
|
execute_process (
|
||||||
|
COMMAND "${Sphinx_PYTHON_EXECUTABLE}" ${Sphinx_PYTHON_OPTIONS} "${Sphinx-build_EXECUTABLE}" -h
|
||||||
|
OUTPUT_VARIABLE _Sphinx_VERSION
|
||||||
|
ERROR_VARIABLE _Sphinx_VERSION
|
||||||
|
)
|
||||||
|
elseif (UNIX)
|
||||||
|
execute_process (
|
||||||
|
COMMAND "${Sphinx-build_EXECUTABLE}" -h
|
||||||
|
OUTPUT_VARIABLE _Sphinx_VERSION
|
||||||
|
ERROR_VARIABLE _Sphinx_VERSION
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# The sphinx version can also contain a "b" instead of the last dot.
|
||||||
|
# For example "Sphinx v1.2b1" so we cannot just split on "."
|
||||||
|
if (_Sphinx_VERSION MATCHES "Sphinx v([0-9]+\\.[0-9]+(\\.|b)[0-9]+)")
|
||||||
|
set (Sphinx_VERSION_STRING "${CMAKE_MATCH_1}")
|
||||||
|
string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.|b)[0-9]+" "\\1" Sphinx_VERSION_MAJOR ${Sphinx_VERSION_STRING})
|
||||||
|
string(REGEX REPLACE "[0-9]+\\.([0-9]+)(\\.|b)[0-9]+" "\\1" Sphinx_VERSION_MINOR ${Sphinx_VERSION_STRING})
|
||||||
|
string(REGEX REPLACE "[0-9]+\\.[0-9]+(\\.|b)([0-9]+)" "\\1" Sphinx_VERSION_PATCH ${Sphinx_VERSION_STRING})
|
||||||
|
|
||||||
|
# v1.2.0 -> v1.2
|
||||||
|
if (Sphinx_VERSION_PATCH EQUAL 0)
|
||||||
|
string (REGEX REPLACE "\\.0$" "" Sphinx_VERSION_STRING "${Sphinx_VERSION_STRING}")
|
||||||
|
endif ()
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# compatibility with FindPythonInterp.cmake and FindPerl.cmake
|
||||||
|
set (SPHINX_EXECUTABLE "${Sphinx-build_EXECUTABLE}")
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set SPHINX_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
include (FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS (
|
||||||
|
Sphinx
|
||||||
|
REQUIRED_VARS
|
||||||
|
${_Sphinx_REQUIRED_VARS}
|
||||||
|
# VERSION_VAR # This isn't available until CMake 2.8.8 so don't use it.
|
||||||
|
Sphinx_VERSION_STRING
|
||||||
|
)
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# set Sphinx_DIR
|
||||||
|
if (NOT Sphinx_DIR AND Sphinx-build_EXECUTABLE)
|
||||||
|
get_filename_component (Sphinx_DIR "${Sphinx-build_EXECUTABLE}" PATH)
|
||||||
|
string (REGEX REPLACE "/bin/?" "" Sphinx_DIR "${Sphinx_DIR}")
|
||||||
|
set (Sphinx_DIR "${Sphinx_DIR}" CACHE PATH "Installation directory of Sphinx tools." FORCE)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
unset (_Sphinx_VERSION)
|
||||||
|
unset (_Sphinx_REQUIRED_VARS)
|
45
deps/jansson/cmake/config.h.cmake
vendored
Normal file
45
deps/jansson/cmake/config.h.cmake
vendored
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
/* Reduced down to the defines that are actually used in the code */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> (and friends) header file. */
|
||||||
|
#cmakedefine HAVE_INTTYPES_H 1
|
||||||
|
#cmakedefine HAVE_STDINT_H 1
|
||||||
|
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
|
/* We must include this here, as in (eg) utf.h it will want to use
|
||||||
|
the integer type, which in MSVC2010 will be in stdint.h
|
||||||
|
(there is no inttypes.h in MSVC2010) */
|
||||||
|
#if defined(HAVE_STDINT_H)
|
||||||
|
# include <stdint.h>
|
||||||
|
#elif defined(HAVE_INTTYPES_H)
|
||||||
|
# include <inttypes.h>
|
||||||
|
#elif defined(HAVE_SYS_TYPES_H)
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <locale.h> header file. */
|
||||||
|
#cmakedefine HAVE_LOCALE_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the 'setlocale' function. */
|
||||||
|
#cmakedefine HAVE_SETLOCALE 1
|
||||||
|
|
||||||
|
/* Define to the type of a signed integer type of width exactly 32 bits if
|
||||||
|
such a type exists and the standard includes do not define it. */
|
||||||
|
#cmakedefine HAVE_INT32_T 1
|
||||||
|
|
||||||
|
#ifndef HAVE_INT32_T
|
||||||
|
# define int32_t @JSON_INT32@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#cmakedefine HAVE_SSIZE_T 1
|
||||||
|
|
||||||
|
#ifndef HAVE_SSIZE_T
|
||||||
|
# define ssize_t @JSON_SSIZE@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#cmakedefine HAVE_SNPRINTF 1
|
||||||
|
|
||||||
|
#ifndef HAVE_SNPRINTF
|
||||||
|
# define snprintf @JSON_SNPRINTF@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#cmakedefine HAVE_VSNPRINTF
|
62
deps/jansson/cmake/jansson_config.h.cmake
vendored
Normal file
62
deps/jansson/cmake/jansson_config.h.cmake
vendored
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2010-2013 Petri Lehtinen <petri@digip.org>
|
||||||
|
*
|
||||||
|
* Jansson is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the MIT license. See LICENSE for details.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* This file specifies a part of the site-specific configuration for
|
||||||
|
* Jansson, namely those things that affect the public API in
|
||||||
|
* jansson.h.
|
||||||
|
*
|
||||||
|
* The CMake system will generate the jansson_config.h file and
|
||||||
|
* copy it to the build and install directories.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef JANSSON_CONFIG_H
|
||||||
|
#define JANSSON_CONFIG_H
|
||||||
|
|
||||||
|
/* Define this so that we can disable scattered automake configuration in source files */
|
||||||
|
#define JANSSON_USING_CMAKE
|
||||||
|
|
||||||
|
/* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used,
|
||||||
|
* as we will also check for __int64 etc types.
|
||||||
|
* (the definition was used in the automake system) */
|
||||||
|
|
||||||
|
/* Bring in the cmake-detected defines */
|
||||||
|
#cmakedefine HAVE_STDINT_H 1
|
||||||
|
#cmakedefine HAVE_INTTYPES_H 1
|
||||||
|
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
|
/* Include our standard type header for the integer typedef */
|
||||||
|
|
||||||
|
#if defined(HAVE_STDINT_H)
|
||||||
|
# include <stdint.h>
|
||||||
|
#elif defined(HAVE_INTTYPES_H)
|
||||||
|
# include <inttypes.h>
|
||||||
|
#elif defined(HAVE_SYS_TYPES_H)
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* If your compiler supports the inline keyword in C, JSON_INLINE is
|
||||||
|
defined to `inline', otherwise empty. In C++, the inline is always
|
||||||
|
supported. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define JSON_INLINE inline
|
||||||
|
#else
|
||||||
|
#define JSON_INLINE @JSON_INLINE@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define json_int_t @JSON_INT_T@
|
||||||
|
#define json_strtoint @JSON_STRTOINT@
|
||||||
|
#define JSON_INTEGER_FORMAT @JSON_INTEGER_FORMAT@
|
||||||
|
|
||||||
|
|
||||||
|
/* If locale.h and localeconv() are available, define to 1, otherwise to 0. */
|
||||||
|
#define JSON_HAVE_LOCALECONV @JSON_HAVE_LOCALECONV@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
57
deps/jansson/configure.ac
vendored
Normal file
57
deps/jansson/configure.ac
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
AC_PREREQ([2.60])
|
||||||
|
AC_INIT([jansson], [2.5], [petri@digip.org])
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE([1.10 foreign])
|
||||||
|
|
||||||
|
AC_CONFIG_SRCDIR([src/value.c])
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
AM_CONDITIONAL([GCC], [test x$GCC = xyes])
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_CHECK_HEADERS([locale.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_TYPE_INT32_T
|
||||||
|
AC_TYPE_LONG_LONG_INT
|
||||||
|
|
||||||
|
AC_C_INLINE
|
||||||
|
case $ac_cv_c_inline in
|
||||||
|
yes) json_inline=inline;;
|
||||||
|
no) json_inline=;;
|
||||||
|
*) json_inline=$ac_cv_c_inline;;
|
||||||
|
esac
|
||||||
|
AC_SUBST([json_inline])
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_CHECK_FUNCS([strtoll localeconv])
|
||||||
|
|
||||||
|
case "$ac_cv_type_long_long_int$ac_cv_func_strtoll" in
|
||||||
|
yesyes) json_have_long_long=1;;
|
||||||
|
*) json_have_long_long=0;;
|
||||||
|
esac
|
||||||
|
AC_SUBST([json_have_long_long])
|
||||||
|
|
||||||
|
case "$ac_cv_header_locale_h$ac_cv_func_localeconv" in
|
||||||
|
yesyes) json_have_localeconv=1;;
|
||||||
|
*) json_have_localeconv=0;;
|
||||||
|
esac
|
||||||
|
AC_SUBST([json_have_localeconv])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([
|
||||||
|
jansson.pc
|
||||||
|
Makefile
|
||||||
|
doc/Makefile
|
||||||
|
src/Makefile
|
||||||
|
src/jansson_config.h
|
||||||
|
test/Makefile
|
||||||
|
test/bin/Makefile
|
||||||
|
test/suites/Makefile
|
||||||
|
test/suites/api/Makefile
|
||||||
|
])
|
||||||
|
AC_OUTPUT
|
1
deps/jansson/doc/.gitignore
vendored
Normal file
1
deps/jansson/doc/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
_build/
|
20
deps/jansson/doc/Makefile.am
vendored
Normal file
20
deps/jansson/doc/Makefile.am
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
EXTRA_DIST = conf.py apiref.rst changes.rst conformance.rst \
|
||||||
|
gettingstarted.rst github_commits.c index.rst portability.rst \
|
||||||
|
tutorial.rst upgrading.rst ext/refcounting.py
|
||||||
|
|
||||||
|
SPHINXBUILD = sphinx-build
|
||||||
|
SPHINXOPTS = -d _build/doctrees $(SPHINXOPTS_EXTRA)
|
||||||
|
|
||||||
|
html-local:
|
||||||
|
$(SPHINXBUILD) -b html $(SPHINXOPTS) $(srcdir) _build/html
|
||||||
|
|
||||||
|
install-html-local: html
|
||||||
|
mkdir -p $(DESTDIR)$(htmldir)
|
||||||
|
cp -r _build/html $(DESTDIR)$(htmldir)
|
||||||
|
|
||||||
|
uninstall-local:
|
||||||
|
rm -rf $(DESTDIR)$(htmldir)
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
rm -rf _build
|
||||||
|
rm -f ext/refcounting.pyc
|
5
deps/jansson/doc/README
vendored
Normal file
5
deps/jansson/doc/README
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
To build the documentation, invoke
|
||||||
|
|
||||||
|
make html
|
||||||
|
|
||||||
|
Then point your browser to _build/html/index.html.
|
1560
deps/jansson/doc/apiref.rst
vendored
Normal file
1560
deps/jansson/doc/apiref.rst
vendored
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue