Compare commits
3 Commits
dd8807f8bb
...
1006a53e68
Author | SHA1 | Date |
---|---|---|
pipi | 1006a53e68 | 1 year ago |
pipi | c702e900be | 1 year ago |
pipi | 7b0496e6f1 | 1 year ago |
@ -1,100 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 1, February 1989
|
||||
|
||||
Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, 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 license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our 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. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, 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 a 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 tell them 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.
|
||||
|
||||
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 Agreement 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 work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you".
|
||||
|
||||
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 General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following:
|
||||
|
||||
a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and
|
||||
|
||||
b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option).
|
||||
|
||||
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual 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 General Public License.
|
||||
|
||||
d) 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.
|
||||
|
||||
Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms.
|
||||
|
||||
3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 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 Paragraphs 1 and 2 above; or,
|
||||
|
||||
b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or,
|
||||
|
||||
c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.)
|
||||
|
||||
Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system.
|
||||
|
||||
4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance.
|
||||
|
||||
5. By copying, distributing or modifying 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.
|
||||
|
||||
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.
|
||||
|
||||
7. 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 the 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 the license, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
8. 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
|
||||
|
||||
9. 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.
|
||||
|
||||
10. 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
|
||||
|
||||
Appendix: 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 humanity, 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) 19yy <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 1, 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., 675 Mass Ave, Cambridge, MA 02139, 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) 19xx 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 a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
@ -0,0 +1,13 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
@ -0,0 +1,203 @@
|
||||
name: CI_build
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build_windows:
|
||||
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_configuration: [Release, Debug]
|
||||
build_platform: [x64, Win32, ARM64]
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: MSBuild of n++ exe
|
||||
working-directory: PowerEditor\visual.net\
|
||||
run: msbuild notepadPlus.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="v143"
|
||||
|
||||
- name: Archive artifacts for x64 / Release
|
||||
if: matrix.build_platform == 'x64' && matrix.build_configuration == 'Release'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: PowerEditor\bin64\Notepad++.exe
|
||||
|
||||
- name: Archive artifacts for Win32 / Release
|
||||
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Release'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: PowerEditor\bin\Notepad++.exe
|
||||
|
||||
- name: Archive artifacts for ARM64 / Release
|
||||
if: matrix.build_platform == 'ARM64' && matrix.build_configuration == 'Release'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: PowerEditor\binarm64\Notepad++.exe
|
||||
|
||||
- name: Archive artifacts for ARM64|x64 / Debug
|
||||
if: (matrix.build_platform == 'ARM64' || matrix.build_platform == 'x64') && matrix.build_configuration == 'Debug'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: PowerEditor\visual.net\${{ matrix.build_platform}}\${{ matrix.build_configuration}}\Notepad++.exe
|
||||
|
||||
- name: Archive artifacts for Win32 / Debug
|
||||
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Debug'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.MSVC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: PowerEditor\visual.net\${{ matrix.build_configuration}}\Notepad++.exe
|
||||
|
||||
- name: Run xml validation test for Win32 / Debug only
|
||||
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Debug'
|
||||
working-directory: .\
|
||||
run: |
|
||||
python -m pip install requests rfc3987 pywin32 lxml
|
||||
python PowerEditor\Test\xmlValidator\validator_xml.py
|
||||
|
||||
|
||||
- name: Run FunctionList and UrlDetection Tests for Win32 / Debug only
|
||||
if: matrix.build_platform == 'Win32' && matrix.build_configuration == 'Debug'
|
||||
working-directory: .\
|
||||
run: |
|
||||
Copy-Item "PowerEditor\visual.net\Debug\Notepad++.exe" -Destination "PowerEditor\bin"
|
||||
Copy-Item "PowerEditor\src\langs.model.xml" -Destination "PowerEditor\bin"
|
||||
Copy-Item "PowerEditor\src\stylers.model.xml" -Destination "PowerEditor\bin"
|
||||
Copy-Item "PowerEditor\src\shortcuts.xml" -Destination "PowerEditor\bin"
|
||||
Copy-Item "PowerEditor\src\contextMenu.xml" -Destination "PowerEditor\bin"
|
||||
Copy-Item "PowerEditor\installer\functionList" -Destination "PowerEditor\bin" -Recurse
|
||||
|
||||
Copy-Item "PowerEditor\installer\filesForTesting\regexGlobalTest.xml" -Destination "PowerEditor\bin\functionList"
|
||||
Copy-Item "PowerEditor\installer\filesForTesting\overrideMap.xml" -Destination "PowerEditor\bin\functionList"
|
||||
|
||||
cd .\PowerEditor\Test\FunctionList\
|
||||
.\unitTestLauncher.ps1
|
||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||
|
||||
cd ..\UrlDetection
|
||||
.\verifyUrlDetection.ps1
|
||||
|
||||
|
||||
# build_windows_clang:
|
||||
|
||||
# runs-on: windows-latest
|
||||
# strategy:
|
||||
# matrix:
|
||||
# build_configuration: [Release]
|
||||
# build_platform: [x64]
|
||||
|
||||
# steps:
|
||||
# - name: Checkout repo
|
||||
# uses: actions/checkout@v4
|
||||
|
||||
# - name: Add msbuild to PATH
|
||||
# uses: microsoft/setup-msbuild@v1
|
||||
|
||||
# - name: MSBuild of n++ exe
|
||||
# working-directory: PowerEditor\visual.net\
|
||||
# run: msbuild notepadPlus.sln /m /p:configuration="${{ matrix.build_configuration }}" /p:platform="${{ matrix.build_platform }}" /p:PlatformToolset="ClangCL"
|
||||
|
||||
|
||||
build_windows_cmake:
|
||||
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- build_configuration: Release
|
||||
build_platform: x64
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Add nmake to PATH
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
|
||||
- name: build scintilla
|
||||
working-directory: scintilla/win32/
|
||||
run: |
|
||||
nmake -f scintilla.mak
|
||||
|
||||
- name: build lexilla
|
||||
working-directory: lexilla/src/
|
||||
run: |
|
||||
nmake -f lexilla.mak
|
||||
|
||||
- name: generate cmake
|
||||
working-directory: PowerEditor/src
|
||||
run: |
|
||||
mkdir _build
|
||||
cd _build
|
||||
cmake -G "Visual Studio 17 2022" -A ${{ matrix.build_platform }} -T "v143" ..
|
||||
|
||||
- name: build cmake
|
||||
working-directory: PowerEditor/src
|
||||
run: |
|
||||
cd _build
|
||||
cmake --build . --config ${{ matrix.build_configuration }}
|
||||
|
||||
build_windows_msys2:
|
||||
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
build_configuration: [Release, Debug]
|
||||
build_platform: [x86_64, i686]
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Make n++ exe
|
||||
working-directory: .\
|
||||
run: |
|
||||
Write-host "${{ matrix.build_platform }}"
|
||||
Write-host "${{ matrix.build_configuration }}"
|
||||
$Env:Path = 'C:\msys64\usr\bin' + [IO.Path]::PathSeparator + $Env:Path
|
||||
if ( $${{ matrix.build_platform == 'i686'}} ) {$Env:MSYSTEM = 'MINGW32'}
|
||||
if ( $${{ matrix.build_platform == 'i686'}} ) {$Env:Path = 'C:\msys64\mingw32\bin' + [IO.Path]::PathSeparator + $Env:Path}
|
||||
if ( $${{ matrix.build_platform == 'x86_64'}} ) {$Env:MSYSTEM = 'MINGW64'}
|
||||
if ( $${{ matrix.build_platform == 'x86_64'}} ) {$Env:Path = 'C:\msys64\mingw64\bin' + [IO.Path]::PathSeparator + $Env:Path}
|
||||
if ( $${{ matrix.build_configuration == 'Debug'}} ) {$Env:DEBUG = '1'}
|
||||
Write-Output "Tools version:"
|
||||
Write-Output (((gcc --version) | select-object -first 1) + " " + (gcc -dumpmachine))
|
||||
Write-Output (make --version) | select-object -first 1
|
||||
Write-Output (sh --version) | select-object -first 1
|
||||
Write-Output ""
|
||||
bash -lc "pacman --noconfirm -Syuu"
|
||||
bash -lc "pacman --noconfirm -Syuu"
|
||||
if ( $${{ matrix.build_platform == 'i686'}} ) {bash -lc "pacman --noconfirm -S mingw-w64-i686-gcc mingw-w64-i686-make"}
|
||||
if ( $${{ matrix.build_platform == 'x86_64'}} ) {bash -lc "pacman --noconfirm -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make"}
|
||||
make -f PowerEditor\gcc\makefile
|
||||
|
||||
- name: Archive artifacts for ${{ matrix.build_platform}} / Release
|
||||
if: matrix.build_configuration == 'Release'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.GCC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: bin.${{ matrix.build_platform}}\notepad++.exe
|
||||
|
||||
- name: Archive artifacts for ${{ matrix.build_platform}} / Debug
|
||||
if: matrix.build_configuration == 'Debug'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Notepad++.GCC.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
|
||||
path: bin.${{ matrix.build_platform}}-debug\notepad++.exe
|
@ -0,0 +1,166 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
# VisualStudio
|
||||
|
||||
#-- User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
#-- Build results
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
x86/
|
||||
#[Bb]in/
|
||||
[Oo]bj/
|
||||
*.pdb
|
||||
|
||||
#-- Visual C++ cache files
|
||||
.vs/
|
||||
.vscode/
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
#-- Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
#-- Others
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.exe
|
||||
*.obj
|
||||
*.pch
|
||||
#*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
.builds
|
||||
*.pidb
|
||||
*.vcxproj.filters
|
||||
*.bak
|
||||
|
||||
PowerEditor/bin/notepad++.exe
|
||||
PowerEditor/bin/Notepad++.exp
|
||||
PowerEditor/bin/Notepad++.lib
|
||||
PowerEditor/bin/NppShell.x86.dll
|
||||
PowerEditor/bin/config.xml
|
||||
PowerEditor/bin/stylers.xml
|
||||
PowerEditor/bin/langs.xml
|
||||
PowerEditor/bin/config.model.xml
|
||||
PowerEditor/bin/stylers.model.xml
|
||||
PowerEditor/bin/langs.model.xml
|
||||
PowerEditor/bin/contextMenu.xml
|
||||
PowerEditor/bin/nativeLang.xml
|
||||
PowerEditor/bin/session.xml
|
||||
PowerEditor/bin/functionList.xml
|
||||
PowerEditor/bin/shortcuts.xml
|
||||
PowerEditor/bin/backup/
|
||||
PowerEditor/bin/localization/
|
||||
PowerEditor/bin/plugins/
|
||||
PowerEditor/bin/updater/
|
||||
PowerEditor/bin/functionList/
|
||||
PowerEditor/bin64/
|
||||
PowerEditor/binarm64/
|
||||
PowerEditor/bin/themes/
|
||||
PowerEditor/installer/bin/wingup/
|
||||
PowerEditor/installer/build/
|
||||
PowerEditor/installer/minimalist/
|
||||
PowerEditor/installer/minimalist64/
|
||||
PowerEditor/installer/minimalistArm64/
|
||||
PowerEditor/installer/zipped.package.release/
|
||||
PowerEditor/installer/zipped.package.release64/
|
||||
PowerEditor/installer/zipped.package.releaseArm64/
|
||||
PowerEditor/visual.net/Unicode Debug/
|
||||
PowerEditor/visual.net/Unicode Release/
|
||||
PowerEditor/visual.net/Debug/
|
||||
PowerEditor/visual.net/Release/
|
||||
PowerEditor/visual.net/notepadPlus.sln
|
||||
PowerEditor/visual.net/notepadPlus.vcxproj.filters
|
||||
PowerEditor/visual.net/x64/Unicode Debug/
|
||||
PowerEditor/visual.net/x64/Unicode Release/
|
||||
PowerEditor/visual.net/x64/Debug/
|
||||
PowerEditor/visual.net/x64/Release/
|
||||
PowerEditor/visual.net/ARM64
|
||||
PowerEditor/src/tools/NppShell/build_ARM64
|
||||
PowerEditor/src/tools/NppShell/build_Win32
|
||||
PowerEditor/src/tools/NppShell/build_x64
|
||||
|
||||
# scintilla - generated files
|
||||
scintilla/bin/SciLexer.*
|
||||
scintilla/bin/Scintilla.*
|
||||
scintilla/bin/libscintilla.lib
|
||||
scintilla/win32/*.lib
|
||||
scintilla/win32/ScintRes.res
|
||||
scintilla/win32/ARM64
|
||||
scintilla/win32/Unicode Release/
|
||||
scintilla/win32/Unicode Debug/
|
||||
scintilla/win32/Release/
|
||||
scintilla/win32/Debug/
|
||||
scintilla/boostregex/bin
|
||||
scintilla/boostregex/boostpath.mak
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Windows
|
||||
|
||||
#-- image file cache
|
||||
Thumbs.db
|
||||
|
||||
#-- Folder config file
|
||||
Desktop.ini
|
||||
folder-*.ico
|
||||
|
||||
#-- Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Mac
|
||||
|
||||
*~
|
||||
*.lock
|
||||
*.DS_Store
|
||||
*.swp
|
||||
*.out
|
||||
scintilla/.hgeol
|
||||
scintilla/.hgtags
|
||||
scintilla/cppcheck.suppress
|
||||
scintilla/.hg_archival.txt
|
||||
scintilla/.hgignore
|
||||
scintilla/bin/__init__.py
|
||||
PowerEditor/bin/NppShell64_06.dll
|
||||
PowerEditor/bin/NppShell_06.dll
|
||||
|
||||
PowerEditor/bin/SourceCodePro-Bold.ttf
|
||||
PowerEditor/bin/SourceCodePro-BoldIt.ttf
|
||||
PowerEditor/bin/SourceCodePro-It.ttf
|
||||
PowerEditor/bin/SourceCodePro-Regular.ttf
|
||||
*.zip
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# MinGW-w64 GCC
|
||||
|
||||
bin.*
|
||||
scintilla/win32/*.o
|
||||
|
||||
|
||||
PowerEditor/src/MISC/md5/RCa06792
|
||||
*.db
|
||||
*.sln
|
||||
*.opendb
|
@ -0,0 +1,72 @@
|
||||
# Building Notepad++
|
||||
|
||||
## Microsoft Visual Studio
|
||||
|
||||
**Pre-requisites:**
|
||||
|
||||
- Microsoft Visual Studio 2022 version 17.5 (C/C++ Compiler, v143 toolset for win32, x64, arm64)
|
||||
|
||||
There are three components which are built from one visual studio solution:
|
||||
|
||||
- `notepad++.exe`: (contains `libSciLexer.lib`)
|
||||
- `libScintilla.lib` : static library based on [Scintilla](https://www.scintilla.org/)
|
||||
- `libLexilla.lib` : static library based on [Lexilla](https://www.scintilla.org/Lexilla.html)
|
||||
|
||||
Notepad++ is always built **with** Boost regex PCRE support instead of default c++11 regex ECMAScript used by plain Scintilla.
|
||||
|
||||
### Build `notepad++.exe`
|
||||
|
||||
1. Open [`PowerEditor\visual.net\notepadPlus.sln`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/visual.net/notepadPlus.sln)
|
||||
2. Select a solution configuration (Debug or Release) and a solution platform (x64 or Win32 or ARM64)
|
||||
3. Build Notepad++ solution like a normal Visual Studio project. This will also build the dependent Scintilla and Lexilla projects.
|
||||
|
||||
### Build `libScintilla.lib` and `libLexilla.lib`
|
||||
|
||||
As mentioned above, you'll need `libScintilla.lib` and `libLexilla.lib` for the Notepad++ build. This is done automatically on building the whole solution. So normally you don't need to care about this.
|
||||
|
||||
#### Build `libScintilla.lib` with boost and `libLexilla.lib` via nmake
|
||||
|
||||
This is not necessary any more and just here for completeness as this option is still available.
|
||||
Boost is taken from [boost 1.80.0](https://www.boost.org/users/history/version_1_80_0.html) and stripped down to the project needs available at [boost](https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/boostregex/boost) in this repo.
|
||||
|
||||
1. Open the Developer Command Prompt for Visual Studio
|
||||
2. Go into the [`scintilla\win32\`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/win32/)
|
||||
3. Build the same configuration as notepad++:
|
||||
- Release: `nmake -f scintilla.mak`
|
||||
- Debug: `nmake DEBUG=1 -f scintilla.mak`
|
||||
- Example:
|
||||
`nmake -f scintilla.mak`
|
||||
4. Go into the [`lexilla\src\`](https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/lexilla/src/)
|
||||
5. Build the same configuration as notepad++:
|
||||
- Release: `nmake -f lexilla.mak`
|
||||
- Debug: `nmake DEBUG=1 -f lexilla.mak`
|
||||
|
||||
### History
|
||||
|
||||
More about the previous build process: <https://community.notepad-plus-plus.org/topic/13959/building-notepad-with-visual-studio-2015-2017>
|
||||
|
||||
Since `Notepad++` version 6.0 - 7.9.5, the build of dynamic linked `SciLexer.dll` that is distributed
|
||||
uses features from Boost's `Boost.Regex` library.
|
||||
|
||||
## GCC
|
||||
|
||||
If you have [MinGW-w64](https://www.mingw-w64.org/) installed, you can compile Notepad++ with GCC. Otherwise MinGW-w64 can be downloaded [here](https://sourceforge.net/projects/mingw-w64/files/). You can also download some collection of tools which supports MinGW-w64, like [MSYS2](https://www.msys2.org/) or [WinLibs](https://winlibs.com/).
|
||||
|
||||
Building Notepad++ is regularly tested on a Windows system by using [MSYS2](https://www.msys2.org/) project. Current versions of tools used to building (such as GCC, Make or Bash) can be checked by looking at some logs from the finished building (for example in the [current-build page](https://ci.appveyor.com/project/donho/notepad-plus-plus)). Other versions may also work but are untested.
|
||||
|
||||
**Note:** Before building make sure that the system `PATH` environment variable contains `$MinGW-root$\bin` directory. Otherwise you have to set this directory yourself in Windows settings. You can also use a command like `set PATH=$MinGW-root$\bin;%PATH%` each time `cmd` is launched. But beware that if `PATH` contains several versions of MinGW-w64 GCC, only the first one will be usable.
|
||||
|
||||
### Compiling Notepad++ binary
|
||||
|
||||
1. Launch `cmd` and add `$MinGW-root$\bin` to `PATH` if necessary.
|
||||
2. `cd` into `notepad-plus-plus\PowerEditor\gcc`.
|
||||
3. Run `mingw32-make`.
|
||||
4. The 32-bit or 64-bit `notepad++.exe` will be generated either in `bin.i686` or in `bin.x86_64` directory respectively, depending on the target CPU of the compiler — look for the full path to the resulting binary at the end of the build process.
|
||||
|
||||
#### Some additional information
|
||||
|
||||
- The directory containing `notepad++.exe` will also contain everything needed for Notepad++ to start.
|
||||
- To have a debug build just add `DEBUG=1` to the `mingw32-make` invocation above. The output directory then will be suffixed with `-debug`.
|
||||
- To see commands being executed add `VERBOSE=1` to the same command.
|
||||
- When a project is built outside of the `PowerEditor/gcc` directory, for example when using `-f` option, then the entire project path must not contain any spaces. Additionally, the path to `makefile` of this project should be listed as first.
|
||||
- When a project is built through MinGW-w64 with multilib support, a specific target can be forced by passing `TARGET_CPU` variable with `x86_64` or `i686` as value.
|
@ -0,0 +1,449 @@
|
||||
# Contributing
|
||||
|
||||
***Ask not what Notepad++ can do for you - ask what you can do for Notepad++***
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
Bug reports are appreciated. Following a few guidelines listed below will help speed up the process of getting them fixed.
|
||||
|
||||
1. Search the issue tracker to see if it has already been reported.
|
||||
2. Disable your plugins to see if one of them is the problem. You can do this by renaming your `plugins` folder to something else.
|
||||
3. Only report an issue with a plugin if it is one of the standard plugins included in the Notepad++ installation. Any other plugin issue should be reported to its respective issue tracker (see e.g. [plugin_list_x86.md](https://github.com/notepad-plus-plus/nppPluginList/blob/master/doc/plugin_list_x86.md) or [plugin_list_x64.md](https://github.com/notepad-plus-plus/nppPluginList/blob/master/doc/plugin_list_x64.md) to find the homepage with further information on that for a plugins). The standard plugins include (for v7.9.5):
|
||||
* NppExport
|
||||
* Converter
|
||||
* mimeTools
|
||||
4. Fill the complete information: a template will be shown when you create an issue. Please fill the complete information in the template. To fill the field **Debug Information** you can get it from your Notepad++ via menu `?>Debug Info...`. Please take your time to fill these information. If you don't bother to complete the information we need to help you, we won't bother to solve your problem either.
|
||||
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Your pull requests are welcome; however, they may not be accepted for various reasons. If you want to make some GUI enhancement like renaming some graphic items or fixing typos, please create the issue instead of the pull requests. All Pull Requests, except for translations and user documentation, need to be attached to a issue on GitHub. For Pull Requests regarding enhancements and questions, the issue must first be approved by one of project's administrators before being merged into the project. An approved issue will have the label `Accepted`. For issues that have not been accepted, you may request to be assigned to that issue.
|
||||
|
||||
Opening an issue beforehand allows the administrators and the community to discuss bugs and enhancements before work begins, preventing wasted effort.
|
||||
|
||||
### Guidelines for pull requests
|
||||
|
||||
1. Respect existing Notepad++ coding style. Observe the code near your intended change, and attempt to preserve the style of that code with the changes you make.
|
||||
2. Create a new branch for each PR. **Make sure your branch name wasn't used before** - you can add date (for example `patch3_20200528`) to ensure its uniqueness.
|
||||
3. Single feature or bug-fix per PR.
|
||||
4. Create a PR with a single commit to make the review process easier.
|
||||
5. Make your modification compact - don't reformat source code in your request. It makes code review more difficult.
|
||||
6. PR of reformatting (changing of ws/TAB, line endings or coding style) of source code won't be accepted. Use issue trackers for your request instead.
|
||||
7. Typo fixing and code refactoring won't be accepted - please create issues with title started with `TYPO` to request the changing.
|
||||
8. Address the review change requests by pushing new commits to the same PR. Avoid amending a commit and then force pushing it. All the PR commits are squashed before merging to the main branch.
|
||||
9. When creating new PR, try to base it on latest master.
|
||||
10. Don't merge `upstream/master` (using git or via github sync), if your PR is based on older `upstream/master`. If you need to base it on latest `master` (e.g. to check and fix merge conflict), use commands `git fetch upstream` to get latest `master` and then `git rebase upstream/master` to rebase it onto this latest `upstream/master`.
|
||||
11. Finally, please test your pull requests, at least once.
|
||||
|
||||
In short: The easier the code review is, the better the chance your pull request will get accepted.
|
||||
|
||||
### Coding style
|
||||
|
||||
![stay clean](https://notepad-plus-plus.org/assets/images/good-bad-practice.jpg)
|
||||
|
||||
#### GENERAL
|
||||
|
||||
1. Do not use Java-like braces
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
void MyClass::method1()
|
||||
{
|
||||
if (aCondition)
|
||||
{
|
||||
// Do something
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
void MyClass::method1() {
|
||||
if (aCondition) {
|
||||
// Do something
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
However, the method definition could be defined in a header file (.h), if there's one line code only. In this case, Java-like braces should be used.
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
class MyClass
|
||||
{
|
||||
public:
|
||||
void method1();
|
||||
int method2() {
|
||||
return _x; // only one line code can be placed in .h as method definition
|
||||
};
|
||||
|
||||
private:
|
||||
int _x;
|
||||
}
|
||||
```
|
||||
|
||||
2. Use tabs instead of white-spaces (we usually set our editors to 4 white-spaces for 1 tab, but the choice is up to you)
|
||||
|
||||
3. Always leave one space before and after binary and ternary operators
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (a == 10 && b == 42)
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if (a==10&&b==42)
|
||||
```
|
||||
|
||||
4. Only leave one space after semi-colons in "for" statements
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
for (int i = 0; i != 10; ++i)
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
for(int i=0;i<10;++i)
|
||||
```
|
||||
|
||||
5. Function names are not separated from the first parenthesis
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
foo();
|
||||
myObject.foo(24);
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
foo ();
|
||||
```
|
||||
|
||||
6. Keywords are separated from the first parenthesis by one space
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (true)
|
||||
while (true)
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if(myCondition)
|
||||
```
|
||||
|
||||
7. Switch
|
||||
|
||||
* Use the following indenting for "switch" statements:
|
||||
|
||||
```cpp
|
||||
switch (test)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
// Do something
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// Do something else
|
||||
} // No semi-colon here
|
||||
```
|
||||
|
||||
* If possible use `default` statement, and prefer using it as last case.
|
||||
* When using switch with enum or known range, try to cover all values if not using `default`.
|
||||
|
||||
```cpp
|
||||
enum class Test {val1, val2, val3}
|
||||
|
||||
switch (Test)
|
||||
{
|
||||
case Test::val1:
|
||||
{
|
||||
// Do something
|
||||
break;
|
||||
}
|
||||
|
||||
//case Test::val2:
|
||||
//case Test::val3:
|
||||
default:
|
||||
// Do something else
|
||||
} // No semi-colon here
|
||||
```
|
||||
|
||||
When using `default` adding uncovered values as comments can help to convey intention.
|
||||
|
||||
* Use `[[fallthrough]]` if fall through is intended.
|
||||
|
||||
```cpp
|
||||
switch (test)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
// Do something
|
||||
}
|
||||
// I want fall through // adding comment can help to convey intention
|
||||
[[fallthrough]];
|
||||
|
||||
case 2:
|
||||
{
|
||||
// Do something
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
// Do something else
|
||||
} // No semi-colon here
|
||||
```
|
||||
|
||||
8. Avoid magic numbers
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (foo == I_CAN_PUSH_ON_THE_RED_BUTTON)
|
||||
startTheNuclearWar();
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
while (lifeTheUniverseAndEverything != 42)
|
||||
lifeTheUniverseAndEverything = buildMorePowerfulComputerForTheAnswer();
|
||||
```
|
||||
|
||||
9. Prefer enums for integer constants
|
||||
|
||||
10. Use initialization with curly braces
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
MyClass instance{10.4};
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
MyClass instance(10.4);
|
||||
```
|
||||
|
||||
11. Always use `empty()` for testing if a string is empty or not
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (!string.empty())
|
||||
...
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if (string != "")
|
||||
...
|
||||
```
|
||||
|
||||
12. Always use `C++ conversion` instead of `C-Style cast`
|
||||
|
||||
* Generally, all the conversion among types should be avoided. If you have no choice, use C++ conversion.
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
char aChar = static_cast<char>(_pEditView->execute(SCI_GETCHARAT, j));
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
char aChar = (char)_pEditView->execute(SCI_GETCHARAT, j);
|
||||
```
|
||||
|
||||
13. Use `!` instead of `not`, `&&` instead of `and`, `||` instead of `or`
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (!::PathFileExists(dir2Search))
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if (not ::PathFileExists(dir2Search))
|
||||
```
|
||||
|
||||
14. Always initialize local and global variables
|
||||
|
||||
* For primitive types and enum prefer initialization with `=`.
|
||||
* For other prefer `{}`-initializer syntax.
|
||||
* For "numerical" variables using literal suffix can help to convey intention.
|
||||
|
||||
```cpp
|
||||
constexpr float g_globalVariable = 0.0F;
|
||||
|
||||
void test()
|
||||
{
|
||||
constexpr UINT strLen = 1024U;
|
||||
wchar_t myString[strLen]{};
|
||||
}
|
||||
```
|
||||
|
||||
#### NAMING CONVENTIONS
|
||||
|
||||
1. Classes uses Pascal Case
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
class IAmAClass
|
||||
{};
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
class iAmAClass
|
||||
{};
|
||||
class I_am_a_class
|
||||
{};
|
||||
```
|
||||
|
||||
2. Methods & method parameters
|
||||
|
||||
* Use camel Case
|
||||
|
||||
```cpp
|
||||
void myMethod(uint myVeryLongParameter);
|
||||
```
|
||||
|
||||
3. Member variables
|
||||
|
||||
* Any member variable name of class/struct should be preceded by an underscore.
|
||||
|
||||
```cpp
|
||||
public:
|
||||
int _publicAttribute;
|
||||
private:
|
||||
int _pPrivateAttribute;
|
||||
float _pAccount;
|
||||
```
|
||||
|
||||
4. Always prefer a variable name that describes what the variable is used for
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (hours < 24 && minutes < 60 && seconds < 60)
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if (a < 24 && b < 60 && c < 60)
|
||||
```
|
||||
|
||||
#### COMMENTS
|
||||
|
||||
1. Use C++ comment line style rather than C comment style
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
// Two lines comment
|
||||
// Use still C++ comment line style
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
/*
|
||||
Please don't piss me off with that
|
||||
*/
|
||||
```
|
||||
|
||||
#### BEST PRACTICES
|
||||
|
||||
1. Use C++11/14/17/20 whenever it is possible.
|
||||
|
||||
2. Use C++11 member initialization feature whenever it is possible.
|
||||
|
||||
```cpp
|
||||
class Foo
|
||||
{
|
||||
int value = 0;
|
||||
};
|
||||
```
|
||||
|
||||
3. Incrementing
|
||||
* Prefer Pre-increment
|
||||
|
||||
```cpp
|
||||
++i
|
||||
```
|
||||
|
||||
* Over Post-increment
|
||||
|
||||
```cpp
|
||||
i++
|
||||
```
|
||||
|
||||
(It does not change anything for built-in types but it would bring consistency)
|
||||
|
||||
4. Avoid using pointers. References are preferred instead. You might need the variable to be assigned a `NULL` value: in this case the `NULL` value has semantics and must be checked. Wherever possible, use a SmartPtr instead of old-school pointers.
|
||||
|
||||
5. Avoid using new if you can use automatic variable. However, avoid `shared_ptr` as much as possible. Prefer `unique_ptr` instead.
|
||||
|
||||
6. Don't place any "using namespace" directives in headers.
|
||||
|
||||
7. Compile time is without incidence. Increasing compile time to reduce execution time is encouraged.
|
||||
|
||||
8. Code legibility and length is less important than easy and fast end-user experience.
|
||||
|
||||
9. Prefer `constexpr` over `const` if value can be evaluated at compile time.
|
||||
|
||||
10. Check if there are helper functions in headers or lambda functions to reuse them instead of writing new code.
|
||||
|
||||
* Example
|
||||
|
||||
```cpp
|
||||
// in StaticDialog.h
|
||||
isCheckedOrNot();
|
||||
setChecked();
|
||||
|
||||
// in Parameters.cpp
|
||||
parseYesNoBoolAttribute();
|
||||
```
|
||||
|
||||
11. Check if there are already defined global variables, and reuse them instead of defining new ones.
|
||||
|
||||
12. Avoid "Yoda conditions".
|
||||
|
||||
* Good:
|
||||
|
||||
```cpp
|
||||
if (iAmYourFather == true)
|
||||
...
|
||||
```
|
||||
|
||||
* Bad:
|
||||
|
||||
```cpp
|
||||
if (true == iAmYourFather)
|
||||
...
|
||||
```
|
||||
|
||||
13. Check [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md) for additional guidelines.
|
@ -1,146 +0,0 @@
|
||||
name: CMake
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: cmake -E make_directory ${{runner.workspace}}/build
|
||||
|
||||
- name: Install Dependencies on Ubuntu
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install libsdl2-*
|
||||
|
||||
- name: Install Dependencies on macOS
|
||||
if: runner.os == 'macOS'
|
||||
run: brew install sdl2 sdl2_mixer sdl2_net sdl2_image sdl2_ttf
|
||||
|
||||
- name: Configure CMake
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Copy Libraries (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: |
|
||||
wget https://github.com/Rapiz1/DungeonRush/releases/download/v1.0-alpha/linux-lib.tar.gz
|
||||
tar xzf linux-lib.tar.gz
|
||||
mv linux-lib/* bin
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: DungeonRush-${{runner.os}}
|
||||
path: ${{runner.workspace}}/build/bin
|
||||
|
||||
build-windows:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest]
|
||||
arch: [i686, x86_64]
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
if: matrix.arch == 'i686'
|
||||
with:
|
||||
msystem: MINGW32
|
||||
update: true
|
||||
install: base-devel git gcc mingw-w64-${{matrix.arch}}-cmake mingw-w64-${{matrix.arch}}-gcc
|
||||
|
||||
- uses: msys2/setup-msys2@v2
|
||||
if: matrix.arch == 'x86_64'
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
install: base-devel git gcc mingw-w64-${{matrix.arch}}-cmake mingw-w64-${{matrix.arch}}-gcc
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
wget https://www.libsdl.org/release/SDL2-devel-2.0.12-mingw.tar.gz
|
||||
tar xzf SDL2-devel-2.0.12-mingw.tar.gz && cd SDL2-2.0.12
|
||||
make install-package arch=${{matrix.arch}}-w64-mingw32 prefix=/usr && cd ..
|
||||
# SDL2_mixer
|
||||
wget https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-mingw.tar.gz
|
||||
tar xzf SDL2_mixer-devel-2.0.4-mingw.tar.gz && cd SDL2_mixer-2.0.4
|
||||
make install-package arch=${{matrix.arch}}-w64-mingw32 prefix=/usr && cd ..
|
||||
# SDL2_image
|
||||
wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-mingw.tar.gz
|
||||
tar xzf SDL2_image-devel-2.0.5-mingw.tar.gz && cd SDL2_image-2.0.5
|
||||
make install-package arch=${{matrix.arch}}-w64-mingw32 prefix=/usr && cd ..
|
||||
# SDL2_ttf
|
||||
wget https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-mingw.tar.gz
|
||||
tar xzf SDL2_ttf-devel-2.0.15-mingw.tar.gz && cd SDL2_ttf-2.0.15
|
||||
make install-package arch=${{matrix.arch}}-w64-mingw32 prefix=/usr && cd ..
|
||||
# SDL2_net
|
||||
wget https://www.libsdl.org/projects/SDL_net/release/SDL2_net-devel-2.0.1-mingw.tar.gz
|
||||
tar xzf SDL2_net-devel-2.0.1-mingw.tar.gz && cd SDL2_net-2.0.1
|
||||
make install-package arch=${{matrix.arch}}-w64-mingw32 prefix=/usr && cd ..
|
||||
|
||||
- name: Create Build Environment
|
||||
working-directory: ${{github.workspace}}
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
working-directory: ${{github.workspace}}
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: cd build && cmake .. -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
|
||||
- name: Build
|
||||
working-directory: ${{github.workspace}}
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: cd build && cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Copy libraries
|
||||
working-directory: ${{github.workspace}}
|
||||
run: |
|
||||
cd build
|
||||
wget https://github.com/Rapiz1/DungeonRush/releases/download/v1.0-alpha/win-${{matrix.arch}}-lib.tar.gz
|
||||
tar xzf win-${{matrix.arch}}-lib.tar.gz
|
||||
mv win-${{matrix.arch}}-lib/* bin
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: DungeonRush-${{runner.os}}-${{matrix.arch}}
|
||||
path: ${{github.workspace}}\build\bin
|
@ -1,10 +0,0 @@
|
||||
.vscode
|
||||
dist
|
||||
snake
|
||||
*.zip
|
||||
storage.dat
|
||||
archive
|
||||
dungeon_rush
|
||||
*.o
|
||||
*.gch
|
||||
build
|
@ -1,32 +0,0 @@
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
sudo: require
|
||||
dist: xenial
|
||||
|
||||
install:
|
||||
- sudo apt-get -y install libsdl2-* cmake
|
||||
script:
|
||||
- mkdir build && cd build
|
||||
- cmake ..
|
||||
- make -j$(nproc)
|
||||
- mkdir -p appdir/usr/share/icons/hicolor/256x256/apps # FIXME: "make INSTALL_ROOT=appdir install" should do this
|
||||
- cp ../dungeonrush.png appdir/usr/share/icons/hicolor/256x256/apps/ # FIXME: "make INSTALL_ROOT=appdir install" should do this
|
||||
- mkdir -p appdir/usr/share/applications # FIXME: "make INSTALL_ROOT=appdir install" should do this
|
||||
- cp ../dungeonrush.desktop appdir/usr/share/applications/ # FIXME: "make INSTALL_ROOT=appdir install" should do this
|
||||
- mkdir -p appdir/usr/bin # FIXME: "make INSTALL_ROOT=appdir install" should do this
|
||||
- cp -r bin/dungeon_rush appdir/usr/bin/ # FIXME: "make INSTALL_ROOT=appdir install" should do this
|
||||
- cp -r bin/res appdir/usr/ # FIXME: Workaround for https://github.com/Rapiz1/DungeonRush/issues/10#issuecomment-629748817
|
||||
- wget -c "https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-x86_64" -O ./appdir/AppRun # FIXME: Workaround for https://github.com/Rapiz1/DungeonRush/issues/10#issuecomment-629748817
|
||||
- chmod +x ./appdir/AppRun # FIXME: Workaround for https://github.com/Rapiz1/DungeonRush/issues/10#issuecomment-629748817
|
||||
- find appdir/
|
||||
- wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||
- chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
||||
- ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage
|
||||
|
||||
after_success:
|
||||
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||
- env UPLOADTOOL_ISPRERELEASE=1 bash upload.sh DungeonRush*.AppImage*
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
@ -1,30 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.5.1)
|
||||
project(DungeonRush VERSION 0.1.0
|
||||
DESCRIPTION "A game inspired by snake"
|
||||
LANGUAGES C)
|
||||
|
||||
# Add SDL2 CMake modules
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sdl2)
|
||||
|
||||
# Set output path
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
# Find SDL2
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(SDL2_image REQUIRED)
|
||||
find_package(SDL2_net REQUIRED)
|
||||
find_package(SDL2_mixer REQUIRED)
|
||||
find_package(SDL2_ttf REQUIRED)
|
||||
|
||||
set(BIN_NAME dungeon_rush)
|
||||
|
||||
file(GLOB SRC src/*.c)
|
||||
|
||||
add_executable(${BIN_NAME} ${SRC})
|
||||
|
||||
target_include_directories(${BIN_NAME} PUBLIC src)
|
||||
target_include_directories(${BIN_NAME} PUBLIC ${SDL2_INCLUDE_DIR})
|
||||
target_link_libraries(${BIN_NAME} SDL2::Main SDL2::Net SDL2::Image SDL2::Mixer
|
||||
SDL2::TTF m)
|
||||
|
||||
file(COPY res DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
@ -1,674 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. 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
|
||||
them 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 prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. 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.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey 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;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If 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 convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU 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 that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
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.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
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.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
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
|
||||
state 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program 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, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU 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 Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
@ -1,129 +0,0 @@
|
||||
# DungeonRush
|
||||
![](screenshot.gif)
|
||||
>A game inspired by Snake, in pure C with SDL2.
|
||||
>My piece of work from C assignment. Hope you like it :)
|
||||
|
||||
*I work on the small project on my own so the code lacks of comments.*
|
||||
|
||||
## Download
|
||||
|
||||
[Windows(64bit)](https://github.com/Rapiz1/DungeonRush/releases/download/v1.1-beta/DungeonRush-v1.1-beta-Windows-x86_64.zip)
|
||||
|
||||
[Windows(32bit)](https://github.com/Rapiz1/DungeonRush/releases/download/v1.1-beta/DungeonRush-v1.1-beta-Windows-i686.zip)
|
||||
|
||||
[Linux](https://github.com/Rapiz1/DungeonRush/releases/download/v1.1-beta/DungeonRush-v1.1-beta-linux.zip)
|
||||
|
||||
[Someone port it to android!](https://github.com/imrunning/DungeonRush_Android)
|
||||
|
||||
AppImage for Linux is also available in release page.
|
||||
|
||||
[Archlinux AUR](https://aur.archlinux.org/packages/dungeonrush/)
|
||||
|
||||
```yay -S dungeonrush```
|
||||
|
||||
[Archlinux AUR(git version)](https://aur.archlinux.org/packages/dungeonrush-git/)
|
||||
|
||||
```yay -S dungeonrush-git```
|
||||
|
||||
*The game supports macOS but I don't have an Mac to compile for it.*
|
||||
|
||||
The executable is called `dungeon_rush`
|
||||
|
||||
## Release Note
|
||||
|
||||
### v1.1-beta
|
||||
- Fix bugs
|
||||
|
||||
### v1.0-beta
|
||||
- Fix bugs
|
||||
- Add Multiplayer / LAN mode
|
||||
|
||||
**You can play with your friend via Internet!**
|
||||
*You need to be in the same network and can directly connect by IP*
|
||||
|
||||
### v1.0-alpha
|
||||
|
||||
Initial release
|
||||
|
||||
## How to Play
|
||||
|
||||
### Singleplayer
|
||||
|
||||
Use WASD to move.
|
||||
|
||||
Collect heros to enlarge your army while defending yourself from the monsters. Each level has a target length of the hero queue. Once it's reached, you will be sent to the next level and start over. There are lots of stuff that will be adjusted according to the level you're on, including factors of HP and damage, duration of Buffs and DeBuffs, the number and strength of monsters and so on.
|
||||
|
||||
### Multiplayers
|
||||
Use WASD and the arrow keys to move.
|
||||
|
||||
This mode is competitive. Defend yourself from the monsters and your friend!
|
||||
|
||||
### Weapons
|
||||
|
||||
There are powerful weapons randomly dropped by the monsters. Different kinds of heros can be equipped with different kind of weapons.
|
||||
|
||||
*My favorite is the ThunderStaff. A cool staff that makes your wizard summon thunder striking all enemies around.*
|
||||
|
||||
### Buff/DeBuff
|
||||
|
||||
There's a possibility that the attack from one with weapon triggers certain Buff on himself or DeBuff on the enemy.
|
||||
|
||||
- IceSword can frozen enemies.
|
||||
- HolySword can give you a shield that absorbs damage and makes you immune to DeBuff.
|
||||
- GreatBow can increase the damage of all your heros' attack.
|
||||
- And so on.
|
||||
|
||||
For sure, some kinds of monsters have weapons that can put a DeBuff on you! *(Like the troublesome muddy monsters can slow down your movement.)*
|
||||
|
||||
## Dependencies
|
||||
The project requires no more than common SDL2 libraries.
|
||||
`SDL2, SDL2-image, SDL2-mixer, SDL2-net, SDL2-ttf`
|
||||
### For Arch
|
||||
```
|
||||
# pacman -S sdl2 sdl2_image sdl2_mixer sdl2_net sdl2_ttf --needed
|
||||
```
|
||||
### For Debian
|
||||
|
||||
```
|
||||
# apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev
|
||||
```
|
||||
|
||||
### For openSUSE
|
||||
|
||||
```
|
||||
# zypper in libSDL2-devel libSDL2_image-devel libSDL2_mixer-devel libSDL2_net-devel libSDL2_ttf-devel
|
||||
```
|
||||
|
||||
### For MacOS
|
||||
|
||||
```
|
||||
# brew install sdl2 sdl2_image sdl2_mixer sdl2_net sdl2_ttf
|
||||
```
|
||||
|
||||
### For other OS
|
||||
|
||||
The names of packages should be similar. You can look for SDL tutorial to set up the environment.
|
||||
## Compilation
|
||||
**You should make sure all dependencies are installed before compiling**
|
||||
```
|
||||
$ cmake -B build && cmake --build build
|
||||
```
|
||||
## Known issues
|
||||
[Game speed too fast with some NVIDIA graphic cards on Linux](https://github.com/Rapiz1/DungeonRush/issues/4)
|
||||
## License and Credits
|
||||
DungeonRush has mixed meida with
|
||||
various licenses. Unfortunately I failed to track them all. In other word, there are many stuff excluding code that comes with unknown license. You should not reuse any of audio, bitmaps, font in this project. If you insist, use at your own risk.
|
||||
### Code
|
||||
GPL
|
||||
### Bitmap
|
||||
|Name|License|
|
||||
|----|-------|
|
||||
|DungeonTilesetII_v1.3 By 0x72|CC 0|
|
||||
|Other stuff By rapiz|CC BY-NC-SA 4.0|
|
||||
### Music
|
||||
|Name|License|
|
||||
|----|-------|
|
||||
|Digital_Dream_Azureflux_Remix By Starbox|CC BY-NC-SA 4.0|
|
||||
|BOMB By Azureflux|CC BY-NC-SA 4.0|
|
||||
|Unknown BGM|Unknown|
|
||||
|The Essential Retro Video Game Sound Effects Collection By Juhani Junkala |CC BY 3.0|
|
@ -1,132 +0,0 @@
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2019 Kitware, Inc. and Contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Kitware, Inc. nor the names of Contributors
|
||||
may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
The following individuals and institutions are among the Contributors:
|
||||
|
||||
* Aaron C. Meadows <cmake@shadowguarddev.com>
|
||||
* Adriaan de Groot <groot@kde.org>
|
||||
* Aleksey Avdeev <solo@altlinux.ru>
|
||||
* Alexander Neundorf <neundorf@kde.org>
|
||||
* Alexander Smorkalov <alexander.smorkalov@itseez.com>
|
||||
* Alexey Sokolov <sokolov@google.com>
|
||||
* Alex Merry <alex.merry@kde.org>
|
||||
* Alex Turbov <i.zaufi@gmail.com>
|
||||
* Amine Ben Hassouna <amine.benhassouna@gmail.com>
|
||||
* Andreas Pakulat <apaku@gmx.de>
|
||||
* Andreas Schneider <asn@cryptomilk.org>
|
||||
* André Rigland Brodtkorb <Andre.Brodtkorb@ifi.uio.no>
|
||||
* Axel Huebl, Helmholtz-Zentrum Dresden - Rossendorf
|
||||
* Benjamin Eikel
|
||||
* Bjoern Ricks <bjoern.ricks@gmail.com>
|
||||
* Brad Hards <bradh@kde.org>
|
||||
* Christopher Harvey
|
||||
* Christoph Grüninger <foss@grueninger.de>
|
||||
* Clement Creusot <creusot@cs.york.ac.uk>
|
||||
* Daniel Blezek <blezek@gmail.com>
|
||||
* Daniel Pfeifer <daniel@pfeifer-mail.de>
|
||||
* Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
||||
* Eran Ifrah <eran.ifrah@gmail.com>
|
||||
* Esben Mose Hansen, Ange Optimization ApS
|
||||
* Geoffrey Viola <geoffrey.viola@asirobots.com>
|
||||
* Google Inc
|
||||
* Gregor Jasny
|
||||
* Helio Chissini de Castro <helio@kde.org>
|
||||
* Ilya Lavrenov <ilya.lavrenov@itseez.com>
|
||||
* Insight Software Consortium <insightsoftwareconsortium.org>
|
||||
* Jan Woetzel
|
||||
* Julien Schueller
|
||||
* Kelly Thompson <kgt@lanl.gov>
|
||||
* Laurent Montel <montel@kde.org>
|
||||
* Konstantin Podsvirov <konstantin@podsvirov.pro>
|
||||
* Mario Bensi <mbensi@ipsquad.net>
|
||||
* Martin Gräßlin <mgraesslin@kde.org>
|
||||
* Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
||||
* Matthaeus G. Chajdas
|
||||
* Matthias Kretz <kretz@kde.org>
|
||||
* Matthias Maennich <matthias@maennich.net>
|
||||
* Michael Hirsch, Ph.D. <www.scivision.co>
|
||||
* Michael Stürmer
|
||||
* Miguel A. Figueroa-Villanueva
|
||||
* Mike Jackson
|
||||
* Mike McQuaid <mike@mikemcquaid.com>
|
||||
* Nicolas Bock <nicolasbock@gmail.com>
|
||||
* Nicolas Despres <nicolas.despres@gmail.com>
|
||||
* Nikita Krupen'ko <krnekit@gmail.com>
|
||||
* NVIDIA Corporation <www.nvidia.com>
|
||||
* OpenGamma Ltd. <opengamma.com>
|
||||
* Patrick Stotko <stotko@cs.uni-bonn.de>
|
||||
* Per Øyvind Karlsen <peroyvind@mandriva.org>
|
||||
* Peter Collingbourne <peter@pcc.me.uk>
|
||||
* Petr Gotthard <gotthard@honeywell.com>
|
||||
* Philip Lowman <philip@yhbt.com>
|
||||
* Philippe Proulx <pproulx@efficios.com>
|
||||
* Raffi Enficiaud, Max Planck Society
|
||||
* Raumfeld <raumfeld.com>
|
||||
* Roger Leigh <rleigh@codelibre.net>
|
||||
* Rolf Eike Beer <eike@sf-mail.de>
|
||||
* Roman Donchenko <roman.donchenko@itseez.com>
|
||||
* Roman Kharitonov <roman.kharitonov@itseez.com>
|
||||
* Ruslan Baratov
|
||||
* Sebastian Holtermann <sebholt@xwmw.org>
|
||||
* Stephen Kelly <steveire@gmail.com>
|
||||
* Sylvain Joubert <joubert.sy@gmail.com>
|
||||
* Thomas Sondergaard <ts@medical-insight.com>
|
||||
* Tobias Hunger <tobias.hunger@qt.io>
|
||||
* Todd Gamblin <tgamblin@llnl.gov>
|
||||
* Tristan Carel
|
||||
* University of Dundee
|
||||
* Vadim Zhukov
|
||||
* Will Dicharry <wdicharry@stellarscience.com>
|
||||
|
||||
See version control history for details of individual contributions.
|
||||
|
||||
The above copyright and license notice applies to distributions of
|
||||
CMake in source and binary form. Third-party software packages supplied
|
||||
with CMake under compatible licenses provide their own copyright notices
|
||||
documented in corresponding subdirectories or source files.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
CMake was initially developed by Kitware with the following sponsorship:
|
||||
|
||||
* National Library of Medicine at the National Institutes of Health
|
||||
as part of the Insight Segmentation and Registration Toolkit (ITK).
|
||||
|
||||
* US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
|
||||
Visualization Initiative.
|
||||
|
||||
* National Alliance for Medical Image Computing (NAMIC) is funded by the
|
||||
National Institutes of Health through the NIH Roadmap for Medical Research,
|
||||
Grant U54 EB005149.
|
||||
|
||||
* Kitware, Inc.
|
@ -1,388 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
# Copyright 2019 Amine Ben Hassouna <amine.benhassouna@gmail.com>
|
||||
# Copyright 2000-2019 Kitware, Inc. and Contributors
|
||||
# All rights reserved.
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
|
||||
# * Neither the name of Kitware, Inc. nor the names of Contributors
|
||||
# may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindSDL2
|
||||
--------
|
||||
|
||||
Locate SDL2 library
|
||||
|
||||
This module defines the following 'IMPORTED' targets:
|
||||
|
||||
::
|
||||
|
||||
SDL2::Core
|
||||
The SDL2 library, if found.
|
||||
Libraries should link to SDL2::Core
|
||||
|
||||
SDL2::Main
|
||||
The SDL2main library, if found.
|
||||
Applications should link to SDL2::Main instead of SDL2::Core
|
||||
|
||||
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
::
|
||||
|
||||
SDL2_LIBRARIES, the name of the library to link against
|
||||
SDL2_INCLUDE_DIRS, where to find SDL.h
|
||||
SDL2_FOUND, if false, do not try to link to SDL2
|
||||
SDL2MAIN_FOUND, if false, do not try to link to SDL2main
|
||||
SDL2_VERSION_STRING, human-readable string containing the version of SDL2
|
||||
|
||||
|
||||
|
||||
This module responds to the following cache variables:
|
||||
|
||||
::
|
||||
|
||||
SDL2_PATH
|
||||
Set a custom SDL2 Library path (default: empty)
|
||||
|
||||
SDL2_NO_DEFAULT_PATH
|
||||
Disable search SDL2 Library in default path.
|
||||
If SDL2_PATH (default: ON)
|
||||
Else (default: OFF)
|
||||
|
||||
SDL2_INCLUDE_DIR
|
||||
SDL2 headers path.
|
||||
|
||||
SDL2_LIBRARY
|
||||
SDL2 Library (.dll, .so, .a, etc) path.
|
||||
|
||||
SDL2MAIN_LIBRAY
|
||||
SDL2main Library (.a) path.
|
||||
|
||||
SDL2_BUILDING_LIBRARY
|
||||
This flag is useful only when linking to SDL2_LIBRARIES insead of
|
||||
SDL2::Main. It is required only when building a library that links to
|
||||
SDL2_LIBRARIES, because only applications need main() (No need to also
|
||||
link to SDL2main).
|
||||
If this flag is defined, then no SDL2main will be added to SDL2_LIBRARIES
|
||||
and no SDL2::Main target will be created.
|
||||
|
||||
|
||||
Don't forget to include SDLmain.h and SDLmain.m in your project for the
|
||||
OS X framework based version. (Other versions link to -lSDL2main which
|
||||
this module will try to find on your behalf.) Also for OS X, this
|
||||
module will automatically add the -framework Cocoa on your behalf.
|
||||
|
||||
|
||||
Additional Note: If you see an empty SDL2_LIBRARY in your project
|
||||
configuration, it means CMake did not find your SDL2 library
|
||||
(SDL2.dll, libsdl2.so, SDL2.framework, etc). Set SDL2_LIBRARY to point
|
||||
to your SDL2 library, and configure again. Similarly, if you see an
|
||||
empty SDL2MAIN_LIBRARY, you should set this value as appropriate. These
|
||||
values are used to generate the final SDL2_LIBRARIES variable and the
|
||||
SDL2::Core and SDL2::Main targets, but when these values are unset,
|
||||
SDL2_LIBRARIES, SDL2::Core and SDL2::Main does not get created.
|
||||
|
||||
|
||||
$SDL2DIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2DIR used in building SDL2. l.e.galup 9-20-02
|
||||
|
||||
|
||||
|
||||
Created by Amine Ben Hassouna:
|
||||
Adapt FindSDL.cmake to SDL2 (FindSDL2.cmake).
|
||||
Add cache variables for more flexibility:
|
||||
SDL2_PATH, SDL2_NO_DEFAULT_PATH (for details, see doc above).
|
||||
Mark 'Threads' as a required dependency for non-OSX systems.
|
||||
Modernize the FindSDL2.cmake module by creating specific targets:
|
||||
SDL2::Core and SDL2::Main (for details, see doc above).
|
||||
|
||||
|
||||
Original FindSDL.cmake module:
|
||||
Modified by Eric Wing. Added code to assist with automated building
|
||||
by using environmental variables and providing a more
|
||||
controlled/consistent search behavior. Added new modifications to
|
||||
recognize OS X frameworks and additional Unix paths (FreeBSD, etc).
|
||||
Also corrected the header search path to follow "proper" SDL
|
||||
guidelines. Added a search for SDLmain which is needed by some
|
||||
platforms. Added a search for threads which is needed by some
|
||||
platforms. Added needed compile switches for MinGW.
|
||||
|
||||
On OSX, this will prefer the Framework version (if found) over others.
|
||||
People will have to manually change the cache value of SDL2_LIBRARY to
|
||||
override this selection or set the SDL2_PATH variable or the CMake
|
||||
environment CMAKE_INCLUDE_PATH to modify the search paths.
|
||||
|
||||
Note that the header path has changed from SDL/SDL.h to just SDL.h
|
||||
This needed to change because "proper" SDL convention is #include
|
||||
"SDL.h", not <SDL/SDL.h>. This is done for portability reasons
|
||||
because not all systems place things in SDL/ (see FreeBSD).
|
||||
#]=======================================================================]
|
||||
|
||||
# Define options for searching SDL2 Library in a custom path
|
||||
|
||||
set(SDL2_PATH "" CACHE STRING "Custom SDL2 Library path")
|
||||
|
||||
set(_SDL2_NO_DEFAULT_PATH OFF)
|
||||
if(SDL2_PATH)
|
||||
set(_SDL2_NO_DEFAULT_PATH ON)
|
||||
endif()
|
||||
|
||||
set(SDL2_NO_DEFAULT_PATH ${_SDL2_NO_DEFAULT_PATH}
|
||||
CACHE BOOL "Disable search SDL2 Library in default path")
|
||||
unset(_SDL2_NO_DEFAULT_PATH)
|
||||
|
||||
set(SDL2_NO_DEFAULT_PATH_CMD)
|
||||
if(SDL2_NO_DEFAULT_PATH)
|
||||
set(SDL2_NO_DEFAULT_PATH_CMD NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2 include directory
|
||||
find_path(SDL2_INCLUDE_DIR SDL.h
|
||||
HINTS
|
||||
ENV SDL2DIR
|
||||
${SDL2_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES SDL2
|
||||
# path suffixes to search inside ENV{SDL2DIR}
|
||||
include/SDL2 include
|
||||
PATHS ${SDL2_PATH}
|
||||
DOC "Where the SDL2 headers can be found"
|
||||
)
|
||||
|
||||
set(SDL2_INCLUDE_DIRS "${SDL2_INCLUDE_DIR}")
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(VC_LIB_PATH_SUFFIX lib/x64)
|
||||
else()
|
||||
set(VC_LIB_PATH_SUFFIX lib/x86)
|
||||
endif()
|
||||
|
||||
# SDL-2.0 is the name used by FreeBSD ports...
|
||||
# don't confuse it for the version number.
|
||||
find_library(SDL2_LIBRARY
|
||||
NAMES SDL2 SDL-2.0
|
||||
HINTS
|
||||
ENV SDL2DIR
|
||||
${SDL2_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
|
||||
PATHS ${SDL2_PATH}
|
||||
DOC "Where the SDL2 Library can be found"
|
||||
)
|
||||
|
||||
set(SDL2_LIBRARIES "${SDL2_LIBRARY}")
|
||||
|
||||
if(NOT SDL2_BUILDING_LIBRARY)
|
||||
if(NOT SDL2_INCLUDE_DIR MATCHES ".framework")
|
||||
# Non-OS X framework versions expect you to also dynamically link to
|
||||
# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
|
||||
# seem to provide SDL2main for compatibility even though they don't
|
||||
# necessarily need it.
|
||||
|
||||
if(SDL2_PATH)
|
||||
set(SDL2MAIN_LIBRARY_PATHS "${SDL2_PATH}")
|
||||
endif()
|
||||
|
||||
if(NOT SDL2_NO_DEFAULT_PATH)
|
||||
set(SDL2MAIN_LIBRARY_PATHS
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
"${SDL2MAIN_LIBRARY_PATHS}"
|
||||
)
|
||||
endif()
|
||||
|
||||
find_library(SDL2MAIN_LIBRARY
|
||||
NAMES SDL2main
|
||||
HINTS
|
||||
ENV SDL2DIR
|
||||
${SDL2_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
|
||||
PATHS ${SDL2MAIN_LIBRARY_PATHS}
|
||||
DOC "Where the SDL2main library can be found"
|
||||
)
|
||||
unset(SDL2MAIN_LIBRARY_PATHS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# SDL2 may require threads on your system.
|
||||
# The Apple build may not need an explicit flag because one of the
|
||||
# frameworks may already provide it.
|
||||
# But for non-OSX systems, I will use the CMake Threads package.
|
||||
if(NOT APPLE)
|
||||
find_package(Threads QUIET)
|
||||
if(NOT Threads_FOUND)
|
||||
set(SDL2_THREADS_NOT_FOUND "Could NOT find Threads (Threads is required by SDL2).")
|
||||
if(SDL2_FIND_REQUIRED)
|
||||
message(FATAL_ERROR ${SDL2_THREADS_NOT_FOUND})
|
||||
else()
|
||||
if(NOT SDL2_FIND_QUIETLY)
|
||||
message(STATUS ${SDL2_THREADS_NOT_FOUND})
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
unset(SDL2_THREADS_NOT_FOUND)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# MinGW needs an additional link flag, -mwindows
|
||||
# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -mwindows
|
||||
if(MINGW)
|
||||
set(MINGW32_LIBRARY mingw32 "-mwindows" CACHE STRING "link flags for MinGW")
|
||||
endif()
|
||||
|
||||
if(SDL2_LIBRARY)
|
||||
# For SDL2main
|
||||
if(SDL2MAIN_LIBRARY AND NOT SDL2_BUILDING_LIBRARY)
|
||||
list(FIND SDL2_LIBRARIES "${SDL2MAIN_LIBRARY}" _SDL2_MAIN_INDEX)
|
||||
if(_SDL2_MAIN_INDEX EQUAL -1)
|
||||
set(SDL2_LIBRARIES "${SDL2MAIN_LIBRARY}" ${SDL2_LIBRARIES})
|
||||
endif()
|
||||
unset(_SDL2_MAIN_INDEX)
|
||||
endif()
|
||||
|
||||
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
|
||||
# CMake doesn't display the -framework Cocoa string in the UI even
|
||||
# though it actually is there if I modify a pre-used variable.
|
||||
# I think it has something to do with the CACHE STRING.
|
||||
# So I use a temporary variable until the end so I can set the
|
||||
# "real" variable in one-shot.
|
||||
if(APPLE)
|
||||
set(SDL2_LIBRARIES ${SDL2_LIBRARIES} -framework Cocoa)
|
||||
endif()
|
||||
|
||||
# For threads, as mentioned Apple doesn't need this.
|
||||
# In fact, there seems to be a problem if I used the Threads package
|
||||
# and try using this line, so I'm just skipping it entirely for OS X.
|
||||
if(NOT APPLE)
|
||||
set(SDL2_LIBRARIES ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
|
||||
# For MinGW library
|
||||
if(MINGW)
|
||||
set(SDL2_LIBRARIES ${MINGW32_LIBRARY} ${SDL2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# Read SDL2 version
|
||||
if(SDL2_INCLUDE_DIR AND EXISTS "${SDL2_INCLUDE_DIR}/SDL_version.h")
|
||||
file(STRINGS "${SDL2_INCLUDE_DIR}/SDL_version.h" SDL2_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_MAJOR_VERSION[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_INCLUDE_DIR}/SDL_version.h" SDL2_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_MINOR_VERSION[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_INCLUDE_DIR}/SDL_version.h" SDL2_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_PATCHLEVEL[ \t]+[0-9]+$")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_MAJOR "${SDL2_VERSION_MAJOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_MINOR "${SDL2_VERSION_MINOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_PATCH "${SDL2_VERSION_PATCH_LINE}")
|
||||
set(SDL2_VERSION_STRING ${SDL2_VERSION_MAJOR}.${SDL2_VERSION_MINOR}.${SDL2_VERSION_PATCH})
|
||||
unset(SDL2_VERSION_MAJOR_LINE)
|
||||
unset(SDL2_VERSION_MINOR_LINE)
|
||||
unset(SDL2_VERSION_PATCH_LINE)
|
||||
unset(SDL2_VERSION_MAJOR)
|
||||
unset(SDL2_VERSION_MINOR)
|
||||
unset(SDL2_VERSION_PATCH)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2
|
||||
REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR
|
||||
VERSION_VAR SDL2_VERSION_STRING)
|
||||
|
||||
if(SDL2MAIN_LIBRARY)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2main
|
||||
REQUIRED_VARS SDL2MAIN_LIBRARY SDL2_INCLUDE_DIR
|
||||
VERSION_VAR SDL2_VERSION_STRING)
|
||||
endif()
|
||||
|
||||
|
||||
mark_as_advanced(SDL2_PATH
|
||||
SDL2_NO_DEFAULT_PATH
|
||||
SDL2_LIBRARY
|
||||
SDL2MAIN_LIBRARY
|
||||
SDL2_INCLUDE_DIR
|
||||
SDL2_BUILDING_LIBRARY)
|
||||
|
||||
|
||||
# SDL2:: targets (SDL2::Core and SDL2::Main)
|
||||
if(SDL2_FOUND)
|
||||
|
||||
# SDL2::Core target
|
||||
if(SDL2_LIBRARY AND NOT TARGET SDL2::Core)
|
||||
add_library(SDL2::Core UNKNOWN IMPORTED)
|
||||
set_target_properties(SDL2::Core PROPERTIES
|
||||
IMPORTED_LOCATION "${SDL2_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}")
|
||||
|
||||
if(APPLE)
|
||||
# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
|
||||
# For more details, please see above.
|
||||
set_property(TARGET SDL2::Core APPEND PROPERTY
|
||||
INTERFACE_LINK_OPTIONS -framework Cocoa)
|
||||
else()
|
||||
# For threads, as mentioned Apple doesn't need this.
|
||||
# For more details, please see above.
|
||||
set_property(TARGET SDL2::Core APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES Threads::Threads)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# SDL2::Main target
|
||||
# Applications should link to SDL2::Main instead of SDL2::Core
|
||||
# For more details, please see above.
|
||||
if(NOT SDL2_BUILDING_LIBRARY AND NOT TARGET SDL2::Main)
|
||||
|
||||
if(SDL2_INCLUDE_DIR MATCHES ".framework" OR NOT SDL2MAIN_LIBRARY)
|
||||
add_library(SDL2::Main INTERFACE IMPORTED)
|
||||
set_property(TARGET SDL2::Main PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES SDL2::Core)
|
||||
elseif(SDL2MAIN_LIBRARY)
|
||||
# MinGW requires that the mingw32 library is specified before the
|
||||
# libSDL2main.a static library when linking.
|
||||
# The SDL2::MainInternal target is used internally to make sure that
|
||||
# CMake respects this condition.
|
||||
add_library(SDL2::MainInternal UNKNOWN IMPORTED)
|
||||
set_property(TARGET SDL2::MainInternal PROPERTY
|
||||
IMPORTED_LOCATION "${SDL2MAIN_LIBRARY}")
|
||||
set_property(TARGET SDL2::MainInternal PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES SDL2::Core)
|
||||
|
||||
add_library(SDL2::Main INTERFACE IMPORTED)
|
||||
|
||||
if(MINGW)
|
||||
# MinGW needs an additional link flag '-mwindows' and link to mingw32
|
||||
set_property(TARGET SDL2::Main PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES "mingw32" "-mwindows")
|
||||
endif()
|
||||
|
||||
set_property(TARGET SDL2::Main APPEND PROPERTY
|
||||
INTERFACE_LINK_LIBRARIES SDL2::MainInternal)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endif()
|
@ -1,222 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
# Copyright 2019 Amine Ben Hassouna <amine.benhassouna@gmail.com>
|
||||
# Copyright 2000-2019 Kitware, Inc. and Contributors
|
||||
# All rights reserved.
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
|
||||
# * Neither the name of Kitware, Inc. nor the names of Contributors
|
||||
# may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindSDL2_gfx
|
||||
--------------
|
||||
|
||||
Locate SDL2_gfx library
|
||||
|
||||
This module defines the following 'IMPORTED' target:
|
||||
|
||||
::
|
||||
|
||||
SDL2::GFX
|
||||
The SDL2_gfx library, if found.
|
||||
Have SDL2::Core as a link dependency.
|
||||
|
||||
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
::
|
||||
|
||||
SDL2_GFX_LIBRARIES, the name of the library to link against
|
||||
SDL2_GFX_INCLUDE_DIRS, where to find the headers
|
||||
SDL2_GFX_FOUND, if false, do not try to link against
|
||||
SDL2_GFX_VERSION_STRING - human-readable string containing the
|
||||
version of SDL2_gfx
|
||||
|
||||
|
||||
|
||||
This module responds to the following cache variables:
|
||||
|
||||
::
|
||||
|
||||
SDL2_GFX_PATH
|
||||
Set a custom SDL2_gfx Library path (default: empty)
|
||||
|
||||
SDL2_GFX_NO_DEFAULT_PATH
|
||||
Disable search SDL2_gfx Library in default path.
|
||||
If SDL2_GFX_PATH (default: ON)
|
||||
Else (default: OFF)
|
||||
|
||||
SDL2_GFX_INCLUDE_DIR
|
||||
SDL2_gfx headers path.
|
||||
|
||||
SDL2_GFX_LIBRARY
|
||||
SDL2_gfx Library (.dll, .so, .a, etc) path.
|
||||
|
||||
|
||||
Additional Note: If you see an empty SDL2_GFX_LIBRARY in your project
|
||||
configuration, it means CMake did not find your SDL2_gfx library
|
||||
(SDL2_gfx.dll, libsdl2_gfx.so, etc). Set SDL2_GFX_LIBRARY to point
|
||||
to your SDL2_gfx library, and configure again. This value is used to
|
||||
generate the final SDL2_GFX_LIBRARIES variable and the SDL2::GFX target,
|
||||
but when this value is unset, SDL2_GFX_LIBRARIES and SDL2::GFX does not
|
||||
get created.
|
||||
|
||||
|
||||
$SDL2GFXDIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2GFXDIR used in building SDL2_gfx.
|
||||
|
||||
$SDL2DIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2DIR used in building SDL2.
|
||||
|
||||
|
||||
|
||||
Created by Amine Ben Hassouna:
|
||||
Adapt FindSDL_image.cmake to SDL2_gfx (FindSDL2_gfx.cmake).
|
||||
Add cache variables for more flexibility:
|
||||
SDL2_GFX_PATH, SDL2_GFX_NO_DEFAULT_PATH (for details, see doc above).
|
||||
Add SDL2 as a required dependency.
|
||||
Modernize the FindSDL2_gfx.cmake module by creating a specific target:
|
||||
SDL2::GFX (for details, see doc above).
|
||||
|
||||
Original FindSDL_image.cmake module:
|
||||
Created by Eric Wing. This was influenced by the FindSDL.cmake
|
||||
module, but with modifications to recognize OS X frameworks and
|
||||
additional Unix paths (FreeBSD, etc).
|
||||
#]=======================================================================]
|
||||
|
||||
# SDL2 Library required
|
||||
find_package(SDL2 QUIET)
|
||||
if(NOT SDL2_FOUND)
|
||||
set(SDL2_GFX_SDL2_NOT_FOUND "Could NOT find SDL2 (SDL2 is required by SDL2_gfx).")
|
||||
if(SDL2_gfx_FIND_REQUIRED)
|
||||
message(FATAL_ERROR ${SDL2_GFX_SDL2_NOT_FOUND})
|
||||
else()
|
||||
if(NOT SDL2_gfx_FIND_QUIETLY)
|
||||
message(STATUS ${SDL2_GFX_SDL2_NOT_FOUND})
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
unset(SDL2_GFX_SDL2_NOT_FOUND)
|
||||
endif()
|
||||
|
||||
|
||||
# Define options for searching SDL2_gfx Library in a custom path
|
||||
|
||||
set(SDL2_GFX_PATH "" CACHE STRING "Custom SDL2_gfx Library path")
|
||||
|
||||
set(_SDL2_GFX_NO_DEFAULT_PATH OFF)
|
||||
if(SDL2_GFX_PATH)
|
||||
set(_SDL2_GFX_NO_DEFAULT_PATH ON)
|
||||
endif()
|
||||
|
||||
set(SDL2_GFX_NO_DEFAULT_PATH ${_SDL2_GFX_NO_DEFAULT_PATH}
|
||||
CACHE BOOL "Disable search SDL2_gfx Library in default path")
|
||||
unset(_SDL2_GFX_NO_DEFAULT_PATH)
|
||||
|
||||
set(SDL2_GFX_NO_DEFAULT_PATH_CMD)
|
||||
if(SDL2_GFX_NO_DEFAULT_PATH)
|
||||
set(SDL2_GFX_NO_DEFAULT_PATH_CMD NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2_gfx include directory
|
||||
find_path(SDL2_GFX_INCLUDE_DIR SDL2_gfxPrimitives.h
|
||||
HINTS
|
||||
ENV SDL2GFXDIR
|
||||
ENV SDL2DIR
|
||||
${SDL2_GFX_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES SDL2
|
||||
# path suffixes to search inside ENV{SDL2DIR}
|
||||
# and ENV{SDL2GFXDIR}
|
||||
include/SDL2 include
|
||||
PATHS ${SDL2_GFX_PATH}
|
||||
DOC "Where the SDL2_gfx headers can be found"
|
||||
)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(VC_LIB_PATH_SUFFIX lib/x64)
|
||||
else()
|
||||
set(VC_LIB_PATH_SUFFIX lib/x86)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2_gfx library
|
||||
find_library(SDL2_GFX_LIBRARY
|
||||
NAMES SDL2_gfx
|
||||
HINTS
|
||||
ENV SDL2GFXDIR
|
||||
ENV SDL2DIR
|
||||
${SDL2_GFX_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
|
||||
PATHS ${SDL2_GFX_PATH}
|
||||
DOC "Where the SDL2_gfx Library can be found"
|
||||
)
|
||||
|
||||
# Read SDL2_gfx version
|
||||
if(SDL2_GFX_INCLUDE_DIR AND EXISTS "${SDL2_GFX_INCLUDE_DIR}/SDL2_gfxPrimitives.h")
|
||||
file(STRINGS "${SDL2_GFX_INCLUDE_DIR}/SDL2_gfxPrimitives.h" SDL2_GFX_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL2_GFXPRIMITIVES_MAJOR[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_GFX_INCLUDE_DIR}/SDL2_gfxPrimitives.h" SDL2_GFX_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL2_GFXPRIMITIVES_MINOR[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_GFX_INCLUDE_DIR}/SDL2_gfxPrimitives.h" SDL2_GFX_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL2_GFXPRIMITIVES_MICRO[ \t]+[0-9]+$")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL2_GFXPRIMITIVES_MAJOR[ \t]+([0-9]+)$" "\\1" SDL2_GFX_VERSION_MAJOR "${SDL2_GFX_VERSION_MAJOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL2_GFXPRIMITIVES_MINOR[ \t]+([0-9]+)$" "\\1" SDL2_GFX_VERSION_MINOR "${SDL2_GFX_VERSION_MINOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL2_GFXPRIMITIVES_MICRO[ \t]+([0-9]+)$" "\\1" SDL2_GFX_VERSION_PATCH "${SDL2_GFX_VERSION_PATCH_LINE}")
|
||||
set(SDL2_GFX_VERSION_STRING ${SDL2_GFX_VERSION_MAJOR}.${SDL2_GFX_VERSION_MINOR}.${SDL2_GFX_VERSION_PATCH})
|
||||
unset(SDL2_GFX_VERSION_MAJOR_LINE)
|
||||
unset(SDL2_GFX_VERSION_MINOR_LINE)
|
||||
unset(SDL2_GFX_VERSION_PATCH_LINE)
|
||||
unset(SDL2_GFX_VERSION_MAJOR)
|
||||
unset(SDL2_GFX_VERSION_MINOR)
|
||||
unset(SDL2_GFX_VERSION_PATCH)
|
||||
endif()
|
||||
|
||||
set(SDL2_GFX_LIBRARIES ${SDL2_GFX_LIBRARY})
|
||||
set(SDL2_GFX_INCLUDE_DIRS ${SDL2_GFX_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_gfx
|
||||
REQUIRED_VARS SDL2_GFX_LIBRARIES SDL2_GFX_INCLUDE_DIRS
|
||||
VERSION_VAR SDL2_GFX_VERSION_STRING)
|
||||
|
||||
|
||||
mark_as_advanced(SDL2_GFX_PATH
|
||||
SDL2_GFX_NO_DEFAULT_PATH
|
||||
SDL2_GFX_LIBRARY
|
||||
SDL2_GFX_INCLUDE_DIR)
|
||||
|
||||
|
||||
if(SDL2_GFX_FOUND)
|
||||
|
||||
# SDL2::GFX target
|
||||
if(SDL2_GFX_LIBRARY AND NOT TARGET SDL2::GFX)
|
||||
add_library(SDL2::GFX UNKNOWN IMPORTED)
|
||||
set_target_properties(SDL2::GFX PROPERTIES
|
||||
IMPORTED_LOCATION "${SDL2_GFX_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_GFX_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES SDL2::Core)
|
||||
endif()
|
||||
endif()
|
@ -1,222 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
# Copyright 2019 Amine Ben Hassouna <amine.benhassouna@gmail.com>
|
||||
# Copyright 2000-2019 Kitware, Inc. and Contributors
|
||||
# All rights reserved.
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
|
||||
# * Neither the name of Kitware, Inc. nor the names of Contributors
|
||||
# may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindSDL2_image
|
||||
--------------
|
||||
|
||||
Locate SDL2_image library
|
||||
|
||||
This module defines the following 'IMPORTED' target:
|
||||
|
||||
::
|
||||
|
||||
SDL2::Image
|
||||
The SDL2_image library, if found.
|
||||
Have SDL2::Core as a link dependency.
|
||||
|
||||
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
::
|
||||
|
||||
SDL2_IMAGE_LIBRARIES, the name of the library to link against
|
||||
SDL2_IMAGE_INCLUDE_DIRS, where to find the headers
|
||||
SDL2_IMAGE_FOUND, if false, do not try to link against
|
||||
SDL2_IMAGE_VERSION_STRING - human-readable string containing the
|
||||
version of SDL2_image
|
||||
|
||||
|
||||
|
||||
This module responds to the following cache variables:
|
||||
|
||||
::
|
||||
|
||||
SDL2_IMAGE_PATH
|
||||
Set a custom SDL2_image Library path (default: empty)
|
||||
|
||||
SDL2_IMAGE_NO_DEFAULT_PATH
|
||||
Disable search SDL2_image Library in default path.
|
||||
If SDL2_IMAGE_PATH (default: ON)
|
||||
Else (default: OFF)
|
||||
|
||||
SDL2_IMAGE_INCLUDE_DIR
|
||||
SDL2_image headers path.
|
||||
|
||||
SDL2_IMAGE_LIBRARY
|
||||
SDL2_image Library (.dll, .so, .a, etc) path.
|
||||
|
||||
|
||||
Additional Note: If you see an empty SDL2_IMAGE_LIBRARY in your project
|
||||
configuration, it means CMake did not find your SDL2_image library
|
||||
(SDL2_image.dll, libsdl2_image.so, etc). Set SDL2_IMAGE_LIBRARY to point
|
||||
to your SDL2_image library, and configure again. This value is used to
|
||||
generate the final SDL2_IMAGE_LIBRARIES variable and the SDL2::Image target,
|
||||
but when this value is unset, SDL2_IMAGE_LIBRARIES and SDL2::Image does not
|
||||
get created.
|
||||
|
||||
|
||||
$SDL2IMAGEDIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2IMAGEDIR used in building SDL2_image.
|
||||
|
||||
$SDL2DIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2DIR used in building SDL2.
|
||||
|
||||
|
||||
|
||||
Created by Amine Ben Hassouna:
|
||||
Adapt FindSDL_image.cmake to SDL2_image (FindSDL2_image.cmake).
|
||||
Add cache variables for more flexibility:
|
||||
SDL2_IMAGE_PATH, SDL2_IMAGE_NO_DEFAULT_PATH (for details, see doc above).
|
||||
Add SDL2 as a required dependency.
|
||||
Modernize the FindSDL2_image.cmake module by creating a specific target:
|
||||
SDL2::Image (for details, see doc above).
|
||||
|
||||
Original FindSDL_image.cmake module:
|
||||
Created by Eric Wing. This was influenced by the FindSDL.cmake
|
||||
module, but with modifications to recognize OS X frameworks and
|
||||
additional Unix paths (FreeBSD, etc).
|
||||
#]=======================================================================]
|
||||
|
||||
# SDL2 Library required
|
||||
find_package(SDL2 QUIET)
|
||||
if(NOT SDL2_FOUND)
|
||||
set(SDL2_IMAGE_SDL2_NOT_FOUND "Could NOT find SDL2 (SDL2 is required by SDL2_image).")
|
||||
if(SDL2_image_FIND_REQUIRED)
|
||||
message(FATAL_ERROR ${SDL2_IMAGE_SDL2_NOT_FOUND})
|
||||
else()
|
||||
if(NOT SDL2_image_FIND_QUIETLY)
|
||||
message(STATUS ${SDL2_IMAGE_SDL2_NOT_FOUND})
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
unset(SDL2_IMAGE_SDL2_NOT_FOUND)
|
||||
endif()
|
||||
|
||||
|
||||
# Define options for searching SDL2_image Library in a custom path
|
||||
|
||||
set(SDL2_IMAGE_PATH "" CACHE STRING "Custom SDL2_image Library path")
|
||||
|
||||
set(_SDL2_IMAGE_NO_DEFAULT_PATH OFF)
|
||||
if(SDL2_IMAGE_PATH)
|
||||
set(_SDL2_IMAGE_NO_DEFAULT_PATH ON)
|
||||
endif()
|
||||
|
||||
set(SDL2_IMAGE_NO_DEFAULT_PATH ${_SDL2_IMAGE_NO_DEFAULT_PATH}
|
||||
CACHE BOOL "Disable search SDL2_image Library in default path")
|
||||
unset(_SDL2_IMAGE_NO_DEFAULT_PATH)
|
||||
|
||||
set(SDL2_IMAGE_NO_DEFAULT_PATH_CMD)
|
||||
if(SDL2_IMAGE_NO_DEFAULT_PATH)
|
||||
set(SDL2_IMAGE_NO_DEFAULT_PATH_CMD NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2_image include directory
|
||||
find_path(SDL2_IMAGE_INCLUDE_DIR SDL_image.h
|
||||
HINTS
|
||||
ENV SDL2IMAGEDIR
|
||||
ENV SDL2DIR
|
||||
${SDL2_IMAGE_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES SDL2
|
||||
# path suffixes to search inside ENV{SDL2DIR}
|
||||
# and ENV{SDL2IMAGEDIR}
|
||||
include/SDL2 include
|
||||
PATHS ${SDL2_IMAGE_PATH}
|
||||
DOC "Where the SDL2_image headers can be found"
|
||||
)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(VC_LIB_PATH_SUFFIX lib/x64)
|
||||
else()
|
||||
set(VC_LIB_PATH_SUFFIX lib/x86)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2_image library
|
||||
find_library(SDL2_IMAGE_LIBRARY
|
||||
NAMES SDL2_image
|
||||
HINTS
|
||||
ENV SDL2IMAGEDIR
|
||||
ENV SDL2DIR
|
||||
${SDL2_IMAGE_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
|
||||
PATHS ${SDL2_IMAGE_PATH}
|
||||
DOC "Where the SDL2_image Library can be found"
|
||||
)
|
||||
|
||||
# Read SDL2_image version
|
||||
if(SDL2_IMAGE_INCLUDE_DIR AND EXISTS "${SDL2_IMAGE_INCLUDE_DIR}/SDL_image.h")
|
||||
file(STRINGS "${SDL2_IMAGE_INCLUDE_DIR}/SDL_image.h" SDL2_IMAGE_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_IMAGE_MAJOR_VERSION[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_IMAGE_INCLUDE_DIR}/SDL_image.h" SDL2_IMAGE_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_IMAGE_MINOR_VERSION[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_IMAGE_INCLUDE_DIR}/SDL_image.h" SDL2_IMAGE_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_IMAGE_PATCHLEVEL[ \t]+[0-9]+$")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_IMAGE_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_IMAGE_VERSION_MAJOR "${SDL2_IMAGE_VERSION_MAJOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_IMAGE_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_IMAGE_VERSION_MINOR "${SDL2_IMAGE_VERSION_MINOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_IMAGE_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_IMAGE_VERSION_PATCH "${SDL2_IMAGE_VERSION_PATCH_LINE}")
|
||||
set(SDL2_IMAGE_VERSION_STRING ${SDL2_IMAGE_VERSION_MAJOR}.${SDL2_IMAGE_VERSION_MINOR}.${SDL2_IMAGE_VERSION_PATCH})
|
||||
unset(SDL2_IMAGE_VERSION_MAJOR_LINE)
|
||||
unset(SDL2_IMAGE_VERSION_MINOR_LINE)
|
||||
unset(SDL2_IMAGE_VERSION_PATCH_LINE)
|
||||
unset(SDL2_IMAGE_VERSION_MAJOR)
|
||||
unset(SDL2_IMAGE_VERSION_MINOR)
|
||||
unset(SDL2_IMAGE_VERSION_PATCH)
|
||||
endif()
|
||||
|
||||
set(SDL2_IMAGE_LIBRARIES ${SDL2_IMAGE_LIBRARY})
|
||||
set(SDL2_IMAGE_INCLUDE_DIRS ${SDL2_IMAGE_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_image
|
||||
REQUIRED_VARS SDL2_IMAGE_LIBRARIES SDL2_IMAGE_INCLUDE_DIRS
|
||||
VERSION_VAR SDL2_IMAGE_VERSION_STRING)
|
||||
|
||||
|
||||
mark_as_advanced(SDL2_IMAGE_PATH
|
||||
SDL2_IMAGE_NO_DEFAULT_PATH
|
||||
SDL2_IMAGE_LIBRARY
|
||||
SDL2_IMAGE_INCLUDE_DIR)
|
||||
|
||||
|
||||
if(SDL2_IMAGE_FOUND)
|
||||
|
||||
# SDL2::Image target
|
||||
if(SDL2_IMAGE_LIBRARY AND NOT TARGET SDL2::Image)
|
||||
add_library(SDL2::Image UNKNOWN IMPORTED)
|
||||
set_target_properties(SDL2::Image PROPERTIES
|
||||
IMPORTED_LOCATION "${SDL2_IMAGE_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_IMAGE_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES SDL2::Core)
|
||||
endif()
|
||||
endif()
|
@ -1,220 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
# Copyright 2019 Amine Ben Hassouna <amine.benhassouna@gmail.com>
|
||||
# Copyright 2000-2019 Kitware, Inc. and Contributors
|
||||
# All rights reserved.
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
|
||||
# * Neither the name of Kitware, Inc. nor the names of Contributors
|
||||
# may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindSDL2_mixer
|
||||
--------------
|
||||
|
||||
Locate SDL2_mixer library
|
||||
|
||||
This module defines the following 'IMPORTED' target:
|
||||
|
||||
::
|
||||
|
||||
SDL2::Mixer
|
||||
The SDL2_mixer library, if found.
|
||||
Have SDL2::Core as a link dependency.
|
||||
|
||||
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
::
|
||||
|
||||
SDL2_MIXER_LIBRARIES, the name of the library to link against
|
||||
SDL2_MIXER_INCLUDE_DIRS, where to find the headers
|
||||
SDL2_MIXER_FOUND, if false, do not try to link against
|
||||
SDL2_MIXER_VERSION_STRING - human-readable string containing the
|
||||
version of SDL2_mixer
|
||||
|
||||
This module responds to the following cache variables:
|
||||
|
||||
::
|
||||
|
||||
SDL2_MIXER_PATH
|
||||
Set a custom SDL2_mixer Library path (default: empty)
|
||||
|
||||
SDL2_MIXER_NO_DEFAULT_PATH
|
||||
Disable search SDL2_mixer Library in default path.
|
||||
If SDL2_MIXER_PATH (default: ON)
|
||||
Else (default: OFF)
|
||||
|
||||
SDL2_MIXER_INCLUDE_DIR
|
||||
SDL2_mixer headers path.
|
||||
|
||||
SDL2_MIXER_LIBRARY
|
||||
SDL2_mixer Library (.dll, .so, .a, etc) path.
|
||||
|
||||
|
||||
Additional Note: If you see an empty SDL2_MIXER_LIBRARY in your project
|
||||
configuration, it means CMake did not find your SDL2_mixer library
|
||||
(SDL2_mixer.dll, libsdl2_mixer.so, etc). Set SDL2_MIXER_LIBRARY to point
|
||||
to your SDL2_mixer library, and configure again. This value is used to
|
||||
generate the final SDL2_MIXER_LIBRARIES variable and the SDL2::Mixer target,
|
||||
but when this value is unset, SDL2_MIXER_LIBRARIES and SDL2::Mixer does not
|
||||
get created.
|
||||
|
||||
|
||||
$SDL2MIXERDIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2MIXERDIR used in building SDL2_mixer.
|
||||
|
||||
$SDL2DIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2DIR used in building SDL2.
|
||||
|
||||
|
||||
|
||||
Created by Amine Ben Hassouna:
|
||||
Adapt FindSDL_mixer.cmake to SDL2_mixer (FindSDL2_mixer.cmake).
|
||||
Add cache variables for more flexibility:
|
||||
SDL2_MIXER_PATH, SDL2_MIXER_NO_DEFAULT_PATH (for details, see doc above).
|
||||
Add SDL2 as a required dependency.
|
||||
Modernize the FindSDL2_mixer.cmake module by creating a specific target:
|
||||
SDL2::Mixer (for details, see doc above).
|
||||
|
||||
Original FindSDL_mixer.cmake module:
|
||||
Created by Eric Wing. This was influenced by the FindSDL.cmake
|
||||
module, but with modifications to recognize OS X frameworks and
|
||||
additional Unix paths (FreeBSD, etc).
|
||||
#]=======================================================================]
|
||||
|
||||
# SDL2 Library required
|
||||
find_package(SDL2 QUIET)
|
||||
if(NOT SDL2_FOUND)
|
||||
set(SDL2_MIXER_SDL2_NOT_FOUND "Could NOT find SDL2 (SDL2 is required by SDL2_mixer).")
|
||||
if(SDL2_mixer_FIND_REQUIRED)
|
||||
message(FATAL_ERROR ${SDL2_MIXER_SDL2_NOT_FOUND})
|
||||
else()
|
||||
if(NOT SDL2_mixer_FIND_QUIETLY)
|
||||
message(STATUS ${SDL2_MIXER_SDL2_NOT_FOUND})
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
unset(SDL2_MIXER_SDL2_NOT_FOUND)
|
||||
endif()
|
||||
|
||||
|
||||
# Define options for searching SDL2_mixer Library in a custom path
|
||||
|
||||
set(SDL2_MIXER_PATH "" CACHE STRING "Custom SDL2_mixer Library path")
|
||||
|
||||
set(_SDL2_MIXER_NO_DEFAULT_PATH OFF)
|
||||
if(SDL2_MIXER_PATH)
|
||||
set(_SDL2_MIXER_NO_DEFAULT_PATH ON)
|
||||
endif()
|
||||
|
||||
set(SDL2_MIXER_NO_DEFAULT_PATH ${_SDL2_MIXER_NO_DEFAULT_PATH}
|
||||
CACHE BOOL "Disable search SDL2_mixer Library in default path")
|
||||
unset(_SDL2_MIXER_NO_DEFAULT_PATH)
|
||||
|
||||
set(SDL2_MIXER_NO_DEFAULT_PATH_CMD)
|
||||
if(SDL2_MIXER_NO_DEFAULT_PATH)
|
||||
set(SDL2_MIXER_NO_DEFAULT_PATH_CMD NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2_mixer include directory
|
||||
find_path(SDL2_MIXER_INCLUDE_DIR SDL_mixer.h
|
||||
HINTS
|
||||
ENV SDL2MIXERDIR
|
||||
ENV SDL2DIR
|
||||
${SDL2_MIXER_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES SDL2
|
||||
# path suffixes to search inside ENV{SDL2DIR}
|
||||
# and ENV{SDL2MIXERDIR}
|
||||
include/SDL2 include
|
||||
PATHS ${SDL2_MIXER_PATH}
|
||||
DOC "Where the SDL2_mixer headers can be found"
|
||||
)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(VC_LIB_PATH_SUFFIX lib/x64)
|
||||
else()
|
||||
set(VC_LIB_PATH_SUFFIX lib/x86)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2_mixer library
|
||||
find_library(SDL2_MIXER_LIBRARY
|
||||
NAMES SDL2_mixer
|
||||
HINTS
|
||||
ENV SDL2MIXERDIR
|
||||
ENV SDL2DIR
|
||||
${SDL2_MIXER_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
|
||||
PATHS ${SDL2_MIXER_PATH}
|
||||
DOC "Where the SDL2_mixer Library can be found"
|
||||
)
|
||||
|
||||
# Read SDL2_mixer version
|
||||
if(SDL2_MIXER_INCLUDE_DIR AND EXISTS "${SDL2_MIXER_INCLUDE_DIR}/SDL_mixer.h")
|
||||
file(STRINGS "${SDL2_MIXER_INCLUDE_DIR}/SDL_mixer.h" SDL2_MIXER_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_MIXER_MAJOR_VERSION[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_MIXER_INCLUDE_DIR}/SDL_mixer.h" SDL2_MIXER_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_MIXER_MINOR_VERSION[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_MIXER_INCLUDE_DIR}/SDL_mixer.h" SDL2_MIXER_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_MIXER_PATCHLEVEL[ \t]+[0-9]+$")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_MIXER_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_MIXER_VERSION_MAJOR "${SDL2_MIXER_VERSION_MAJOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_MIXER_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_MIXER_VERSION_MINOR "${SDL2_MIXER_VERSION_MINOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_MIXER_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_MIXER_VERSION_PATCH "${SDL2_MIXER_VERSION_PATCH_LINE}")
|
||||
set(SDL2_MIXER_VERSION_STRING ${SDL2_MIXER_VERSION_MAJOR}.${SDL2_MIXER_VERSION_MINOR}.${SDL2_MIXER_VERSION_PATCH})
|
||||
unset(SDL2_MIXER_VERSION_MAJOR_LINE)
|
||||
unset(SDL2_MIXER_VERSION_MINOR_LINE)
|
||||
unset(SDL2_MIXER_VERSION_PATCH_LINE)
|
||||
unset(SDL2_MIXER_VERSION_MAJOR)
|
||||
unset(SDL2_MIXER_VERSION_MINOR)
|
||||
unset(SDL2_MIXER_VERSION_PATCH)
|
||||
endif()
|
||||
|
||||
set(SDL2_MIXER_LIBRARIES ${SDL2_MIXER_LIBRARY})
|
||||
set(SDL2_MIXER_INCLUDE_DIRS ${SDL2_MIXER_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_mixer
|
||||
REQUIRED_VARS SDL2_MIXER_LIBRARIES SDL2_MIXER_INCLUDE_DIRS
|
||||
VERSION_VAR SDL2_MIXER_VERSION_STRING)
|
||||
|
||||
|
||||
mark_as_advanced(SDL2_MIXER_PATH
|
||||
SDL2_MIXER_NO_DEFAULT_PATH
|
||||
SDL2_MIXER_LIBRARY
|
||||
SDL2_MIXER_INCLUDE_DIR)
|
||||
|
||||
|
||||
if(SDL2_MIXER_FOUND)
|
||||
|
||||
# SDL2::Mixer target
|
||||
if(SDL2_MIXER_LIBRARY AND NOT TARGET SDL2::Mixer)
|
||||
add_library(SDL2::Mixer UNKNOWN IMPORTED)
|
||||
set_target_properties(SDL2::Mixer PROPERTIES
|
||||
IMPORTED_LOCATION "${SDL2_MIXER_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_MIXER_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES SDL2::Core)
|
||||
endif()
|
||||
endif()
|
@ -1,222 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
# Copyright 2019 Amine Ben Hassouna <amine.benhassouna@gmail.com>
|
||||
# Copyright 2000-2019 Kitware, Inc. and Contributors
|
||||
# All rights reserved.
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
|
||||
# * Neither the name of Kitware, Inc. nor the names of Contributors
|
||||
# may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindSDL2_net
|
||||
------------
|
||||
|
||||
Locate SDL2_net library
|
||||
|
||||
This module defines the following 'IMPORTED' target:
|
||||
|
||||
::
|
||||
|
||||
SDL2::Net
|
||||
The SDL2_net library, if found.
|
||||
Have SDL2::Core as a link dependency.
|
||||
|
||||
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
::
|
||||
|
||||
SDL2_NET_LIBRARIES, the name of the library to link against
|
||||
SDL2_NET_INCLUDE_DIRS, where to find the headers
|
||||
SDL2_NET_FOUND, if false, do not try to link against
|
||||
SDL2_NET_VERSION_STRING - human-readable string containing the
|
||||
version of SDL2_net
|
||||
|
||||
|
||||
|
||||
This module responds to the following cache variables:
|
||||
|
||||
::
|
||||
|
||||
SDL2_NET_PATH
|
||||
Set a custom SDL2_net Library path (default: empty)
|
||||
|
||||
SDL2_NET_NO_DEFAULT_PATH
|
||||
Disable search SDL2_net Library in default path.
|
||||
If SDL2_NET_PATH (default: ON)
|
||||
Else (default: OFF)
|
||||
|
||||
SDL2_NET_INCLUDE_DIR
|
||||
SDL2_net headers path.
|
||||
|
||||
SDL2_NET_LIBRARY
|
||||
SDL2_net Library (.dll, .so, .a, etc) path.
|
||||
|
||||
|
||||
Additional Note: If you see an empty SDL2_NET_LIBRARY in your project
|
||||
configuration, it means CMake did not find your SDL2_net library
|
||||
(SDL2_net.dll, libsdl2_net.so, etc). Set SDL2_NET_LIBRARY to point
|
||||
to your SDL2_net library, and configure again. This value is used to
|
||||
generate the final SDL2_NET_LIBRARIES variable and the SDL2::Net target,
|
||||
but when this value is unset, SDL2_NET_LIBRARIES and SDL2::Net does not
|
||||
get created.
|
||||
|
||||
|
||||
$SDL2NETDIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2NETDIR used in building SDL2_net.
|
||||
|
||||
$SDL2DIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2DIR used in building SDL2.
|
||||
|
||||
|
||||
|
||||
Created by Amine Ben Hassouna:
|
||||
Adapt FindSDL_net.cmake to SDL2_net (FindSDL2_net.cmake).
|
||||
Add cache variables for more flexibility:
|
||||
SDL2_NET_PATH, SDL2_NET_NO_DEFAULT_PATH (for details, see doc above).
|
||||
Add SDL2 as a required dependency.
|
||||
Modernize the FindSDL2_net.cmake module by creating a specific target:
|
||||
SDL2::Net (for details, see doc above).
|
||||
|
||||
Original FindSDL_net.cmake module:
|
||||
Created by Eric Wing. This was influenced by the FindSDL.cmake
|
||||
module, but with modifications to recognize OS X frameworks and
|
||||
additional Unix paths (FreeBSD, etc).
|
||||
#]=======================================================================]
|
||||
|
||||
# SDL2 Library required
|
||||
find_package(SDL2 QUIET)
|
||||
if(NOT SDL2_FOUND)
|
||||
set(SDL2_NET_SDL2_NOT_FOUND "Could NOT find SDL2 (SDL2 is required by SDL2_net).")
|
||||
if(SDL2_net_FIND_REQUIRED)
|
||||
message(FATAL_ERROR ${SDL2_NET_SDL2_NOT_FOUND})
|
||||
else()
|
||||
if(NOT SDL2_net_FIND_QUIETLY)
|
||||
message(STATUS ${SDL2_NET_SDL2_NOT_FOUND})
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
unset(SDL2_NET_SDL2_NOT_FOUND)
|
||||
endif()
|
||||
|
||||
|
||||
# Define options for searching SDL2_net Library in a custom path
|
||||
|
||||
set(SDL2_NET_PATH "" CACHE STRING "Custom SDL2_net Library path")
|
||||
|
||||
set(_SDL2_NET_NO_DEFAULT_PATH OFF)
|
||||
if(SDL2_NET_PATH)
|
||||
set(_SDL2_NET_NO_DEFAULT_PATH ON)
|
||||
endif()
|
||||
|
||||
set(SDL2_NET_NO_DEFAULT_PATH ${_SDL2_NET_NO_DEFAULT_PATH}
|
||||
CACHE BOOL "Disable search SDL2_net Library in default path")
|
||||
unset(_SDL2_NET_NO_DEFAULT_PATH)
|
||||
|
||||
set(SDL2_NET_NO_DEFAULT_PATH_CMD)
|
||||
if(SDL2_NET_NO_DEFAULT_PATH)
|
||||
set(SDL2_NET_NO_DEFAULT_PATH_CMD NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2_net include directory
|
||||
find_path(SDL2_NET_INCLUDE_DIR SDL_net.h
|
||||
HINTS
|
||||
ENV SDL2NETDIR
|
||||
ENV SDL2DIR
|
||||
${SDL2_NET_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES SDL2
|
||||
# path suffixes to search inside ENV{SDL2DIR}
|
||||
# and ENV{SDL2NETDIR}
|
||||
include/SDL2 include
|
||||
PATHS ${SDL2_NET_PATH}
|
||||
DOC "Where the SDL2_net headers can be found"
|
||||
)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(VC_LIB_PATH_SUFFIX lib/x64)
|
||||
else()
|
||||
set(VC_LIB_PATH_SUFFIX lib/x86)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2_net library
|
||||
find_library(SDL2_NET_LIBRARY
|
||||
NAMES SDL2_net
|
||||
HINTS
|
||||
ENV SDL2NETDIR
|
||||
ENV SDL2DIR
|
||||
${SDL2_NET_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
|
||||
PATHS ${SDL2_NET_PATH}
|
||||
DOC "Where the SDL2_net Library can be found"
|
||||
)
|
||||
|
||||
# Read SDL2_net version
|
||||
if(SDL2_NET_INCLUDE_DIR AND EXISTS "${SDL2_NET_INCLUDE_DIR}/SDL_net.h")
|
||||
file(STRINGS "${SDL2_NET_INCLUDE_DIR}/SDL_net.h" SDL2_NET_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_NET_MAJOR_VERSION[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_NET_INCLUDE_DIR}/SDL_net.h" SDL2_NET_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_NET_MINOR_VERSION[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_NET_INCLUDE_DIR}/SDL_net.h" SDL2_NET_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_NET_PATCHLEVEL[ \t]+[0-9]+$")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_NET_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_NET_VERSION_MAJOR "${SDL2_NET_VERSION_MAJOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_NET_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_NET_VERSION_MINOR "${SDL2_NET_VERSION_MINOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_NET_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_NET_VERSION_PATCH "${SDL2_NET_VERSION_PATCH_LINE}")
|
||||
set(SDL2_NET_VERSION_STRING ${SDL2_NET_VERSION_MAJOR}.${SDL2_NET_VERSION_MINOR}.${SDL2_NET_VERSION_PATCH})
|
||||
unset(SDL2_NET_VERSION_MAJOR_LINE)
|
||||
unset(SDL2_NET_VERSION_MINOR_LINE)
|
||||
unset(SDL2_NET_VERSION_PATCH_LINE)
|
||||
unset(SDL2_NET_VERSION_MAJOR)
|
||||
unset(SDL2_NET_VERSION_MINOR)
|
||||
unset(SDL2_NET_VERSION_PATCH)
|
||||
endif()
|
||||
|
||||
set(SDL2_NET_LIBRARIES ${SDL2_NET_LIBRARY})
|
||||
set(SDL2_NET_INCLUDE_DIRS ${SDL2_NET_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_net
|
||||
REQUIRED_VARS SDL2_NET_LIBRARIES SDL2_NET_INCLUDE_DIRS
|
||||
VERSION_VAR SDL2_NET_VERSION_STRING)
|
||||
|
||||
|
||||
mark_as_advanced(SDL2_NET_PATH
|
||||
SDL2_NET_NO_DEFAULT_PATH
|
||||
SDL2_NET_LIBRARY
|
||||
SDL2_NET_INCLUDE_DIR)
|
||||
|
||||
|
||||
if(SDL2_NET_FOUND)
|
||||
|
||||
# SDL2::Net target
|
||||
if(SDL2_NET_LIBRARY AND NOT TARGET SDL2::Net)
|
||||
add_library(SDL2::Net UNKNOWN IMPORTED)
|
||||
set_target_properties(SDL2::Net PROPERTIES
|
||||
IMPORTED_LOCATION "${SDL2_NET_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_NET_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES SDL2::Core)
|
||||
endif()
|
||||
endif()
|
@ -1,222 +0,0 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
# Copyright 2019 Amine Ben Hassouna <amine.benhassouna@gmail.com>
|
||||
# Copyright 2000-2019 Kitware, Inc. and Contributors
|
||||
# All rights reserved.
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
|
||||
# * Neither the name of Kitware, Inc. nor the names of Contributors
|
||||
# may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindSDL2_ttf
|
||||
------------
|
||||
|
||||
Locate SDL2_ttf library
|
||||
|
||||
This module defines the following 'IMPORTED' target:
|
||||
|
||||
::
|
||||
|
||||
SDL2::TTF
|
||||
The SDL2_ttf library, if found.
|
||||
Have SDL2::Core as a link dependency.
|
||||
|
||||
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
::
|
||||
|
||||
SDL2_TTF_LIBRARIES, the name of the library to link against
|
||||
SDL2_TTF_INCLUDE_DIRS, where to find the headers
|
||||
SDL2_TTF_FOUND, if false, do not try to link against
|
||||
SDL2_TTF_VERSION_STRING - human-readable string containing the
|
||||
version of SDL2_ttf
|
||||
|
||||
|
||||
|
||||
This module responds to the following cache variables:
|
||||
|
||||
::
|
||||
|
||||
SDL2_TTF_PATH
|
||||
Set a custom SDL2_ttf Library path (default: empty)
|
||||
|
||||
SDL2_TTF_NO_DEFAULT_PATH
|
||||
Disable search SDL2_ttf Library in default path.
|
||||
If SDL2_TTF_PATH (default: ON)
|
||||
Else (default: OFF)
|
||||
|
||||
SDL2_TTF_INCLUDE_DIR
|
||||
SDL2_ttf headers path.
|
||||
|
||||
SDL2_TTF_LIBRARY
|
||||
SDL2_ttf Library (.dll, .so, .a, etc) path.
|
||||
|
||||
|
||||
Additional Note: If you see an empty SDL2_TTF_LIBRARY in your project
|
||||
configuration, it means CMake did not find your SDL2_ttf library
|
||||
(SDL2_ttf.dll, libsdl2_ttf.so, etc). Set SDL2_TTF_LIBRARY to point
|
||||
to your SDL2_ttf library, and configure again. This value is used to
|
||||
generate the final SDL2_TTF_LIBRARIES variable and the SDL2::TTF target,
|
||||
but when this value is unset, SDL2_TTF_LIBRARIES and SDL2::TTF does not
|
||||
get created.
|
||||
|
||||
|
||||
$SDL2TTFDIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2TTFDIR used in building SDL2_ttf.
|
||||
|
||||
$SDL2DIR is an environment variable that would correspond to the
|
||||
./configure --prefix=$SDL2DIR used in building SDL2.
|
||||
|
||||
|
||||
|
||||
Created by Amine Ben Hassouna:
|
||||
Adapt FindSDL_ttf.cmake to SDL2_ttf (FindSDL2_ttf.cmake).
|
||||
Add cache variables for more flexibility:
|
||||
SDL2_TTF_PATH, SDL2_TTF_NO_DEFAULT_PATH (for details, see doc above).
|
||||
Add SDL2 as a required dependency.
|
||||
Modernize the FindSDL2_ttf.cmake module by creating a specific target:
|
||||
SDL2::TTF (for details, see doc above).
|
||||
|
||||
Original FindSDL_ttf.cmake module:
|
||||
Created by Eric Wing. This was influenced by the FindSDL.cmake
|
||||
module, but with modifications to recognize OS X frameworks and
|
||||
additional Unix paths (FreeBSD, etc).
|
||||
#]=======================================================================]
|
||||
|
||||
# SDL2 Library required
|
||||
find_package(SDL2 QUIET)
|
||||
if(NOT SDL2_FOUND)
|
||||
set(SDL2_TTF_SDL2_NOT_FOUND "Could NOT find SDL2 (SDL2 is required by SDL2_ttf).")
|
||||
if(SDL2_ttf_FIND_REQUIRED)
|
||||
message(FATAL_ERROR ${SDL2_TTF_SDL2_NOT_FOUND})
|
||||
else()
|
||||
if(NOT SDL2_ttf_FIND_QUIETLY)
|
||||
message(STATUS ${SDL2_TTF_SDL2_NOT_FOUND})
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
unset(SDL2_TTF_SDL2_NOT_FOUND)
|
||||
endif()
|
||||
|
||||
|
||||
# Define options for searching SDL2_ttf Library in a custom path
|
||||
|
||||
set(SDL2_TTF_PATH "" CACHE STRING "Custom SDL2_ttf Library path")
|
||||
|
||||
set(_SDL2_TTF_NO_DEFAULT_PATH OFF)
|
||||
if(SDL2_TTF_PATH)
|
||||
set(_SDL2_TTF_NO_DEFAULT_PATH ON)
|
||||
endif()
|
||||
|
||||
set(SDL2_TTF_NO_DEFAULT_PATH ${_SDL2_TTF_NO_DEFAULT_PATH}
|
||||
CACHE BOOL "Disable search SDL2_ttf Library in default path")
|
||||
unset(_SDL2_TTF_NO_DEFAULT_PATH)
|
||||
|
||||
set(SDL2_TTF_NO_DEFAULT_PATH_CMD)
|
||||
if(SDL2_TTF_NO_DEFAULT_PATH)
|
||||
set(SDL2_TTF_NO_DEFAULT_PATH_CMD NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2_ttf include directory
|
||||
find_path(SDL2_TTF_INCLUDE_DIR SDL_ttf.h
|
||||
HINTS
|
||||
ENV SDL2TTFDIR
|
||||
ENV SDL2DIR
|
||||
${SDL2_TTF_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES SDL2
|
||||
# path suffixes to search inside ENV{SDL2DIR}
|
||||
# and ENV{SDL2TTFDIR}
|
||||
include/SDL2 include
|
||||
PATHS ${SDL2_TTF_PATH}
|
||||
DOC "Where the SDL2_ttf headers can be found"
|
||||
)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(VC_LIB_PATH_SUFFIX lib/x64)
|
||||
else()
|
||||
set(VC_LIB_PATH_SUFFIX lib/x86)
|
||||
endif()
|
||||
|
||||
# Search for the SDL2_ttf library
|
||||
find_library(SDL2_TTF_LIBRARY
|
||||
NAMES SDL2_ttf
|
||||
HINTS
|
||||
ENV SDL2TTFDIR
|
||||
ENV SDL2DIR
|
||||
${SDL2_TTF_NO_DEFAULT_PATH_CMD}
|
||||
PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
|
||||
PATHS ${SDL2_TTF_PATH}
|
||||
DOC "Where the SDL2_ttf Library can be found"
|
||||
)
|
||||
|
||||
# Read SDL2_ttf version
|
||||
if(SDL2_TTF_INCLUDE_DIR AND EXISTS "${SDL2_TTF_INCLUDE_DIR}/SDL_ttf.h")
|
||||
file(STRINGS "${SDL2_TTF_INCLUDE_DIR}/SDL_ttf.h" SDL2_TTF_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_TTF_MAJOR_VERSION[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_TTF_INCLUDE_DIR}/SDL_ttf.h" SDL2_TTF_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_TTF_MINOR_VERSION[ \t]+[0-9]+$")
|
||||
file(STRINGS "${SDL2_TTF_INCLUDE_DIR}/SDL_ttf.h" SDL2_TTF_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_TTF_PATCHLEVEL[ \t]+[0-9]+$")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_TTF_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_TTF_VERSION_MAJOR "${SDL2_TTF_VERSION_MAJOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_TTF_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_TTF_VERSION_MINOR "${SDL2_TTF_VERSION_MINOR_LINE}")
|
||||
string(REGEX REPLACE "^#define[ \t]+SDL_TTF_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_TTF_VERSION_PATCH "${SDL2_TTF_VERSION_PATCH_LINE}")
|
||||
set(SDL2_TTF_VERSION_STRING ${SDL2_TTF_VERSION_MAJOR}.${SDL2_TTF_VERSION_MINOR}.${SDL2_TTF_VERSION_PATCH})
|
||||
unset(SDL2_TTF_VERSION_MAJOR_LINE)
|
||||
unset(SDL2_TTF_VERSION_MINOR_LINE)
|
||||
unset(SDL2_TTF_VERSION_PATCH_LINE)
|
||||
unset(SDL2_TTF_VERSION_MAJOR)
|
||||
unset(SDL2_TTF_VERSION_MINOR)
|
||||
unset(SDL2_TTF_VERSION_PATCH)
|
||||
endif()
|
||||
|
||||
set(SDL2_TTF_LIBRARIES ${SDL2_TTF_LIBRARY})
|
||||
set(SDL2_TTF_INCLUDE_DIRS ${SDL2_TTF_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_ttf
|
||||
REQUIRED_VARS SDL2_TTF_LIBRARIES SDL2_TTF_INCLUDE_DIRS
|
||||
VERSION_VAR SDL2_TTF_VERSION_STRING)
|
||||
|
||||
|
||||
mark_as_advanced(SDL2_TTF_PATH
|
||||
SDL2_TTF_NO_DEFAULT_PATH
|
||||
SDL2_TTF_LIBRARY
|
||||
SDL2_TTF_INCLUDE_DIR)
|
||||
|
||||
|
||||
if(SDL2_TTF_FOUND)
|
||||
|
||||
# SDL2::TTF target
|
||||
if(SDL2_TTF_LIBRARY AND NOT TARGET SDL2::TTF)
|
||||
add_library(SDL2::TTF UNKNOWN IMPORTED)
|
||||
set_target_properties(SDL2::TTF PROPERTIES
|
||||
IMPORTED_LOCATION "${SDL2_TTF_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_TTF_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES SDL2::Core)
|
||||
endif()
|
||||
endif()
|
@ -1,179 +0,0 @@
|
||||
# SDL2 CMake modules
|
||||
|
||||
This repository contains [CMake][] modules for finding and using the SDL2
|
||||
library as well as other related libraries:
|
||||
|
||||
- [SDL2][]
|
||||
- [SDL2_image][]
|
||||
- [SDL2_ttf][]
|
||||
- [SDL2_net][]
|
||||
- [SDL2_mixer][]
|
||||
- [SDL2_gfx][]
|
||||
|
||||
These modules are based on the SDL (1.2) modules, with the same names,
|
||||
distributed with the CMake project. The SDL2_gfx module is also based
|
||||
on the SDL_image module.
|
||||
|
||||
## Details and Improvements
|
||||
|
||||
The improvements made to these modules are as follows:
|
||||
|
||||
**FindSDL2.cmake**
|
||||
|
||||
- Adapt `FindSDL.cmake` to `SDL2` (`FindSDL2.cmake`).
|
||||
- Add cache variables for more flexibility:<br>
|
||||
`SDL2_PATH`, `SDL2_NO_DEFAULT_PATH`
|
||||
- Mark `Threads` as a required dependency for non-OSX systems.
|
||||
- Modernize the `FindSDL2.cmake` module by creating specific targets:
|
||||
- `SDL2::Core` : Library project should link to `SDL2::Core`
|
||||
- `SDL2::Main` : Application project should link to `SDL2::Main`
|
||||
|
||||
*For more details, please see the embedded documentation in `FindSDL2.cmake` file.*
|
||||
|
||||
**FindSDL2_<COMPONENT>.cmake**
|
||||
|
||||
- Adapt `FindSDL_<COMPONENT>.cmake` to `SDL2_<COMPONENT>` (`FindSDL2_<COMPONENT>.cmake`).
|
||||
- Add cache variables for more flexibility:<br>
|
||||
`SDL2_<COMPONENT>_PATH`, `SDL2_<COMPONENT>_NO_DEFAULT_PATH`
|
||||
- Add `SDL2` as a required dependency.
|
||||
- Modernize the `FindSDL2_<COMPONENT>.cmake` modules by creating specific targets:<br>
|
||||
`SDL2::Image`, `SDL2::TTF`, `SDL2::Net`, `SDL2::Mixer` and `SDL2::GFX`.
|
||||
|
||||
*For more details, please see the embedded documentation in
|
||||
`FindSDL2_<COMPONENT>.cmake` file.*
|
||||
|
||||
## Usage
|
||||
|
||||
In order to use the SDL2 CMake modules, we have to clone this repository in a
|
||||
sud-directory `cmake/sdl2` in our project as follows:
|
||||
|
||||
```sh
|
||||
cd <PROJECT_DIR>
|
||||
git clone https://gitlab.com/aminosbh/sdl2-cmake-modules.git cmake/sdl2
|
||||
rm -rf cmake/sdl2/.git
|
||||
```
|
||||
|
||||
Or if we are using git for our project, we can add this repository as a
|
||||
submodule as follows:
|
||||
|
||||
```sh
|
||||
cd <PROJECT_DIR>
|
||||
git submodule add https://gitlab.com/aminosbh/sdl2-cmake-modules.git cmake/sdl2
|
||||
git commit -m "Add SDL2 CMake modules"
|
||||
```
|
||||
|
||||
Then we should specify the modules path in the main CMakeLists.txt file like
|
||||
the following:
|
||||
|
||||
```cmake
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/sdl2)
|
||||
```
|
||||
|
||||
Finally, we can use the SDL2 modules. There is two approaches that can be
|
||||
adopted: A legacy approach and a modern approach. Both of them are supported.
|
||||
|
||||
### Modern CMake
|
||||
|
||||
We can link to the SDL2:: targets like the following example:<br>
|
||||
*This example requires the SDL2, SDL2_image and the SDL2_gfx libraries*
|
||||
|
||||
```cmake
|
||||
# Find SDL2, SDL2_image and SDL2_gfx libraries
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(SDL2_image REQUIRED)
|
||||
find_package(SDL2_gfx REQUIRED)
|
||||
|
||||
# Link SDL2::Main, SDL2::Image and SDL2::GFX to our project
|
||||
target_link_libraries(${PROJECT_NAME} SDL2::Main SDL2::Image SDL2::GFX)
|
||||
```
|
||||
|
||||
*Use the appropriate packages for you project.*<br>
|
||||
*Please see above, for the whole list of packages*<br>
|
||||
*For more details, please see the embedded documentation in modules files*
|
||||
|
||||
### Legacy CMake
|
||||
|
||||
We can also specify manually the include directories and libraries to link to:
|
||||
|
||||
```cmake
|
||||
# Find and link SDL2
|
||||
find_package(SDL2 REQUIRED)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
target_link_libraries(${PROJECT_NAME} ${SDL2_LIBRARIES})
|
||||
|
||||
# Find and link SDL2_image
|
||||
find_package(SDL2_image REQUIRED)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_IMAGE_INCLUDE_DIRS})
|
||||
target_link_libraries(${PROJECT_NAME} ${SDL2_IMAGE_LIBRARIES})
|
||||
|
||||
# Find and link SDL2_gfx
|
||||
find_package(SDL2_gfx REQUIRED)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_GFX_INCLUDE_DIRS})
|
||||
target_link_libraries(${PROJECT_NAME} ${SDL2_GFX_LIBRARIES})
|
||||
|
||||
```
|
||||
|
||||
*For more details, please see the embedded documentation in modules files*
|
||||
|
||||
## Special customization variables
|
||||
|
||||
Each module have special customization cache variables that can be used to help
|
||||
the modules find the appropriate libraries:
|
||||
|
||||
- `SDL2_PATH` and `SDL2_<COMPONENT>_PATH`:<br>
|
||||
Can be specified to set the root search path for the `SDL2` and `SDL2_<COMPONENT>`
|
||||
- `SDL2_NO_DEFAULT_PATH` and `SDL2_<COMPONENT>_NO_DEFAULT_PATH`:<br>
|
||||
Disable search `SDL2/SDL2_<COMPONENT>` library in default path:<br>
|
||||
If `SDL2[_<COMPONENT>]_PATH` is set, defaults to ON<br>
|
||||
Else defaults to OFF
|
||||
- `SDL2_INCLUDE_DIR` and `SDL2_<COMPONENT>_INCLUDE_DIR`:<br>
|
||||
Set headers path. (Override)
|
||||
- `SDL2_LIBRARY` and `SDL2_<COMPONENT>_LIBRARY`:<br>
|
||||
Set the library (.dll, .so, .a, etc) path. (Override)
|
||||
- `SDL2MAIN_LIBRAY`:<br>
|
||||
Set the `SDL2main` library (.a) path. (Override)
|
||||
|
||||
These variables could be used in case of Windows projects, and when the
|
||||
libraries are not localized in a standard pathes. They can be specified when
|
||||
executing the `cmake` command or when using the [CMake GUI][] (They are marked
|
||||
as advanced).
|
||||
|
||||
**cmake command example:**
|
||||
|
||||
```sh
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DSDL2_PATH="/path/to/sdl2"
|
||||
```
|
||||
|
||||
**CMakeLists.txt example:**
|
||||
|
||||
If we embed, for example, binaries of the SDL2_ttf in our project, we can
|
||||
specify the cache variables values just before calling the `find_package`
|
||||
command as follows:
|
||||
|
||||
```cmake
|
||||
set(SDL2_TTF_PATH "/path/to/sdl2_ttf" CACHE BOOL "" FORCE)
|
||||
find_package(SDL2_ttf REQUIRED)
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Maintainer: Amine B. Hassouna [@aminosbh](https://gitlab.com/aminosbh)
|
||||
|
||||
The SDL2 CMake modules are based on the SDL (1.2) modules available with the
|
||||
CMake project which is distributed under the OSI-approved BSD 3-Clause License.
|
||||
|
||||
The SDL2 CMake modules are also distributed under the OSI-approved BSD
|
||||
3-Clause License. See accompanying file [Copyright.txt](Copyright.txt).
|
||||
|
||||
|
||||
|
||||
[CMake]: https://cmake.org
|
||||
[CMake GUI]: https://cmake.org/runningcmake
|
||||
[SDL2]: https://www.libsdl.org
|
||||
[SDL2_image]: https://www.libsdl.org/projects/SDL_image
|
||||
[SDL2_ttf]: https://www.libsdl.org/projects/SDL_ttf
|
||||
[SDL2_net]: https://www.libsdl.org/projects/SDL_net
|
||||
[SDL2_mixer]: https://www.libsdl.org/projects/SDL_mixer
|
||||
[SDL2_gfx]: http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx
|
@ -1,7 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=DungeonRush
|
||||
Exec=dungeon_rush
|
||||
Comment=A game inspired by Snake
|
||||
Categories=Game;
|
||||
Icon=dungeonrush
|
Before Width: | Height: | Size: 1.5 KiB |
@ -1,19 +0,0 @@
|
||||
win.wav
|
||||
lose_2v.wav
|
||||
powerloss.wav
|
||||
hit_0.5v.wav
|
||||
sword_hit.wav
|
||||
claw_hit.wav
|
||||
arrow_hit.wav
|
||||
shoot.wav
|
||||
fireball_explosion.wav
|
||||
ice_shoot_0.5v.wav
|
||||
interaction1_0.75v.wav
|
||||
button1.wav
|
||||
thunder_2v.wav
|
||||
light_shoot.wav
|
||||
human_death.wav
|
||||
claw_hit_heavy.wav
|
||||
coin.wav
|
||||
med.wav
|
||||
|
@ -1,159 +0,0 @@
|
||||
wall_top_left 16 0 16 16 1
|
||||
wall_top_mid 32 0 16 16 1
|
||||
wall_top_right 48 0 16 16 1
|
||||
wall_left 16 16 16 16 1
|
||||
wall_mid 32 16 16 16 1
|
||||
wall_right 48 16 16 16 1
|
||||
wall_fountain_top 64 0 16 16 1
|
||||
wall_fountain_mid_red_anim 64 16 16 16 3
|
||||
wall_fountain_basin_red_anim 64 32 16 16 3
|
||||
wall_fountain_mid_blue_anim 64 48 16 16 3
|
||||
wall_fountain_basin_blue_anim 64 64 16 16 3
|
||||
wall_hole_1 48 32 16 16 1
|
||||
wall_hole_2 48 48 16 16 1
|
||||
wall_banner_red 16 32 16 16 1
|
||||
wall_banner_blue 32 32 16 16 1
|
||||
wall_banner_green 16 48 16 16 1
|
||||
wall_banner_yellow 32 48 16 16 1
|
||||
column_top 80 80 16 16 1
|
||||
column_mid 80 96 16 16 1
|
||||
coulmn_base 80 112 16 16 1
|
||||
wall_column_top 96 80 16 16 1
|
||||
wall_column_mid 96 96 16 16 1
|
||||
wall_coulmn_base 96 112 16 16 1
|
||||
wall_goo 64 80 16 16 1
|
||||
wall_goo_base 64 96 16 16 1
|
||||
floor_1 16 64 16 16 1
|
||||
floor_2 32 64 16 16 1
|
||||
floor_3 48 64 16 16 1
|
||||
floor_4 16 80 16 16 1
|
||||
floor_5 32 80 16 16 1
|
||||
floor_6 48 80 16 16 1
|
||||
floor_7 16 96 16 16 1
|
||||
floor_8 32 96 16 16 1
|
||||
floor_ladder 48 96 16 16 1
|
||||
floor_spikes_anim 16 176 16 16 4
|
||||
wall_side_top_left 0 112 16 16 1
|
||||
wall_side_top_right 16 112 16 16 1
|
||||
wall_side_mid_left 0 128 16 16 1
|
||||
wall_side_mid_right 16 128 16 16 1
|
||||
wall_side_front_left 0 144 16 16 1
|
||||
wall_side_front_right 16 144 16 16 1
|
||||
wall_corner_top_left 32 112 16 16 1
|
||||
wall_corner_top_right 48 112 16 16 1
|
||||
wall_corner_left 32 128 16 16 1
|
||||
wall_corner_right 48 128 16 16 1
|
||||
wall_corner_bottom_left 32 144 16 16 1
|
||||
wall_corner_bottom_right 48 144 16 16 1
|
||||
wall_corner_front_left 32 160 16 16 1
|
||||
wall_corner_front_right 48 160 16 16 1
|
||||
wall_inner_corner_l_top_left 80 128 16 16 1
|
||||
wall_inner_corner_l_top_rigth 64 128 16 16 1
|
||||
wall_inner_corner_mid_left 80 144 16 16 1
|
||||
wall_inner_corner_mid_rigth 64 144 16 16 1
|
||||
wall_inner_corner_t_top_left 80 160 16 16 1
|
||||
wall_inner_corner_t_top_rigth 64 160 16 16 1
|
||||
edge 96 128 16 16 1
|
||||
hole 96 144 16 16 1
|
||||
doors_all 16 221 64 35 1
|
||||
doors_frame_left 16 224 16 32 1
|
||||
doors_frame_top 32 221 32 3 1
|
||||
doors_frame_righ 63 224 16 32 1
|
||||
doors_leaf_closed 32 224 32 32 1
|
||||
doors_leaf_open 80 224 32 32 1
|
||||
chest_empty_open_anim 304 288 16 16 3
|
||||
chest_full_open_anim 304 304 16 16 3
|
||||
chest_mimic_open_anim 304 320 16 16 3
|
||||
flask_big_red 288 224 16 16 1
|
||||
flask_big_blue 304 224 16 16 1
|
||||
flask_big_green 320 224 16 16 1
|
||||
flask_big_yellow 336 224 16 16 1
|
||||
flask_red 288 240 16 16 1
|
||||
flask_blue 304 240 16 16 1
|
||||
flask_green 320 240 16 16 1
|
||||
flask_yellow 336 240 16 16 1
|
||||
skull 288 320 16 16 1
|
||||
crate 288 298 16 22 1
|
||||
coin_anim 288 272 8 8 4
|
||||
ui_heart_full 288 256 16 16 1
|
||||
ui_heart_half 304 256 16 16 1
|
||||
ui_heart_empty 320 256 16 16 1
|
||||
weapon_knife 293 18 6 13 1
|
||||
weapon_rusty_sword 307 26 10 21 1
|
||||
weapon_regular_sword 323 26 10 21 1
|
||||
weapon_red_gem_sword 339 26 10 21 1
|
||||
weapon_big_hammer 291 42 10 37 1
|
||||
weapon_hammer 307 55 10 24 1
|
||||
weapon_baton_with_spikes 323 57 10 22 1
|
||||
weapon_mace 339 55 10 24 1
|
||||
weapon_katana 293 82 6 29 1
|
||||
weapon_saw_sword 307 86 10 25 1
|
||||
weapon_anime_sword 322 81 12 30 1
|
||||
weapon_axe 341 90 9 21 1
|
||||
weapon_machete 294 121 5 22 1
|
||||
weapon_cleaver 310 124 8 19 1
|
||||
weapon_duel_sword 325 113 9 30 1
|
||||
weapon_knight_sword 339 120 10 23 1
|
||||
weapon_golden_sword 291 153 10 22 1
|
||||
weapon_lavish_sword 307 145 10 30 1
|
||||
weapon_red_magic_staff 324 145 8 30 1
|
||||
weapon_green_magic_staff 340 145 8 30 1
|
||||
weapon_spear 293 177 6 30 1
|
||||
tiny_zombie_idle_anim 368 20 16 12 4
|
||||
tiny_zombie_run_anim 432 20 16 12 4
|
||||
goblin_idle_anim 368 37 16 11 4
|
||||
goblin_run_anim 432 37 16 11 4
|
||||
imp_idle_anim 368 48 16 16 4
|
||||
imp_run_anim 432 48 16 16 4
|
||||
skelet_idle_anim 368 80 16 16 4
|
||||
skelet_run_anim 432 80 16 16 4
|
||||
muddy_idle_anim 368 112 16 16 4
|
||||
muddy_run_anim 368 112 16 16 4
|
||||
swampy_idle_anim 432 112 16 16 4
|
||||
swampy_run_anim 432 112 16 16 4
|
||||
zombie_idle_anim 368 144 16 16 4
|
||||
zombie_run_anim 368 144 16 16 4
|
||||
ice_zombie_idle_anim 432 144 16 16 4
|
||||
ice_zombie_run_anim 432 144 16 16 4
|
||||
masked_orc_idle_anim 368 172 16 20 4
|
||||
masked_orc_run_anim 432 172 16 20 4
|
||||
orc_warrior_idle_anim 368 204 16 20 4
|
||||
orc_warrior_run_anim 432 204 16 20 4
|
||||
orc_shaman_idle_anim 368 236 16 20 4
|
||||
orc_shaman_run_anim 432 236 16 20 4
|
||||
necromancer_idle_anim 366 270 16 20 4
|
||||
necromancer_run_anim 366 270 16 20 4
|
||||
wogol_idle_anim 368 303 16 17 4
|
||||
wogol_run_anim 432 303 16 17 4
|
||||
chort_idle_anim 368 328 16 24 4
|
||||
chort_run_anim 432 328 16 24 4
|
||||
big_zombie_idle_anim 16 270 32 34 4
|
||||
big_zombie_run_anim 144 270 32 34 4
|
||||
ogre_idle_anim 16 320 32 32 4
|
||||
ogre_run_anim 144 320 32 32 4
|
||||
big_demon_idle_anim 16 364 32 36 4
|
||||
big_demon_run_anim 144 364 32 36 4
|
||||
elf_f_idle_anim 128 16 16 16 4
|
||||
elf_f_run_anim 192 16 16 16 4
|
||||
elf_f_hit_anim 256 16 16 16 1
|
||||
elf_m_idle_anim 128 42 16 22 4
|
||||
elf_m_run_anim 192 42 16 22 4
|
||||
elf_m_hit_anim 256 36 16 28 1
|
||||
knight_f_idle_anim 128 74 16 22 4
|
||||
knight_f_run_anim 192 74 16 22 4
|
||||
knight_f_hit_anim 256 74 16 22 1
|
||||
knight_m_idle_anim 128 106 16 22 4
|
||||
knight_m_run_anim 192 106 16 22 4
|
||||
knight_m_hit_anim 256 106 16 22 1
|
||||
wizzard_f_idle_anim 128 132 16 28 4
|
||||
wizzard_f_run_anim 192 132 16 28 4
|
||||
wizzard_f_hit_anim 256 132 16 28 1
|
||||
wizzard_m_idle_anim 128 170 16 22 4
|
||||
wizzard_m_run_anim 192 170 16 22 4
|
||||
wizzard_m_hit_anim 256 164 16 28 1
|
||||
lizard_f_idle_anim 128 205 16 19 4
|
||||
lizard_f_run_anim 192 205 16 19 4
|
||||
lizard_f_hit_anim 256 205 16 19 1
|
||||
lizard_m_idle_anim 128 237 16 19 4
|
||||
lizard_m_run_anim 192 237 16 19 4
|
||||
lizard_m_hit_anim 256 237 16 19 1
|
Before Width: | Height: | Size: 51 KiB |
@ -1 +0,0 @@
|
||||
Axe 0 0 18 18 4
|
Before Width: | Height: | Size: 282 B |
@ -1 +0,0 @@
|
||||
BloodBound 0 0 64 49 15
|
Before Width: | Height: | Size: 6.7 KiB |
@ -1 +0,0 @@
|
||||
ClawFx 0 0 16 16 7
|
Before Width: | Height: | Size: 3.9 KiB |
@ -1,2 +0,0 @@
|
||||
ClawFx2 0 0 32 32 5
|
||||
|
Before Width: | Height: | Size: 3.7 KiB |
@ -1 +0,0 @@
|
||||
HolyShield 0 0 32 29 6
|
Before Width: | Height: | Size: 10 KiB |
@ -1 +0,0 @@
|
||||
HpMed 0 0 16 16 9
|
Before Width: | Height: | Size: 370 B |
@ -1 +0,0 @@
|
||||
Ice 0 0 49 51 1
|
Before Width: | Height: | Size: 43 KiB |
@ -1 +0,0 @@
|
||||
IcePick 0 0 32 15 30
|
Before Width: | Height: | Size: 8.4 KiB |
@ -1 +0,0 @@
|
||||
IceShatter 0 0 48 48 30
|
Before Width: | Height: | Size: 12 KiB |
@ -1 +0,0 @@
|
||||
Shine 0 0 32 32 6
|
Before Width: | Height: | Size: 2.1 KiB |
@ -1,2 +0,0 @@
|
||||
SolidFx 0 0 51 32 6
|
||||
SolidGreenFx 0 32 51 32 6
|
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 16 KiB |
@ -1 +0,0 @@
|
||||
SwordFx 0 0 48 48 10
|
@ -1 +0,0 @@
|
||||
SwordFx 0 0 16 16 7
|
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 233 B |
@ -1,5 +0,0 @@
|
||||
HolySword 32 0 16 16 1
|
||||
FireSword 16 16 16 16 1
|
||||
IceSword 16 32 16 16 1
|
||||
GrassSword 16 48 16 16 1
|
||||
IronSword 16 64 16 16 1
|
Before Width: | Height: | Size: 15 KiB |
@ -1 +0,0 @@
|
||||
Thunder 0 0 64 256 8
|
Before Width: | Height: | Size: 9.4 KiB |
@ -1 +0,0 @@
|
||||
Thunder_Yellow 0 0 64 256 8
|
Before Width: | Height: | Size: 3.6 KiB |
@ -1 +0,0 @@
|
||||
arrow 0 0 32 16 1
|
Before Width: | Height: | Size: 194 B |
@ -1 +0,0 @@
|
||||
attack_up 0 0 32 20 4
|
Before Width: | Height: | Size: 317 B |
@ -1,4 +0,0 @@
|
||||
blood1 0 0 16 16 1
|
||||
blood2 16 0 16 16 1
|
||||
blood3 32 0 16 16 1
|
||||
blood4 48 0 16 16 1
|
Before Width: | Height: | Size: 4.5 KiB |
@ -1 +0,0 @@
|
||||
cross_hit 0 0 48 48 10
|
Before Width: | Height: | Size: 1.9 KiB |
@ -1 +0,0 @@
|
||||
explosion-2 0 0 64 64 8
|
Before Width: | Height: | Size: 3.0 KiB |
@ -1 +0,0 @@
|
||||
fireball 0 0 26 10 10
|
Before Width: | Height: | Size: 581 B |
@ -1 +0,0 @@
|
||||
fireball_explosion1 0 0 64 64 8
|
Before Width: | Height: | Size: 3.0 KiB |
@ -1 +0,0 @@
|
||||
floor_exit 0 0 16 16 1
|
Before Width: | Height: | Size: 3.7 KiB |
@ -1,4 +0,0 @@
|
||||
floor_spike_disabled 0 0 16 16 1
|
||||
floor_spike_enabled 48 0 16 16 1
|
||||
floor_spike_out_ani 0 0 16 16 4
|
||||
floor_spike_in_ani 64 0 16 16 4
|
Before Width: | Height: | Size: 3.1 KiB |