Compare commits
322 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
6139428207 | |
![]() |
5a5579d27f | |
![]() |
29e85e5d87 | |
![]() |
e228394656 | |
![]() |
d5ac2a853b | |
![]() |
e82ae7bb13 | |
![]() |
20b82d8ab7 | |
![]() |
8d26b4f49f | |
![]() |
3fdc30f7d7 | |
![]() |
57211ddc77 | |
![]() |
2de7efd9eb | |
![]() |
5b4559f4ee | |
![]() |
6178526cd9 | |
![]() |
c8a1d8eb2e | |
![]() |
6e3883937b | |
![]() |
8dd647914a | |
![]() |
0dae126a29 | |
![]() |
5038cd7ba5 | |
![]() |
ddd8fca044 | |
![]() |
25c85a83d9 | |
![]() |
32dd410954 | |
![]() |
e4f17d33ce | |
![]() |
2ab707c0ca | |
![]() |
4dba928765 | |
![]() |
3d6550d161 | |
![]() |
3cf12f2594 | |
![]() |
de1ec01c78 | |
![]() |
295abb9cd0 | |
![]() |
8260b62482 | |
![]() |
d18c6f115f | |
![]() |
d36f80b5e6 | |
![]() |
44aa859e6d | |
![]() |
5a2d3a6f95 | |
![]() |
d6b939c428 | |
![]() |
8b8be7d4a8 | |
![]() |
72364fd1a4 | |
![]() |
c6da07feb3 | |
![]() |
94979eff97 | |
![]() |
e8494b56d1 | |
![]() |
c85397518b | |
![]() |
cf2339822d | |
![]() |
dcb9ccca90 | |
![]() |
a8ec85d536 | |
![]() |
611f3a3409 | |
![]() |
b6da6c490c | |
![]() |
9d20ce9b59 | |
![]() |
709a322337 | |
![]() |
cdfd37fc4e | |
![]() |
4f8d0a8867 | |
![]() |
b22e9fb709 | |
![]() |
4e2799b582 | |
![]() |
7fa90531e6 | |
![]() |
e1c2ecc584 | |
![]() |
4c450ab360 | |
![]() |
d5e1a1f36b | |
![]() |
821b9176bd | |
![]() |
9031103c9a | |
![]() |
557f897ead | |
![]() |
c8a4f66cf8 | |
![]() |
ddc93ec6e1 | |
![]() |
ab38ae8f24 | |
![]() |
d337688fa7 | |
![]() |
3eea90afb6 | |
![]() |
b3952d74a8 | |
![]() |
be09125d52 | |
![]() |
f264e7f807 | |
![]() |
fe0791762a | |
![]() |
61f427dec1 | |
![]() |
d619ee2bb1 | |
![]() |
7128e6dd08 | |
![]() |
0decffea8d | |
![]() |
9b60e17746 | |
![]() |
26207038c9 | |
![]() |
90867bc802 | |
![]() |
7f49cd33ad | |
![]() |
d8342d3d67 | |
![]() |
12e840a8fa | |
![]() |
6ca609ac7e | |
![]() |
2b8f9f71ff | |
![]() |
e76cef79d2 | |
![]() |
7f06428df8 | |
![]() |
e4a9340409 | |
![]() |
5d7023a5d6 | |
![]() |
3bd7c918cc | |
![]() |
67e4944cdb | |
![]() |
df4ff16e2c | |
![]() |
d4805065b3 | |
![]() |
e39b1f2c53 | |
![]() |
73b65a6553 | |
![]() |
9e556e6a56 | |
![]() |
11e73f2c61 | |
![]() |
e97b0448b7 | |
![]() |
aa6ed14b2a | |
![]() |
2ce20c4f59 | |
![]() |
e4ef4aa625 | |
![]() |
cf5cb40cb9 | |
![]() |
c450d14311 | |
![]() |
41572be3f2 | |
![]() |
4f8da1c574 | |
![]() |
32091669d4 | |
![]() |
abd72a5b2e | |
![]() |
7e6349b19f | |
![]() |
0782be749e | |
![]() |
a7b545ab1a | |
![]() |
1a564f900c | |
![]() |
3d4e03f85f | |
![]() |
fc17209ac7 | |
![]() |
38877ef209 | |
![]() |
8691a15be8 | |
![]() |
961fd0304c | |
![]() |
e2cf6ecba6 | |
![]() |
7a0826a60c | |
![]() |
d516683a77 | |
![]() |
834c7de86c | |
![]() |
4f1a5dd726 | |
![]() |
5766b9b9c7 | |
![]() |
5d8426d317 | |
![]() |
63ec3528f1 | |
![]() |
f646c3848c | |
![]() |
09433875bc | |
![]() |
05c09ff506 | |
![]() |
7f78fbb3c5 | |
![]() |
261e26f488 | |
![]() |
ed820708af | |
![]() |
5b8b6a0b47 | |
![]() |
8809ce26b3 | |
![]() |
a48625855b | |
![]() |
55c1477d69 | |
![]() |
2d7a1ea25b | |
![]() |
244149c00e | |
![]() |
c0bcf3bfdf | |
![]() |
13756bcbf9 | |
![]() |
fc82e06270 | |
![]() |
df89beb256 | |
![]() |
82eda48e8f | |
![]() |
b47787b317 | |
![]() |
c9668d9a88 | |
![]() |
90a56c6937 | |
![]() |
d377f7abff | |
![]() |
1fac129746 | |
![]() |
af7d5f7b89 | |
![]() |
28f7c2010b | |
![]() |
486330f23d | |
![]() |
1ae78a04a8 | |
![]() |
c776da7120 | |
![]() |
d543784a3d | |
![]() |
902c6c8e4b | |
![]() |
d32be9ddbe | |
![]() |
b776509287 | |
![]() |
56eb97c846 | |
![]() |
9f46c575fd | |
![]() |
e0402a9b0b | |
![]() |
3e30f54d5f | |
![]() |
d73085a88c | |
![]() |
8eb6a6900f | |
![]() |
3615137c12 | |
![]() |
bbd5b76f2a | |
![]() |
bb3604f333 | |
![]() |
18a0067ca7 | |
![]() |
cfdbdc4ec2 | |
![]() |
32ca2ae42f | |
![]() |
bad96cf91e | |
![]() |
62294702e4 | |
![]() |
72c4f33d63 | |
![]() |
3fe57f540d | |
![]() |
1e1a369c8d | |
![]() |
cc65ef2849 | |
![]() |
32627f6b85 | |
![]() |
41952d0625 | |
![]() |
0c39a5ba7a | |
![]() |
1b77d6594c | |
![]() |
8d08223dbc | |
![]() |
af6028a9dd | |
![]() |
ff3b5ee042 | |
![]() |
b52edf52ff | |
![]() |
6766b9ca54 | |
![]() |
8eae2e5b90 | |
![]() |
50d17363ea | |
![]() |
795f25bb85 | |
![]() |
647be137f6 | |
![]() |
8abe3e79da | |
![]() |
710ffeb1b2 | |
![]() |
a855ff54f4 | |
![]() |
dbb5e534e4 | |
![]() |
753956963c | |
![]() |
b00e23f5b5 | |
![]() |
8ef9a66b74 | |
![]() |
0e503a525e | |
![]() |
b4b020401c | |
![]() |
f4835674ed | |
![]() |
4104a3d179 | |
![]() |
1e1ec2e330 | |
![]() |
ff21f8da21 | |
![]() |
775a571f75 | |
![]() |
64abd3e8dc | |
![]() |
56320ec6d1 | |
![]() |
311b232ee5 | |
![]() |
0e13cc9346 | |
![]() |
b455de01c6 | |
![]() |
c3053d3819 | |
![]() |
c8106573d8 | |
![]() |
047ad27777 | |
![]() |
ecd16a21dc | |
![]() |
1594fda1b6 | |
![]() |
de9b3a211b | |
![]() |
045c98d8fa | |
![]() |
4ace296b3a | |
![]() |
011adce23e | |
![]() |
cc99ec0c14 | |
![]() |
1d652edf83 | |
![]() |
db08ca93af | |
![]() |
3518dc6a05 | |
![]() |
cc9a03ce48 | |
![]() |
8576733c0d | |
![]() |
c6da7e384e | |
![]() |
98abb8c2e8 | |
![]() |
0556192238 | |
![]() |
d9432ebb14 | |
![]() |
f57cad67c4 | |
![]() |
ce7cc4e223 | |
![]() |
8183a005af | |
![]() |
75a34cd098 | |
![]() |
23e1573442 | |
![]() |
98b51910eb | |
![]() |
c3f0aa2edf | |
![]() |
ea596e4cb0 | |
![]() |
68adb14b07 | |
![]() |
a565cea8e9 | |
![]() |
6ac95d373f | |
![]() |
d4430ca440 | |
![]() |
000c7f854c | |
![]() |
047bd935ea | |
![]() |
33cb9a66d4 | |
![]() |
f8374b52a8 | |
![]() |
2f10e71f1d | |
![]() |
8f92d99968 | |
![]() |
ce12db1e06 | |
![]() |
d8a1886ccb | |
![]() |
1d051d0e6e | |
![]() |
f96e42fe04 | |
![]() |
aa59d94490 | |
![]() |
07e490254c | |
![]() |
18b97b4342 | |
![]() |
b45a4066b1 | |
![]() |
1fff5cb1f7 | |
![]() |
13a16eb79c | |
![]() |
69769c1bef | |
![]() |
e998a4016a | |
![]() |
f17a9855f3 | |
![]() |
85b7cf7aec | |
![]() |
f46da1c525 | |
![]() |
404e9a1a55 | |
![]() |
3ec8960f1a | |
![]() |
613bd4038a | |
![]() |
ecb69a240a | |
![]() |
215e3c5ae9 | |
![]() |
e5aa685f70 | |
![]() |
53e1f44a69 | |
![]() |
9e4c8e1753 | |
![]() |
5f853b99ad | |
![]() |
e7d135dbf1 | |
![]() |
60fc096f1a | |
![]() |
32bc9c9dc7 | |
![]() |
84b0a3e366 | |
![]() |
418b7b64dc | |
![]() |
2ad7dd1a79 | |
![]() |
f915ec5972 | |
![]() |
37acfc8d50 | |
![]() |
9202bfd55e | |
![]() |
23ef8ef0f9 | |
![]() |
390482a719 | |
![]() |
d1aa4eb23d | |
![]() |
7dc95076e5 | |
![]() |
92d9230e2c | |
![]() |
6e2f1f1103 | |
![]() |
fa720aea07 | |
![]() |
e70e57a5c0 | |
![]() |
9e2a9b479a | |
![]() |
3ab048bebf | |
![]() |
a045270164 | |
![]() |
3c5348983b | |
![]() |
db355126d3 | |
![]() |
eea649ae16 | |
![]() |
9e9fe812d2 | |
![]() |
c0e71b0cb4 | |
![]() |
ddc6fd7080 | |
![]() |
8184522c6d | |
![]() |
e955501f61 | |
![]() |
ef09fca4d1 | |
![]() |
78b99d8b23 | |
![]() |
717ac7ed74 | |
![]() |
59d67fe703 | |
![]() |
de1f4dffba | |
![]() |
491f104b89 | |
![]() |
244ee8ebfa | |
![]() |
3683938ec7 | |
![]() |
64d8cfffc2 | |
![]() |
18f3449c31 | |
![]() |
8db618625d | |
![]() |
a262a2facf | |
![]() |
beab088139 | |
![]() |
215e9b1ac2 | |
![]() |
0e68a2340c | |
![]() |
0eb65a0eb3 | |
![]() |
1af7aa2333 | |
![]() |
e9162a0d28 | |
![]() |
99923dd126 | |
![]() |
3a1b577d0a | |
![]() |
bf2452aab9 | |
![]() |
71ca0fb270 | |
![]() |
e19e13fa0a | |
![]() |
1c76e3b0f4 | |
![]() |
c36c3e0250 | |
![]() |
6c38eaa2a5 | |
![]() |
7e1afcd37c | |
![]() |
d8d3ee2b48 | |
![]() |
df83b4ba80 | |
![]() |
32581966ae | |
![]() |
67af67278e | |
![]() |
e17d2cbaf5 | |
![]() |
7e46939826 | |
![]() |
0501f985a3 |
|
@ -0,0 +1 @@
|
|||
github: rkitover
|
|
@ -11,7 +11,7 @@ body:
|
|||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please try the nightly build from: https://nightly.vba-m.com and factory resetting the emulator from the Help menu.
|
||||
Please try the nightly build from: https://nightly.visualboyadvance-m.org and factory resetting the emulator from the Help menu.
|
||||
On Linux build master from source or use the edge snap.
|
||||
And last but not least, search for existing reports via the filters bar on the issues page.
|
||||
- type: markdown
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: VBA-M Forum
|
||||
url: https://board.vba-m.com/
|
||||
url: https://board.visualboyadvance-m.org/
|
||||
about: For general questions and support please join our forum or our
|
||||
- name: VBA-M IRC Channel
|
||||
url: https://web.libera.chat/#vba-m
|
||||
|
|
|
@ -14,7 +14,7 @@ body:
|
|||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Please try a nightly build from: https://nightly.vba-m.com to see if your idea has already been implemented.
|
||||
Please try a nightly build from: https://nightly.visualboyadvance-m.org to see if your idea has already been implemented.
|
||||
On Linux build master from source or use the edge snap.
|
||||
And last but not least, search for existing requests via the filters bar on the issues page.
|
||||
- type: textarea
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
name: Libretro Devkitpro
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
target_name: [ngc, wii, wiiu, switch]
|
||||
build_type: [release, debug]
|
||||
include:
|
||||
- libretro_build: 'DEBUG=0'
|
||||
build_type: release
|
||||
- libretro_build: 'DEBUG=1'
|
||||
build_type: debug
|
||||
- devkit_container: 'devkitpro/devkitppc:latest'
|
||||
target_name: ngc
|
||||
- devkit_container: 'devkitpro/devkitppc:latest'
|
||||
target_name: wii
|
||||
- devkit_container: 'devkitpro/devkitppc:latest'
|
||||
target_name: wiiu
|
||||
- devkit_container: 'devkitpro/devkita64:latest'
|
||||
target_name: switch
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.devkit_container }}
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# Libretro build
|
||||
- name: Build libretro core
|
||||
run: make -C src/libretro ${{ matrix.libretro_build }} platform=${{ matrix.target_name }}
|
|
@ -1,28 +1,63 @@
|
|||
name: macOS Latest Build
|
||||
#on: [push, pull_request]
|
||||
on: workflow_dispatch
|
||||
name: macOS Latest
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
|
||||
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
|
||||
build_type: [release, debug]
|
||||
build_options: [default, link_off, translations_only, libretro]
|
||||
include:
|
||||
- cmake_build: '-DCMAKE_BUILD_TYPE=Release'
|
||||
build_type: release
|
||||
- cmake_build: '-DCMAKE_BUILD_TYPE=Debug'
|
||||
build_type: debug
|
||||
- cmake_options: '-DENABLE_LINK=OFF'
|
||||
build_options: link_off
|
||||
- cmake_options: '-DTRANSLATIONS_ONLY=ON'
|
||||
build_options: translations_only
|
||||
- libretro_build: 'DEBUG=0'
|
||||
build_type: release
|
||||
build_options: libretro
|
||||
- libretro_build: 'DEBUG=1'
|
||||
build_type: debug
|
||||
build_options: libretro
|
||||
exclude:
|
||||
# Exclude debug/translations_only build
|
||||
- build_type: debug
|
||||
build_options: translations_only
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM: 1
|
||||
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install nix
|
||||
uses: cachix/install-nix-action@v22
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
|
||||
- name: Install Dependencies
|
||||
# Cmake build
|
||||
- if: matrix.build_options != 'libretro'
|
||||
name: Configure CMake
|
||||
run: >-
|
||||
bash installdeps
|
||||
|
||||
- name: Configure
|
||||
nix-shell --command 'cmake -B build -G Ninja ${{ matrix.cmake_build }} -DENABLE_LTO=OFF ${{ matrix.cmake_options }}'
|
||||
- if: matrix.build_options != 'libretro'
|
||||
name: Build
|
||||
run: >-
|
||||
cmake -B build -G Ninja ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
||||
nix-shell --command 'ninja -C build'
|
||||
|
||||
- name: Build
|
||||
run: ninja -C build
|
||||
# Libretro build
|
||||
- if: matrix.build_options == 'libretro'
|
||||
name: Build libretro core
|
||||
run: >-
|
||||
nix-shell --command 'make -C src/libretro ${{ matrix.libretro_build }}'
|
||||
|
||||
# Run tests
|
||||
- if: matrix.build_options == 'default'
|
||||
name: Run tests
|
||||
run: >-
|
||||
nix-shell --command 'cd build && ctest -j --output-on-failure'
|
||||
|
|
|
@ -1,12 +1,31 @@
|
|||
name: MSYS2 Build
|
||||
name: MSYS2
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
|
||||
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
|
||||
build_type: [release, debug]
|
||||
build_options: [default, link_off, translations_only, libretro]
|
||||
include:
|
||||
- cmake_build: '-DCMAKE_BUILD_TYPE=Release'
|
||||
build_type: release
|
||||
- cmake_build: '-DCMAKE_BUILD_TYPE=Debug'
|
||||
build_type: debug
|
||||
- cmake_options: '-DENABLE_LINK=OFF'
|
||||
build_options: link_off
|
||||
- cmake_options: '-DTRANSLATIONS_ONLY=ON'
|
||||
build_options: translations_only
|
||||
- libretro_build: 'DEBUG=0'
|
||||
build_type: release
|
||||
build_options: libretro
|
||||
- libretro_build: 'DEBUG=1'
|
||||
build_type: debug
|
||||
build_options: libretro
|
||||
exclude:
|
||||
# Exclude debug/translations_only build
|
||||
- build_type: debug
|
||||
build_options: translations_only
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
MSYSTEM: CLANG64
|
||||
|
@ -16,7 +35,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Setup msys2
|
||||
|
@ -27,11 +46,19 @@ jobs:
|
|||
- name: Install deps
|
||||
run: >-
|
||||
bash installdeps
|
||||
- name: Configure
|
||||
run: >-
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
||||
- name: Build
|
||||
run: ninja -C build
|
||||
|
||||
- name: Install
|
||||
# CMake build
|
||||
- if: matrix.build_options != 'libretro'
|
||||
name: Configure CMake
|
||||
run: cmake -B build -G Ninja ${{ matrix.cmake_build }} -DENABLE_LTO=OFF ${{ matrix.cmake_options }}
|
||||
- if: matrix.build_options != 'libretro'
|
||||
name: Build
|
||||
run: ninja -C build
|
||||
- if: matrix.build_options != 'libretro'
|
||||
name: Install
|
||||
run: ninja -C build install
|
||||
|
||||
# Libretro build
|
||||
- if: matrix.build_options == 'libretro'
|
||||
name: Build libretro core
|
||||
run: make -C src/libretro ${{ matrix.libretro_build }} CC=clang CXX=clang++
|
||||
|
|
|
@ -1,30 +1,71 @@
|
|||
name: Ubuntu Latest Build
|
||||
name: Ubuntu Latest
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
cmake_compiler: ['-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++', '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++']
|
||||
cmake_build: ['-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_BUILD_TYPE=Debug']
|
||||
cmake_options: ['', '-DENABLE_LINK=OFF', '-DENABLE_SDL=ON']
|
||||
build_compiler: [gcc, clang]
|
||||
build_type: [release, debug]
|
||||
build_options: [default, link_off, translations_only, libretro]
|
||||
include:
|
||||
- cmake_compiler: '-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++'
|
||||
build_compiler: gcc
|
||||
- cmake_compiler: '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++'
|
||||
build_compiler: clang
|
||||
- cmake_build: '-DCMAKE_BUILD_TYPE=Release'
|
||||
build_type: release
|
||||
- cmake_build: '-DCMAKE_BUILD_TYPE=Debug'
|
||||
build_type: debug
|
||||
- cmake_options: '-DENABLE_LINK=OFF'
|
||||
build_options: link_off
|
||||
- cmake_options: '-DTRANSLATIONS_ONLY=ON'
|
||||
build_options: translations_only
|
||||
- libretro_build: 'DEBUG=0'
|
||||
build_type: release
|
||||
build_options: libretro
|
||||
- libretro_build: 'DEBUG=1'
|
||||
build_type: debug
|
||||
build_options: libretro
|
||||
exclude:
|
||||
# Exclude debug/translations_only build
|
||||
- build_type: debug
|
||||
build_options: translations_only
|
||||
- build_type: release
|
||||
build_options: translations_only
|
||||
build_compiler: clang
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Dependencies
|
||||
run: >-
|
||||
bash installdeps; if [ "${{ matrix.compiler }}" = clang ]; then sudo apt -y install clang; fi
|
||||
bash installdeps; if [ "${{ matrix.build_compiler }}" = clang ]; then sudo apt -y install clang; fi
|
||||
|
||||
- name: Configure
|
||||
- name: Install xvfb
|
||||
run: sudo apt -y install xvfb
|
||||
|
||||
# CMake build
|
||||
- if: matrix.build_options != 'libretro'
|
||||
name: Configure CMake
|
||||
run: >-
|
||||
cmake -B build -G Ninja ${{ matrix.cmake_compiler }} ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
||||
|
||||
- name: Build
|
||||
- if: matrix.build_options != 'libretro'
|
||||
name: Build
|
||||
run: ninja -C build
|
||||
|
||||
- name: Install
|
||||
- if: matrix.build_options != 'libretro'
|
||||
name: Install
|
||||
run: sudo ninja -C build install
|
||||
|
||||
# Libretro build
|
||||
- if: matrix.build_options == 'libretro'
|
||||
name: Build libretro core
|
||||
run: make -C src/libretro ${{ matrix.libretro_build }}
|
||||
|
||||
# Run tests
|
||||
- if: matrix.build_options == 'default'
|
||||
name: Run tests
|
||||
run: cd build && xvfb-run ctest -j --output-on-failure
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
name: Visual Studio
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
msvc_arch: ['x64', 'amd64_x86', 'amd64_arm64']
|
||||
# TODO: Re-add "Visual Studio 17 2022" once it's working.
|
||||
cmake_generator: ['Ninja']
|
||||
build_type: [release, debug]
|
||||
build_options: [default, link_off, translations_only]
|
||||
include:
|
||||
- cmake_build: '-DCMAKE_BUILD_TYPE=Release'
|
||||
build_type: release
|
||||
- cmake_build: '-DCMAKE_BUILD_TYPE=Debug'
|
||||
build_type: debug
|
||||
- cmake_options: '-DENABLE_LINK=OFF'
|
||||
build_options: link_off
|
||||
- cmake_options: '-DTRANSLATIONS_ONLY=ON'
|
||||
build_options: translations_only
|
||||
- cmake_vcpkg_triplet: 'x64-windows-static'
|
||||
msvc_arch: x64
|
||||
- cmake_vcpkg_triplet: 'x86-windows-static'
|
||||
msvc_arch: amd64_x86
|
||||
- cmake_vcpkg_triplet: 'arm64-windows-static'
|
||||
msvc_arch: amd64_arm64
|
||||
exclude:
|
||||
# Exclude debug/translations_only build
|
||||
- build_type: debug
|
||||
build_options: translations_only
|
||||
- build_type: release
|
||||
build_options: translations_only
|
||||
msvc_arch: amd64_x86
|
||||
- build_type: release
|
||||
build_options: translations_only
|
||||
msvc_arch: amd64_arm64
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Prepare Visual Studio environment
|
||||
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||
with:
|
||||
arch: ${{ matrix.msvc_arch }}
|
||||
|
||||
- name: Configure
|
||||
run: >-
|
||||
cmake -B build -G ${{ matrix.cmake_generator }} -DVCPKG_TARGET_TRIPLET=${{ matrix.cmake_vcpkg_triplet }} ${{ matrix.cmake_build }} ${{ matrix.cmake_options }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
# Run tests
|
||||
- if: matrix.build_options == 'default' && matrix.msvc_arch != 'amd64_arm64'
|
||||
name: Run tests
|
||||
run: cd build && ctest -j --output-on-failure
|
|
@ -1,4 +1,6 @@
|
|||
[submodule "dependencies"]
|
||||
path = dependencies
|
||||
url = https://github.com/visualboyadvance-m/dependencies.git
|
||||
branch = master
|
||||
[submodule "win32-deps"]
|
||||
path = win32-deps
|
||||
url = https://github.com/visualboyadvance-m/win32-deps.git
|
||||
[submodule "third_party/googletest"]
|
||||
path = third_party/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
|
|
79
CHANGELOG.md
79
CHANGELOG.md
|
@ -4,6 +4,85 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.1.11] - 2024-09-15
|
||||
|
||||
==========================
|
||||
* 3eea90af - build: set BUILD_TESTING=OFF when not git checkout [rkitover]
|
||||
* b3952d74 - build: fix ENABLE_LIRC=ON [rkitover]
|
||||
* f264e7f8 - Fix Help -> Translations URL [rkitover]
|
||||
* 61f427de - Write shortcuts in the proper section (#1335) [Steelskin]
|
||||
* d619ee2b - build: fix installing GoogleTest [rkitover]
|
||||
* 26207038 - Update WinSparkle to 0.8.1 and add ARM64 [rkitover]
|
||||
|
||||
## [2.1.10] - 2024-09-08
|
||||
|
||||
==========================
|
||||
* 7f06428d - Disable dialog position save/restore on wxGTK (#1331) [Steelskin]
|
||||
* e4ef4aa6 - Propagate key events (#1323) [Steelskin]
|
||||
* e2cf6ecb - Add option to mute sound during speedup [rkitover]
|
||||
* d516683a - build: fix for wx using GTK2 [rkitover]
|
||||
* 834c7de8 - build: update macOS builder dists [rkitover]
|
||||
* fc82e062 - build: do not build SDL bin on Windows or macOS [rkitover]
|
||||
* d543784a - [UserInput] Filter key events globally [steelskin]
|
||||
* 902c6c8e - [UserInput] Only process shortcut commands once [steelskin]
|
||||
* b7765092 - [bindings] Set default shortcut for recent file 3 [steelskin]
|
||||
* cc65ef28 - doc: add system requirements to README.md [danialhorton]
|
||||
* 32627f6b - [Dialogs] Save and restore dialog positions [steelskin]
|
||||
* 41952d06 - build: update macOS linker tool to 1.5 [rkitover]
|
||||
* 0c39a5ba - build: override FindGettext to not update po files [rkitover]
|
||||
* 1b77d659 - build: update macOS build to ffmpeg 7.0 [rkitover]
|
||||
* 8d08223d - build: fix compatibility with older ffmpeg [rkitover]
|
||||
* af6028a9 - build: fix build for nix on macOS [rkitover]
|
||||
* b52edf52 - build: fix building on macOS with Homebrew [rkitover]
|
||||
* 6766b9ca - build: fix ffmpeg 7.x compat [rkitover]
|
||||
* 795f25bb - build: fix nix deps for OpenGL [rkitover]
|
||||
* 647be137 - gba: set cpsr=spsr when switching to FIQ mode [40356555+Aikku93]
|
||||
* 8abe3e79 - build: remove -lgcc from static link flags [rkitover]
|
||||
* f4835674 - [Audio] Rework audio devices enumeration [steelskin]
|
||||
* 775a571f - build: fix detecting Visual Studio default vcpkg [rkitover]
|
||||
* 64abd3e8 - [Audio] Remove manual memory allocations [steelskin]
|
||||
* 047ad277 - [Dialogs] Prevent viewers from causing a crash [steelskin]
|
||||
* 045c98d8 - build: only use -Werror=lto-type-mismatch on gcc [rkitover]
|
||||
* 3518dc6a - build: fix LTO on Linux [rkitover]
|
||||
* cc9a03ce - Add toggle: SDL GameController mode for joysticks [rkitover]
|
||||
* 8576733c - [Build] Remove lingering references to OpenAl [steelskin]
|
||||
* 05561922 - build: fix MSYS2 check [rkitover]
|
||||
* d9432ebb - build: fix build on MINGW{64,32}/UCRT64 on MSYS2 [rkitover]
|
||||
* f57cad67 - build: fix static linking on MSYS2 CLANG64 [rkitover]
|
||||
* 23e15734 - build: set wxWidgets_DIR with vcpkg [rkitover]
|
||||
* 98b51910 - [Build] Remove ENABLE_NLS, fix TRANSLATIONS_ONLY [steelskin]
|
||||
* a565cea8 - [Build] Remove the OpenGL check [steelskin]
|
||||
* f96e42fe - build: cmake refactor and improvements [Steelskin]
|
||||
* 07e49025 - Fix most remaining release warnings (#1243) [Steelskin]
|
||||
* 18b97b43 - Fix various build warnings (#1242) [Steelskin]
|
||||
* 13a16eb7 - Fix various warnings in filters and headers (#1241) [Steelskin]
|
||||
* f46da1c5 - build: remove our version of FindSDL2.cmake [rkitover]
|
||||
* 404e9a1a - build: add clang to ./installdeps for MSYS2 [rkitover]
|
||||
* 613bd403 - Make menu more reasonably organized (#1230) [wwrustc]
|
||||
* 215e3c5a - build: use find_program() to find powershell [rkitover]
|
||||
* e5aa685f - build: don't use wx utils as UNIX cmds on Windows [rkitover]
|
||||
* 9e4c8e17 - build: fix gentoo dependency namespaces [68k]
|
||||
* 5f853b99 - Update metainfo.xml to new standards [jhonny.oliveira]
|
||||
* e7d135db - Update links to new domain visualboyadvance-m.org [rkitover]
|
||||
* 60fc096f - build: add libglu-devel for solus in installdeps [rkitover]
|
||||
|
||||
## [2.1.9] - 2024-02-03
|
||||
=======================
|
||||
* 84b0a3e3 - Remove SDL sound driver [rkitover]
|
||||
* 2ad7dd1a - Fix wav audio recording [40356555+Aikku93]
|
||||
* 23ef8ef0 - Dialog appearance improvements + link warning [zachbacon]
|
||||
* a0452701 - build: don't fseeko64()/ftello64() on musl libc [rkitover]
|
||||
* 9e9fe812 - visualboyadvance-m.metainfo.xml: add screenshots to the metainfo [zachbacon]
|
||||
|
||||
## [2.1.8] - 2023-12-13
|
||||
|
||||
========================
|
||||
* beab0881 - Store the PC register at the appropriate offset [steelskin]
|
||||
* bf2452aa - Resize GameArea after MainFrame initialization [steelskin]
|
||||
* 71ca0fb2 - Properly hide the status bar at startup [steelskin]
|
||||
* 7e1afcd3 - Fix reading joystick hat config values [rkitover]
|
||||
* 32581966 - Link: Fix menu not refreshing correctly [74248064+nuive]
|
||||
|
||||
## [2.1.7] - 11.09.2023
|
||||
|
||||
=========================
|
||||
|
|
1229
CMakeLists.txt
1229
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
|
@ -9,17 +9,15 @@
|
|||
- [Commit Message](#commit-message)
|
||||
- [Collaboration on a Branch](#collaboration-on-a-branch)
|
||||
- [Commits from Maintainers](#commits-from-maintainers)
|
||||
- [Strings, Character Sets and Translations](#strings-character-sets-and-translations)
|
||||
- [Pulling Updated Translations](#pulling-updated-translations)
|
||||
- [Translations Message Catalog](#translations-message-catalog)
|
||||
- [Interaction with non-wxWidgets Code](#interaction-with-non-wxwidgets-code)
|
||||
- [Windows Native Development Environment Setup](#windows-native-development-environment-setup)
|
||||
- [Miscellaneous](#miscellaneous)
|
||||
- [Debug Messages](#debug-messages)
|
||||
- [Release Process](#release-process)
|
||||
- [Environment](#environment)
|
||||
- [Certificates](#certificates)
|
||||
- [Release Commit and Tag](#release-commit-and-tag)
|
||||
- [64-bit Windows Binary](#64-bit-windows-binary)
|
||||
- [32-bit Windows Binary](#32-bit-windows-binary)
|
||||
- [64-bit Mac Binary](#64-bit-mac-binary)
|
||||
- [ARM64 Windows Binary](#arm64-windows-binary)
|
||||
- [macOS Binary](#macos-binary)
|
||||
- [Final steps](#final-steps)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
@ -53,11 +51,12 @@ Follow the following steps to process newly submitted issues:
|
|||
- An issue is resolved by closing it in github. A commit that fixes the issue
|
||||
should have the following line near the end of the body of the commit message:
|
||||
```
|
||||
- Fix #999.
|
||||
Fix #999.
|
||||
```
|
||||
This will automatically close the issue and assign the closing commit in the
|
||||
github metadata when it is merged to master. The issue can be reopened if
|
||||
needed.
|
||||
|
||||
- A commit that is work towards resolving an issue, should have the issue number
|
||||
preceded by a pound sign either at the end of a commit message title, if it is
|
||||
of primary relevance to the issue, or the body otherwise.
|
||||
|
@ -70,11 +69,69 @@ Follow these guidelines always:
|
|||
|
||||
https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
||||
|
||||
the description of your work should be in the **commit message NOT the pull
|
||||
, the description of your work should be in the **commit message NOT the pull
|
||||
request description**.
|
||||
|
||||
Make sure your git history is clean and logical, edit when necessary with
|
||||
`rebase -i`.
|
||||
The title line must be no more than 50 characters and the description must be
|
||||
wrapped at 72 characters. Most commit message editor interfaces will help you
|
||||
with this. The title line must not end with a period.
|
||||
|
||||
Write everything in the imperative mood, e.g. change, fix, **NOT** changes,
|
||||
changed, fixed, fixes etc..
|
||||
|
||||
A commit message must always have a title and a description, the description
|
||||
must be independent of the title line, if necessary repeat the information in
|
||||
the title line in the description.
|
||||
|
||||
Make sure the git history in your branch is clean and logical, edit when
|
||||
necessary with `rebase -i`.
|
||||
|
||||
Use one commit per logical change if necessary, most work can be squashed into
|
||||
one commit when you are done. It is not necessary to have separate commits
|
||||
per-file if they are one logical change. We are less strict about this than
|
||||
other projects, fewer is better.
|
||||
|
||||
The commit title line should be prefixed with an area, unless it involves the
|
||||
wxWidgets GUI app, in which case it should **NOT** have a prefix.
|
||||
|
||||
If the commit is a user-facing functionality change or enhancement, the title
|
||||
line of the commit must be a non-technical description of this change. For
|
||||
example "Mute on speedup" because this will go into the changelog.
|
||||
|
||||
The text after the area prefix should not be capitalized.
|
||||
|
||||
Please use one of these area prefixes for non-main-GUI-app commits:
|
||||
|
||||
- doc: documentation, README.md etc.
|
||||
- build: cmake, installdeps, preprocessor compatibility defines, compatibility
|
||||
headers, etc.
|
||||
- gb: the GameBoy emulator core
|
||||
- gba: the GameBoy Advance emulator core
|
||||
- libretro: the libretro core glue and build
|
||||
- sdl: anything for the SDL port
|
||||
- translations: anything related to translations
|
||||
|
||||
. Add other areas here if needed.
|
||||
|
||||
If a commit fixes a regression, use a title line such as:
|
||||
|
||||
```console
|
||||
Fix regression <PROBLEM> in <SHORT-SHA>
|
||||
```
|
||||
, you can get the short sha from `git log --oneline -100` or similar.
|
||||
|
||||
The commit description for a regression must refer to the breaking change in
|
||||
reference format, which you can get from e.g. `git log --format=reference -20`.
|
||||
|
||||
You can refer to github issues using `#<ISSUE-NUMBER>` freely in the description
|
||||
text.
|
||||
|
||||
If a commit fixes an issue, add a line at the end of the description such as:
|
||||
|
||||
```console
|
||||
Fix #<ISSUE-NUMBER>.
|
||||
```
|
||||
.
|
||||
|
||||
#### Collaboration on a Branch
|
||||
|
||||
|
@ -85,137 +142,79 @@ things in mind:
|
|||
better to edit the history than to add more commits. Never add commits fixing
|
||||
previous commits, only improving or adding to them.
|
||||
|
||||
- To update when someone else (very rudely you might say) did a `push -f`, `pull
|
||||
--rebase` will **USUALLY** work. Verify the log, and if necessary do this
|
||||
instead:
|
||||
|
||||
- To update when someone else updated the branch with a `push -f`
|
||||
```bash
|
||||
git status # should be clean, with your work having been already pushed
|
||||
git fetch --all --prune
|
||||
git reset --hard origin/<branch-name>
|
||||
```
|
||||
.
|
||||
|
||||
While actively working on a branch, keep it rebased on top of master.
|
||||
- While actively working on a branch, keep it rebased on top of master.
|
||||
|
||||
#### Commits from Maintainers
|
||||
|
||||
Maintainers have the power to commit directly to master. This power must be
|
||||
used responsibly, something I fail to do myself often, and will try to improve
|
||||
upon.
|
||||
Maintainers and project members have the power to commit directly to master.
|
||||
This power must be used responsibly.
|
||||
|
||||
Make your most earnest attempt to follow these general guidelines to keep our
|
||||
Make your best attempt to follow these general guidelines to keep our
|
||||
history clean:
|
||||
|
||||
- Things that are a straight fix or improvement that does not require discussion
|
||||
- Things that are a minor fix or improvement that does not require discussion
|
||||
can be committed directly, keeping the following guidelines in mind.
|
||||
|
||||
- Bigger new features, code refactors and changes in architecture should go
|
||||
through the PR process.
|
||||
|
||||
- Push code changes to a branch first, so they can run through the CI.
|
||||
Differences in what different compilers allow is a problem that comes up
|
||||
**VERY** frequently. As well as incompatibilities between different
|
||||
configurations for both the C++ code and any supporting code.
|
||||
- Push code changes to a branch first, so they can run through the CI. When you
|
||||
open the commit in GitHub there is a little icon in the upper left corner that
|
||||
shows the CI status for this commit. Differences in what different compilers
|
||||
allow is a problem that comes up **VERY** frequently. As well as
|
||||
incompatibilities between different configurations for both the C++ code and
|
||||
any supporting code.
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
### Strings, Character Sets and Translations
|
||||
#### Debug Messages
|
||||
|
||||
#### Pulling Updated Translations
|
||||
We have an override for `wxLogDebug()` to make it work even in non-debug builds
|
||||
of wx and on windows, even in mintty.
|
||||
|
||||
Once in a while it is necessary to pull new and updated translations from
|
||||
transifex.
|
||||
|
||||
For this you need the transifex client, available for Windows as well from
|
||||
chocolatey as `transifex-client`.
|
||||
|
||||
To pull translations run:
|
||||
|
||||
```bash
|
||||
tx pull -af
|
||||
```
|
||||
|
||||
then check `git status` and if any message catalogs were updated, commit the
|
||||
result as:
|
||||
|
||||
```bash
|
||||
git commit -a --signoff -S -m'Transifex pull.'
|
||||
git push
|
||||
```
|
||||
|
||||
#### Translations Message Catalog
|
||||
|
||||
Strings that need to be translated by our wonderful translators on transifex
|
||||
(thank you guys very much) need to be enclosed in `_("...")`, for example:
|
||||
It works like `printf()`, e.g.:
|
||||
|
||||
```cpp
|
||||
wxLogError(_("error: something very wrong"));
|
||||
int foo = 42;
|
||||
wxLogDebug(wxT("the value of foo = %d"), foo);
|
||||
```
|
||||
|
||||
The next time you run cmake after adding a string to be translated, the `.pot`
|
||||
message catalog source will be regenerated, and you will see a loud message
|
||||
telling you to push to transifex.
|
||||
|
||||
Strings in the XRC XML GUI definition files are automatically added to the
|
||||
message catalog as well.
|
||||
|
||||
If you are working on a branch or a PR, don't push to transifex until it has
|
||||
been merged to master.
|
||||
|
||||
Once it is, push it with:
|
||||
|
||||
```bash
|
||||
tx push -s
|
||||
```
|
||||
|
||||
#### Interaction with non-wxWidgets Code
|
||||
|
||||
Use our `UTF8(...)` function to force any `wxString` to UTF-8 for use by other
|
||||
libraries, screen output or OS APIs. For example:
|
||||
From the core etc. the usual:
|
||||
|
||||
```cpp
|
||||
fprintf(STDERR, "Error: %s\n", UTF8(err_msg));
|
||||
fprintf(stderr, "...", ...);
|
||||
```
|
||||
, will work fine.
|
||||
|
||||
There is one exception to this, when using `wxString::Printf()` and such, you
|
||||
can't pass another `wxString` to the `%s` format directly, use something like
|
||||
this:
|
||||
|
||||
```cpp
|
||||
wxString err;
|
||||
err.Printf("Cannot read file: %s", fname.wc_str());
|
||||
```
|
||||
|
||||
this uses the `wchar_t` UTF-16 representation on Windows and does nothing
|
||||
elsewhere.
|
||||
|
||||
For calling Windows APIs with strings, use the wide char `W` variants and the
|
||||
`wc_str()` method as well.
|
||||
|
||||
### Windows Native Development Environment Setup
|
||||
|
||||
This guide has been moved to:
|
||||
|
||||
https://github.com/rkitover/windows-dev-guide
|
||||
You need a debug build for this to work or to even have a console on Windows.
|
||||
Pass `-DCMAKE_BUILD_TYPE=Debug` to cmake.
|
||||
|
||||
### Release Process
|
||||
|
||||
#### Environment
|
||||
#### GnuPG Key
|
||||
|
||||
The variable `VBAM_NO_PAUSE`, if set, will cause cmake to not pause before gpg
|
||||
signing operations, you want to set this if you've disabled your gpg passphrase
|
||||
to not require interaction during release builds.
|
||||
You will need to create a GnuPG key for signing your commits and release tags,
|
||||
and upload it to a keyserver.
|
||||
|
||||
gpg set up with your key is helpful for the release process on all environments
|
||||
where a binary is built, but you can also make the detached signature files
|
||||
yourself at the end of the process.
|
||||
Make sure to install GnuPG on all environments where you will be making commits
|
||||
and tags.
|
||||
|
||||
For codesigning windows binaries, put your certificate into
|
||||
`~/.codesign/windows_comodo.pkcs12`.
|
||||
#### Certificates
|
||||
|
||||
On Mac the 'Developer ID Application' certificate stored in your login keychain
|
||||
is used, `keychain unlock` will prompt you for your login keychain password, to
|
||||
avoid that set the `LOGIN_KEYCHAIN_PASSWORD` environment variable to your
|
||||
password.
|
||||
Make sure you have set up a Windows code signing certificate with the right
|
||||
password and a Mac 'Developer ID Application' certificate.
|
||||
|
||||
Put the Windows certificate into `~/.codesign/windows_comodo.pkcs12` as a PKCS12
|
||||
file that is password protected, and put the password for it into
|
||||
`~/.codesign/windows_comodo.pkcs12.password`.
|
||||
|
||||
#### Release Commit and Tag
|
||||
|
||||
|
@ -227,8 +226,10 @@ tag:
|
|||
mkdir build && cd build
|
||||
cmake .. -DTAG_RELEASE=TRUE
|
||||
```
|
||||
, follow the instructions to edit the `CHANGELOG.md` and then push the release:
|
||||
|
||||
then push the release:
|
||||
To reiterate, **make sure you edit the `CHANGELOG.md`** to remove any
|
||||
non-user-facing changes before you make the release commit.
|
||||
|
||||
```bash
|
||||
git push
|
||||
|
@ -243,84 +244,126 @@ cmake .. -DTAG_RELEASE=UNDO
|
|||
|
||||
#### 64-bit Windows Binary
|
||||
|
||||
For this you will preferably need the powershell environment setup described
|
||||
earlier, however you can use a regular Visual Studio 64 bit native developer
|
||||
command prompt as well.
|
||||
For this you will preferably need the PowerShell environment setup described
|
||||
[here](https://github.com/rkitover/windows-dev-guide), or by starting the `x64
|
||||
Native Tools Command Prompt` from your Start Menu.
|
||||
|
||||
```powershell
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_BUILD_TYPE=Release -DUPSTREAM_RELEASE=TRUE -G Ninja
|
||||
mkdir build-msvc64
|
||||
cd build-msvc64
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DUPSTREAM_RELEASE=TRUE -G Ninja
|
||||
ninja
|
||||
```
|
||||
|
||||
Collect the following files for the release:
|
||||
|
||||
- `visualboyadvance-m-Win-64bit.zip`
|
||||
- `visualboyadvance-m-Win-64bit.zip.asc`
|
||||
- `visualboyadvance-m-Win-x86_64.zip`
|
||||
- `translations.zip`
|
||||
- `translations.zip.asc`
|
||||
|
||||
Repeat the process for the debug build, with `-DCMAKE_BUILD_TYPE=Debug` and
|
||||
collect this file:
|
||||
|
||||
- `visualboyadvance-m-Win-x86_64-debug.zip`
|
||||
.
|
||||
|
||||
#### 32-bit Windows Binary
|
||||
|
||||
For this the optimal environment is a linux distribution with the mingw
|
||||
toolchain, I use fedora.
|
||||
The 32-bit build is a legacy build for Windows XP compatibility. You will need
|
||||
the MinGW toolchain to build it. The easiest method is to use the MINGW32 MSYS2
|
||||
environment.
|
||||
|
||||
You can set up a shell on a fedora distribution with docker as described here:
|
||||
Make sure the Visual Studio `signtool.exe` is in your path, you can start MSYS2
|
||||
with an inherited `PATH` from a Visual Studio enabled environment or add it to
|
||||
your shell configuration.
|
||||
|
||||
https://gist.github.com/rkitover/6379764c619c10e829e4b2fa0ae243fd
|
||||
|
||||
If using fedora, the cross script will install all necessary dependencies, if
|
||||
not install the base toolchain (mingw gcc, binutils, winpthreads) using the
|
||||
preferred method for your distribution, you can also use mxe for this.
|
||||
|
||||
https://mxe.cc/
|
||||
First install dependencies with:
|
||||
|
||||
```bash
|
||||
sh tools/win/linux-cross-builder -32
|
||||
./installdeps
|
||||
```
|
||||
|
||||
You can also use msys2 on Windows, this is not recommended:
|
||||
. Then build the 32-bit binary as follows:
|
||||
|
||||
```bash
|
||||
sh tools/win/msys2-builder -32
|
||||
mkdir build-mingw32
|
||||
cd build-mingw32
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DUPSTREAM_RELEASE=TRUE -G Ninja
|
||||
ninja
|
||||
```
|
||||
. Collect this file for the release:
|
||||
|
||||
To set up msys2, see this guide:
|
||||
- `visualboyadvance-m-Win-x86_32.zip`
|
||||
|
||||
https://gist.github.com/rkitover/d008324309044fc0cc742bdb16064454
|
||||
. Then repeat the process for the debug build with `-DCMAKE_BUILD_TYPE=Debug`,
|
||||
and collect this file:
|
||||
|
||||
Collect the following files from `~/vbam-build-mingw32/project` if using linux,
|
||||
or `~/vbam-build-msys2-x86_64/project` if using msys2:
|
||||
- `visualboyadvance-m-Win-x86_32-debug.zip`
|
||||
.
|
||||
|
||||
- `visualboyadvance-m-Win-32bit.zip`
|
||||
- `visualboyadvance-m-Win-32bit.zip.asc`
|
||||
#### ARM64 Windows Binary
|
||||
|
||||
#### 64-bit Mac Binary
|
||||
You will need the MSVC ARM64 cross toolchain to build this binary, if you used
|
||||
the install script from [here](https://github.com/rkitover/windows-dev-guide)
|
||||
you will have it installed, otherwise run Visual Studio Installer and install
|
||||
the component.
|
||||
|
||||
To enter the ARM64 cross environment, edit the PowerShell profile described
|
||||
[here](https://github.com/rkitover/windows-dev-guide) or use the `vcvarsall.bat`
|
||||
script with the `amd64_arm64` argument as described
|
||||
[here](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170).
|
||||
|
||||
From there the process is the same as for the 64-bit build, collect the
|
||||
following files for the release:
|
||||
|
||||
- `visualboyadvance-m-Win-arm64.zip`
|
||||
- 'visualboyadvance-m-Win-arm64-debug.zip'
|
||||
.
|
||||
|
||||
#### macOS Binary
|
||||
|
||||
Install the latest Xcode for your OS.
|
||||
|
||||
You will need bash and (optionally) gpg from homebrew (which you will also need
|
||||
to install):
|
||||
|
||||
```bash
|
||||
brew install bash gnupg
|
||||
```
|
||||
You will need bash from Homebrew/nix/MacPorts/whatever to run the build script.
|
||||
|
||||
You will need a codesigning certificate from Apple, which you will be able to
|
||||
generate once you join their developer program. This is the certificate of the
|
||||
type 'Developer ID Application' stored in your login keychain. `keychain
|
||||
unlock` will prompt you for your login keychain password, to avoid that set the
|
||||
`LOGIN_KEYCHAIN_PASSWORD` environment variable to your password.
|
||||
generate once you join their developer program from XCode. This is the
|
||||
certificate of the type 'Developer ID Application' stored in your login
|
||||
keychain.
|
||||
|
||||
If you are not using a GUI session, you will need to use a method to unlock your
|
||||
login keychain before building so that your codesigning certificate can be used.
|
||||
Adding the certificate and key to the System keychain is also a method that some
|
||||
people use.
|
||||
|
||||
To unlock your keychain on login, you can add something like this to your
|
||||
`~/.zshrc`:
|
||||
|
||||
```bash
|
||||
/usr/local/bin/bash tools/osx/builder -64
|
||||
security unlock-keychain -p "$(cat ~/.login-keychain-password)" login.keychain
|
||||
```
|
||||
, with your login password in that file.
|
||||
|
||||
For notarization to work, you will need to create an app-specific password on
|
||||
https://appleid.apple.com , get your Team ID from your Apple Developer account,
|
||||
and store them with this command:
|
||||
|
||||
```bash
|
||||
xcrun notarytool store-credentials AC_PASSWORD \
|
||||
--apple-id you@domain.com \
|
||||
--team-id <DeveloperTeamID> \
|
||||
--password <secret_app_specific_2FA_password>
|
||||
```
|
||||
. Once all of this is set up, run:
|
||||
|
||||
```bash
|
||||
tools/osx/builder
|
||||
```
|
||||
, this will take a while because it builds all of the dependencies.
|
||||
|
||||
Collect the following files from `~/vbam-build-mac-64bit/project`:
|
||||
|
||||
- `visualboyadvance-m-Mac-64bit.zip`
|
||||
- `visualboyadvance-m-Mac-64bit.zip.asc`
|
||||
- `visualboyadvance-m-Mac-x86_64.zip`
|
||||
- `visualboyadvance-m-Mac-x86_64-debug.zip`
|
||||
.
|
||||
|
||||
#### Final steps
|
||||
|
||||
|
@ -328,27 +371,26 @@ Go to the github releases tab, and make a release for the tag you pushed
|
|||
earlier.
|
||||
|
||||
Put any notes to users and distro maintainers into the description as well as
|
||||
the entries from `CHANGELOG.md` generated earlier from git by the release
|
||||
commit script.
|
||||
the generated entries from `CHANGELOG.md` you edited earlier.
|
||||
|
||||
Upload all files collected during the earlier builds, the complete list is:
|
||||
|
||||
|
||||
- `translations.zip`
|
||||
- `translations.zip.asc`
|
||||
- `visualboyadvance-m-Mac-64bit.zip`
|
||||
- `visualboyadvance-m-Mac-64bit.zip.asc`
|
||||
- `visualboyadvance-m-Win-32bit.zip`
|
||||
- `visualboyadvance-m-Win-32bit.zip.asc`
|
||||
- `visualboyadvance-m-Win-64bit.zip`
|
||||
- `visualboyadvance-m-Win-64bit.zip.asc`
|
||||
- `visualboyadvance-m-Win-x86_64.zip`
|
||||
- `visualboyadvance-m-Win-x86_64-debug.zip`
|
||||
- `visualboyadvance-m-Win-x86_32.zip`
|
||||
- `visualboyadvance-m-Win-x86_32-debug.zip`
|
||||
- `visualboyadvance-m-Win-arm64.zip`
|
||||
- 'visualboyadvance-m-Win-arm64-debug.zip'
|
||||
- `visualboyadvance-m-Mac-x86_64.zip`
|
||||
- `visualboyadvance-m-Mac-x86_64-debug.zip`
|
||||
|
||||
Update the winsparkle appcast.xml by running this cmake command:
|
||||
Update the winsparkle `appcast.xml` by running this cmake command:
|
||||
|
||||
```bash
|
||||
cmake .. -DUPDATE_APPCAST=TRUE
|
||||
```
|
||||
|
||||
follow the instructions to push the change to the web data repo.
|
||||
, follow the instructions to push the change to the web data repo.
|
||||
|
||||
Announce the release on reddit r/emulation and the forum.
|
||||
|
|
228
README.md
228
README.md
|
@ -3,11 +3,11 @@
|
|||
|
||||
|
||||
- [Visual Boy Advance - M](#visual-boy-advance---m)
|
||||
- [System Requirements](#system-requirements)
|
||||
- [Building](#building)
|
||||
- [Building a Libretro core](#building-a-libretro-core)
|
||||
- [Visual Studio Support](#visual-studio-support)
|
||||
- [Visual Studio Code Support](#visual-studio-code-support)
|
||||
- [Optional: clangd](#optional-clangd)
|
||||
- [Dependencies](#dependencies)
|
||||
- [Cross compiling for 32 bit on a 64 bit host](#cross-compiling-for-32-bit-on-a-64-bit-host)
|
||||
- [Cross Compiling for Win32](#cross-compiling-for-win32)
|
||||
|
@ -19,13 +19,12 @@
|
|||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
[](https://gitter.im/visualboyadvance-m/Lobby)
|
||||
|
||||
Our bridged Discord server is [Here](https://discord.gg/EpfxEuGMKH).
|
||||
|
||||
We are also on *`#vba-m`* on [Libera IRC](https://libera.chat/) which has a [Web
|
||||
Chat](https://web.libera.chat/).
|
||||
|
||||
[](https://flathub.org/apps/com.vba_m.visualboyadvance-m)
|
||||
[](https://snapcraft.io/visualboyadvance-m)
|
||||
|
||||
***Want to know where you can install visualboyadvance-m in your linux distribution?***
|
||||
|
@ -36,13 +35,13 @@ Chat](https://web.libera.chat/).
|
|||
|
||||
Game Boy and Game Boy Advance Emulator
|
||||
|
||||
The forums are [here](https://board.vba-m.com/).
|
||||
The forums are [here](https://board.visualboyadvance-m.org/).
|
||||
|
||||
Windows and Mac builds are in the [releases tab](https://github.com/visualboyadvance-m/visualboyadvance-m/releases).
|
||||
|
||||
Nightly builds for Windows and macOS are at [https://nightly.vba-m.com/](https://nightly.vba-m.com/).
|
||||
Nightly builds for Windows and macOS are at [https://nightly.visualboyadvance-m.org/](https://nightly.visualboyadvance-m.org/).
|
||||
|
||||
**PLESE TEST THE NIGHTLY OR MASTER WITH A FACTORY RESET BEFORE REPORTING
|
||||
**PLEASE TEST THE NIGHTLY OR MASTER WITH A FACTORY RESET BEFORE REPORTING
|
||||
ISSUES**
|
||||
|
||||
Your distribution may have packages available as well, search for
|
||||
|
@ -56,26 +55,41 @@ the `translations.zip` to the same directory as the executable.
|
|||
If you are having issues, try resetting the config file first, go to `Help ->
|
||||
Factory Reset`.
|
||||
|
||||
## System Requirements
|
||||
|
||||
Windows XP, Vista, 7, 8.1 or 10/11, Linux distros or macOS.
|
||||
|
||||
2Ghz x86 (or x86-64) Intel Core 2 or AMD Athlon processor with SSE, Snapdragon 835
|
||||
or newer CPU compatible with Arm for Windows.
|
||||
|
||||
- Just a guideline, lower clock speeds and Celeron processors may be able to run at full
|
||||
speed on lower settings, and Linux based ARM Operating systems have wider CPU support.
|
||||
|
||||
DirectX June 2010 Redist
|
||||
[Full](https://www.microsoft.com/en-au/download/details.aspx?id=8109) /
|
||||
[Websetup](https://www.microsoft.com/en-au/download/details.aspx?id=35) for
|
||||
Xaudio (Remember to uncheck Bing on the websetup.)
|
||||
|
||||
## Building
|
||||
|
||||
The basic formula to build vba-m is:
|
||||
|
||||
```shell
|
||||
```bash
|
||||
cd ~ && mkdir src && cd src
|
||||
git clone https://github.com/visualboyadvance-m/visualboyadvance-m.git
|
||||
cd visualboyadvance-m
|
||||
./installdeps
|
||||
|
||||
# ./installdeps will give you build instructions, which will be similar to:
|
||||
./installdeps # On Linux or macOS
|
||||
|
||||
mkdir build && cd build
|
||||
cmake .. -G Ninja
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja
|
||||
ninja
|
||||
```
|
||||
|
||||
`./installdeps` is supported on MSys2, Linux (Debian/Ubuntu, Fedora, Arch,
|
||||
Solus, OpenSUSE, Gentoo and RHEL/CentOS) and Mac OS X (homebrew, macports or
|
||||
fink.)
|
||||
`./installdeps` is supported on MSYS2, Linux (Debian/Ubuntu, Fedora, Arch,
|
||||
Solus, OpenSUSE, Gentoo and RHEL/CentOS) and Mac OS X (homebrew, MacPorts or
|
||||
Fink.)
|
||||
|
||||
## Building a Libretro core
|
||||
|
||||
|
@ -86,7 +100,7 @@ cd src/libretro
|
|||
make -j`nproc`
|
||||
```
|
||||
|
||||
Copy vbam_libretro.so to your RetroArch cores directory.
|
||||
Copy `vbam_libretro.so` to your RetroArch cores directory.
|
||||
|
||||
## Visual Studio Support
|
||||
|
||||
|
@ -106,45 +120,34 @@ environment loaded.
|
|||
Using your own user-wide installation of vcpkg is supported, just make sure the
|
||||
environment variable `VCPKG_ROOT` is set.
|
||||
|
||||
To build in the visual studio command prompt, use something like this:
|
||||
To build in the Visual Studio `x64 Native Tools Command Prompt`, use something
|
||||
like this:
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_BUILD_TYPE=Debug -G Ninja
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja
|
||||
ninja
|
||||
```
|
||||
.
|
||||
|
||||
## Visual Studio Code Support
|
||||
|
||||
On most platforms, Visual Studio Code should work as-is, as long as the
|
||||
[CMake Tools extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)
|
||||
is installed.
|
||||
Make sure the
|
||||
[C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
|
||||
and [CMake
|
||||
Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)
|
||||
extensions are installed.
|
||||
|
||||
There is a recommended configuration in the `vscode/settings.json` file. To use
|
||||
it, copy the file to a `.vscode/` folder.
|
||||
Add the following to your `settings.json`:
|
||||
|
||||
By default, this will publish builds in the `build-vscode/` directory. In the
|
||||
`vscode/settings.json` file, there is an alternate configuration for the
|
||||
`"cmake.buildDirectory"` option that will use different build directories for
|
||||
different toolchains and build configurations.
|
||||
|
||||
### Optional: clangd
|
||||
|
||||
The [clangd extension](https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd)
|
||||
uses clangd to provide powerful code completion, errors and warnings and
|
||||
references on click in VS Code.
|
||||
|
||||
With the recommended configuration, the build configuration will generate a
|
||||
`compile_commands.json` file that can be used with clangd. After configuration,
|
||||
you can copy that file to the root directory with a command similar to this one:
|
||||
|
||||
```shell
|
||||
cp build/build-vscode/compile_commands.json .
|
||||
```json
|
||||
{
|
||||
"cmake.configureOnOpen": true,
|
||||
"cmake.preferredGenerators": [ "Ninja" ]
|
||||
}
|
||||
```
|
||||
|
||||
Then, select "clangd: Restart language server" from the command palette to get
|
||||
completion in the IDE.
|
||||
.
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
@ -161,10 +164,10 @@ And the following development libraries:
|
|||
- [zlib](https://zlib.net/) (required)
|
||||
- [mesa](https://mesa3d.org/) (if using X11 or any OpenGL otherwise)
|
||||
- [ffmpeg](https://ffmpeg.org/) (optional, at least version `4.0.4`, for game recording)
|
||||
- [gettext](https://www.gnu.org/software/gettext/) and gettext-tools (optional, with ENABLE_NLS)
|
||||
- [gettext](https://www.gnu.org/software/gettext/) and gettext-tools
|
||||
- [SDL2](https://www.libsdl.org/) (required)
|
||||
- [SFML](https://www.sfml-dev.org/) (optional, for link)
|
||||
- [OpenAL](https://www.openal.org/) or [openal-soft](https://kcat.strangesoft.net/openal.html) (optional, a sound interface)
|
||||
- [openal-soft](https://kcat.strangesoft.net/openal.html) (required, a sound interface)
|
||||
- [wxWidgets](https://wxwidgets.org/) (required for GUI, 2.8 and non-stl builds are no longer supported)
|
||||
|
||||
On Linux and similar, you also need the version of GTK your wxWidgets is linked
|
||||
|
@ -182,68 +185,49 @@ This is supported on Fedora, Arch, Solus and MSYS2.
|
|||
|
||||
`./installdeps` takes one optional parameter for cross-compiling target, which
|
||||
may be `win32` which is an alias for `mingw-w64-i686` to target 32 bit Windows,
|
||||
or `mingw-gw64-x86_64` for 64 bit Windows targets.
|
||||
or `mingw-w64-x86_64` for 64 bit Windows targets.
|
||||
|
||||
The target is implicit on MSys2 depending on which MINGW shell you started (the
|
||||
The target is implicit on MSYS2 depending on which MINGW shell you started (the
|
||||
value of `$MSYSTEM`.)
|
||||
|
||||
On Debian/Ubuntu this uses the MXE apt repository and works quite well.
|
||||
|
||||
On Fedora it can build using the Fedora MinGW packages, albeit with wx 2.8, no
|
||||
OpenGL support, and no Link support for lack of SFML.
|
||||
|
||||
On Arch it currently doesn't work at all because the AUR stuff is completely
|
||||
broken, I will at some point redo the arch stuff to use MXE as well.
|
||||
|
||||
## CMake Options
|
||||
|
||||
The CMake code tries to guess reasonable defaults for options, but you can
|
||||
override them, for example:
|
||||
|
||||
```shell
|
||||
cmake .. -DENABLE_LINK=NO -G Ninja
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_LINK=NO -G Ninja
|
||||
```
|
||||
|
||||
Of particular interest is making **Release** or **Debug** builds, the default
|
||||
mode is **Release**, to make a **Debug** build use something like:
|
||||
|
||||
```shell
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug -G Ninja
|
||||
```
|
||||
|
||||
Here is the complete list:
|
||||
. Here is the complete list:
|
||||
|
||||
| **CMake Option** | **What it Does** | **Defaults** |
|
||||
|-----------------------|----------------------------------------------------------------------|-----------------------|
|
||||
| ENABLE_SDL | Build the SDL port | OFF |
|
||||
| ENABLE_WX | Build the wxWidgets port | ON |
|
||||
| ENABLE_DEBUGGER | Enable the debugger | ON |
|
||||
| ENABLE_NLS | Enable translations | ON |
|
||||
| ENABLE_ASM_CORE | Enable x86 ASM CPU cores (**BUGGY AND DANGEROUS**) | OFF |
|
||||
| ENABLE_ASM | Enable the following two ASM options | ON for 32 bit builds |
|
||||
| ENABLE_ASM_SCALERS | Enable x86 ASM graphic filters | ON for 32 bit builds |
|
||||
| ENABLE_MMX | Enable MMX | ON for 32 bit builds |
|
||||
| ENABLE_LINK | Enable GBA linking functionality (requires SFML) | AUTO |
|
||||
| ENABLE_LIRC | Enable LIRC support | OFF |
|
||||
| ENABLE_FFMPEG | Enable ffmpeg A/V recording | AUTO |
|
||||
| ENABLE_ONLINEUPDATES | Enable online update checks | ON |
|
||||
| ENABLE_LTO | Compile with Link Time Optimization (gcc and clang only) | ON for release build |
|
||||
| ENABLE_GBA_LOGGING | Enable extended GBA logging | ON |
|
||||
| ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON |
|
||||
| ENABLE_XAUDIO2 | Enable xaudio2 sound output for wxWidgets (Windows only) | ON |
|
||||
| ENABLE_OPENAL | Enable OpenAL for the wxWidgets port | AUTO |
|
||||
| ENABLE_SSP | Enable gcc stack protector support (gcc only) | OFF |
|
||||
| ENABLE_ASAN | Enable libasan sanitizers (by default address, only in debug mode) | OFF |
|
||||
| UPSTREAM_RELEASE | Do some release tasks, like codesigning, making zip and gpg sigs. | OFF |
|
||||
| BUILD_TESTING | Build the tests and enable ctest support. | ON |
|
||||
| VBAM_STATIC | Try link all libs statically (the following are set to ON if ON) | OFF |
|
||||
| SDL2_STATIC | Try to link static SDL2 libraries | OFF |
|
||||
| SFML_STATIC_LIBRARIES | Try to link static SFML libraries | OFF |
|
||||
| FFMPEG_STATIC | Try to link static ffmpeg libraries | OFF |
|
||||
| SSP_STATIC | Try to link static gcc stack protector library (gcc only) | OFF except Win32 |
|
||||
| OPENAL_STATIC | Try to link static OpenAL libraries | OFF |
|
||||
| SSP_STATIC | Link gcc stack protecter libssp statically (gcc, with ENABLE_SSP) | OFF |
|
||||
| TRANSLATIONS_ONLY | Build only the translations.zip and nothing else | OFF |
|
||||
| `ENABLE_SDL` | Build the SDL port | OFF |
|
||||
| `ENABLE_WX` | Build the wxWidgets port | ON |
|
||||
| `ENABLE_DEBUGGER` | Enable the debugger | ON |
|
||||
| `ENABLE_ASM_CORE` | Enable x86 ASM CPU cores (**BUGGY AND DANGEROUS**) | OFF |
|
||||
| `ENABLE_ASM` | Enable the following two ASM options | ON for 32 bit builds |
|
||||
| `ENABLE_ASM_SCALERS` | Enable x86 ASM graphic filters | ON for 32 bit builds |
|
||||
| `ENABLE_MMX` | Enable MMX | ON for 32 bit builds |
|
||||
| `ENABLE_LINK` | Enable GBA linking functionality (requires SFML) | AUTO |
|
||||
| `ENABLE_LIRC` | Enable LIRC support | OFF |
|
||||
| `ENABLE_FFMPEG` | Enable ffmpeg A/V recording | AUTO |
|
||||
| `ENABLE_ONLINEUPDATES` | Enable online update checks | ON |
|
||||
| `ENABLE_LTO` | Compile with Link Time Optimization (gcc and clang only) | ON for release build |
|
||||
| `ENABLE_GBA_LOGGING` | Enable extended GBA logging | ON |
|
||||
| `ENABLE_XAUDIO2` | Enable xaudio2 sound output for wxWidgets (Windows only) | ON |
|
||||
| `ENABLE_FAUDIO` | Enable faudio sound output for wxWidgets, | ON, not 32 bit Win |
|
||||
| `ENABLE_ASAN` | Enable libasan sanitizers (by default address, only in debug mode) | OFF |
|
||||
| `UPSTREAM_RELEASE` | Do some release tasks, like codesigning, making zip and gpg sigs. | OFF |
|
||||
| `BUILD_TESTING` | Build the tests and enable ctest support. | ON |
|
||||
| `VBAM_STATIC` | Try link all libs statically (the following are set to ON if ON) | OFF |
|
||||
| `SDL2_STATIC` | Try to link static SDL2 libraries | OFF |
|
||||
| `SFML_STATIC_LIBRARIES` | Try to link static SFML libraries | OFF |
|
||||
| `FFMPEG_STATIC` | Try to link static ffmpeg libraries | OFF |
|
||||
| `OPENAL_STATIC` | Try to link static OpenAL libraries | OFF |
|
||||
| `TRANSLATIONS_ONLY` | Build only the translations.zip and nothing else | OFF |
|
||||
|
||||
Note for distro packagers, we use the CMake module
|
||||
[GNUInstallDirs](https://cmake.org/cmake/help/v2.8.12/cmake.html#module:GNUInstallDirs)
|
||||
|
@ -253,52 +237,6 @@ On Unix to use a different version of wxWidgets, set
|
|||
`wxWidgets_CONFIG_EXECUTABLE` to the path to the `wx-config` script you want to
|
||||
use.
|
||||
|
||||
## MSys2 Notes
|
||||
|
||||
To run the resulting binary, you can simply type:
|
||||
|
||||
```shell
|
||||
./visualboyadvance-m
|
||||
```
|
||||
|
||||
in the shell where you built it.
|
||||
|
||||
If you built with `-DCMAKE_BUILD_TYPE=Debug`, you will get a console app and
|
||||
will see debug messages, even in mintty.
|
||||
|
||||
If you want to start the binary from e.g. a shortcut or Explorer, you will need
|
||||
to put `c:\msys64\mingw32\bin` for 32 bit builds and `c:\msys64\mingw64\bin`
|
||||
for 64 bit builds in your PATH (to edit system PATH, go to Control Panel ->
|
||||
System -> Advanced system settings -> Environment Variables.)
|
||||
|
||||
If you want to package the binary, you will need to include the MinGW DLLs it
|
||||
depends on, they can install to the same directory as the binary.
|
||||
|
||||
Our own builds are static.
|
||||
|
||||
## Debug Messages
|
||||
|
||||
We have an override for `wxLogDebug()` to make it work even in non-debug builds
|
||||
of wx and on windows, even in mintty.
|
||||
|
||||
It works like `printf()`, e.g.:
|
||||
|
||||
```cpp
|
||||
int foo = 42;
|
||||
wxLogDebug(wxT("the value of foo = %d"), foo);
|
||||
```
|
||||
|
||||
From the core etc. the usual:
|
||||
|
||||
```cpp
|
||||
fprintf(stderr, "...", ...);
|
||||
```
|
||||
|
||||
will work fine.
|
||||
|
||||
You need a debug build for this to work or to even have a console on Windows.
|
||||
Pass `-DCMAKE_BUILD_TYPE=Debug` to cmake.
|
||||
|
||||
## Reporting Crash Bugs
|
||||
|
||||
If the emulator crashes and you wish to report the bug, a backtrace made with
|
||||
|
@ -317,27 +255,25 @@ do something such as:
|
|||
```shell
|
||||
ulimit -c unlimited
|
||||
```
|
||||
|
||||
in your shell to enable coredump files.
|
||||
, in your shell to enable core files.
|
||||
|
||||
[This
|
||||
post](https://ask.fedoraproject.org/en/question/98776/where-is-core-dump-located/?answer=98779#post-id-98779)
|
||||
explains how to retrieve core dump on Fedora Linux (and possibly other
|
||||
distributions.)
|
||||
explains how to retrieve core dump on some distributions, when they are managed
|
||||
by systemd.
|
||||
|
||||
Once you have the core dump file, open it with `gdb`, for example:
|
||||
Once you have the core file, open it with `gdb`, for example:
|
||||
|
||||
```shell
|
||||
gdb -c core ./visualboyadvance-m
|
||||
```
|
||||
|
||||
In the `gdb` shell, to print the backtrace, type:
|
||||
. In the `gdb` shell, to start the process and print the backtrace, type:
|
||||
|
||||
```
|
||||
run
|
||||
bt
|
||||
```
|
||||
|
||||
This may be a bit of a hassle, but it helps us out immensely.
|
||||
. This may be a bit of a hassle, but it helps us out immensely.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
|
@ -21,3 +21,32 @@ linkage:
|
|||
short: Shared
|
||||
long: Create shared libraries/DLLs
|
||||
linkage: shared
|
||||
|
||||
useLink:
|
||||
default: withlink
|
||||
choices:
|
||||
withlink:
|
||||
short: WithLink
|
||||
long: Enable the Link feature
|
||||
settings:
|
||||
ENABLE_LINK: ON
|
||||
nolink:
|
||||
short: NoLink
|
||||
long: Disable the Link feature
|
||||
settings:
|
||||
ENABLE_LINK: OFF
|
||||
|
||||
useDebugger:
|
||||
default: withdebugger
|
||||
choices:
|
||||
withdebugger:
|
||||
short: WithDebugger
|
||||
long: Enable the Debugger feature
|
||||
settings:
|
||||
ENABLE_DEBUGGER: ON
|
||||
nodebugger:
|
||||
short: NoDebugger
|
||||
long: Disable the Debugger feature
|
||||
settings:
|
||||
ENABLE_DEBUGGER: OFF
|
||||
ENABLE_SDL: OFF
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
if(TRANSLATIONS_ONLY)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SYSTEM_PROCESSOR)
|
||||
if(NOT CMAKE_TOOLCHAIN_FILE AND CMAKE_HOST_SYSTEM_PROCESSOR)
|
||||
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
|
@ -52,9 +56,11 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "[xX]86|i[3-9]86|[aA][mM][dD]64")
|
|||
endif()
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "[aA][aA][rR][cC][hH]|[aA][rR][mM]")
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 4) # 32 bit
|
||||
set(ARM32 ON)
|
||||
set(ARCH_NAME arm32)
|
||||
set(WINARCH arm)
|
||||
elseif(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
set(ARM64 ON)
|
||||
set(ARCH_NAME arm64)
|
||||
set(WINARCH arm64)
|
||||
endif()
|
||||
|
@ -63,3 +69,8 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "[aA][aA][rR][cC][hH]|[aA][rR][mM]")
|
|||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# We do not support amd64 asm yet
|
||||
if(X86_64 AND (ENABLE_ASM_CORE OR ENABLE_ASM_SCALERS OR ENABLE_MMX))
|
||||
message(FATAL_ERROR "The options ASM_CORE, ASM_SCALERS and MMX are not supported on X86_64 yet.")
|
||||
endif()
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
|
||||
#=============================================================================
|
||||
# Copyright 2010 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# support for the nasm assembler
|
||||
|
||||
set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS nasm asm)
|
||||
|
||||
if(NOT CMAKE_ASM_NASM_OBJECT_FORMAT)
|
||||
if(WIN32)
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT win64)
|
||||
else()
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT win32)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
EXECUTE_PROCESS(COMMAND ${CMAKE_ASM_NASM_COMPILER} -v COMMAND awk "{print \$3}" OUTPUT_VARIABLE NASM_VERSION)
|
||||
IF(NASM_VERSION VERSION_LESS 2.0)
|
||||
IF(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
MESSAGE(FATAL_ERROR "Your nasm is too old to support AMD64, please install nasm from Homebrew or MacPorts.")
|
||||
ENDIF()
|
||||
SET(CMAKE_ASM_NAMS_OBJECT_FORMAT macho)
|
||||
ELSE()
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
|
||||
else()
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT macho32)
|
||||
endif()
|
||||
ENDIF()
|
||||
else()
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8)
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
|
||||
else()
|
||||
SET(CMAKE_ASM_NASM_OBJECT_FORMAT elf32)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <DEFINES> <FLAGS> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
|
||||
|
||||
# Load the generic ASMInformation file:
|
||||
set(ASM_DIALECT "_NASM")
|
||||
include(CMakeASMInformation)
|
||||
set(ASM_DIALECT)
|
|
@ -1,27 +0,0 @@
|
|||
|
||||
#=============================================================================
|
||||
# Copyright 2010 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Find the nasm assembler. yasm (http://www.tortall.net/projects/yasm/) is nasm compatible
|
||||
|
||||
SET(CMAKE_ASM_NASM_COMPILER_INIT nasm yasm)
|
||||
|
||||
IF(NOT CMAKE_ASM_NASM_COMPILER)
|
||||
FIND_PROGRAM(CMAKE_ASM_NASM_COMPILER nasm
|
||||
"$ENV{ProgramFiles}/NASM")
|
||||
ENDIF(NOT CMAKE_ASM_NASM_COMPILER)
|
||||
|
||||
# Load the generic DetermineASM compiler file with the DIALECT set properly:
|
||||
SET(ASM_DIALECT "_NASM")
|
||||
INCLUDE(CMakeDetermineASMCompiler)
|
||||
SET(ASM_DIALECT)
|
|
@ -1,23 +0,0 @@
|
|||
|
||||
#=============================================================================
|
||||
# Copyright 2010 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This file is used by EnableLanguage in cmGlobalGenerator to
|
||||
# determine that the selected ASM_NASM "compiler" works.
|
||||
# For assembler this can only check whether the compiler has been found,
|
||||
# because otherwise there would have to be a separate assembler source file
|
||||
# for each assembler on every architecture.
|
||||
|
||||
SET(ASM_DIALECT "_NASM")
|
||||
INCLUDE(CMakeTestASMCompiler)
|
||||
SET(ASM_DIALECT)
|
|
@ -0,0 +1,122 @@
|
|||
if(TRANSLATIONS_ONLY)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Look for some dependencies using CMake scripts
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
set(OpenGL_GL_PREFERENCE GLVND)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||
set(OpenGL_GL_PREFERENCE LEGACY)
|
||||
endif()
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
# Add libsamplerate to SDL2 with vcpkg
|
||||
unset(SDL2_LIBRARY_TEMP)
|
||||
if(CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg")
|
||||
if(WIN32)
|
||||
unset(arch_suffix)
|
||||
unset(path_prefix)
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES -static)
|
||||
set(arch_suffix -static)
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(path_prefix debug)
|
||||
endif()
|
||||
set(installed_prefix ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows${arch_suffix}/${path_prefix})
|
||||
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${installed_prefix}/lib/samplerate.lib)
|
||||
else()
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} -lsamplerate)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(VBAM_STATIC)
|
||||
set(VBAM_SDL2_LIBS SDL2::SDL2-static ${SDL2_LIBRARY_TEMP})
|
||||
else()
|
||||
set(VBAM_SDL2_LIBS SDL2::SDL2 ${SDL2_LIBRARY_TEMP})
|
||||
endif()
|
||||
|
||||
if(ENABLE_FFMPEG)
|
||||
if(NOT FFMPEG_LIBRARIES)
|
||||
message(FATAL_ERROR "ENABLE_FFMPEG was specified, but required versions of ffmpeg libraries cannot be found!")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND FFMPEG_LDFLAGS "SHELL:-framework CoreText" "SHELL:-framework ApplicationServices")
|
||||
|
||||
if(UPSTREAM_RELEASE)
|
||||
list(APPEND FFMPEG_LDFLAGS -lbz2 -ltiff "SHELL:-framework DiskArbitration" -lfreetype -lfontconfig -llzma -lxml2 -lharfbuzz)
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
set(WIN32_MEDIA_FOUNDATION_LIBS dxva2 evr mf mfplat mfplay mfreadwrite mfuuid amstrmid)
|
||||
list(APPEND FFMPEG_LIBRARIES secur32 bcrypt ${WIN32_MEDIA_FOUNDATION_LIBS})
|
||||
|
||||
if(MSYS AND VBAM_STATIC)
|
||||
foreach(lib tiff jbig lzma)
|
||||
cygpath(lib "$ENV{MSYSTEM_PREFIX}/lib/lib${lib}.a")
|
||||
|
||||
list(APPEND FFMPEG_LIBRARIES "${lib}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
add_compile_definitions(NO_FFMPEG)
|
||||
endif()
|
||||
|
||||
if(ENABLE_LINK)
|
||||
# IPC linking code needs sem_timedwait which can be either in librt or pthreads
|
||||
if(NOT WIN32)
|
||||
find_library(RT_LIB rt)
|
||||
if(RT_LIB)
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${RT_LIB})
|
||||
set(VBAMCORE_LIBS ${VBAMCORE_LIBS} ${RT_LIB})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CheckFunctionExists)
|
||||
check_function_exists(sem_timedwait SEM_TIMEDWAIT)
|
||||
if(SEM_TIMEDWAIT)
|
||||
add_compile_definitions(HAVE_SEM_TIMEDWAIT)
|
||||
endif()
|
||||
else()
|
||||
add_compile_definitions(NO_LINK)
|
||||
endif()
|
||||
|
||||
# for now, only GBALink.cpp uses gettext() directly
|
||||
if(APPLE)
|
||||
# use Homebrew gettext if available
|
||||
if(EXISTS "/usr/local/opt/gettext")
|
||||
set(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};/usr/local/opt/gettext/include")
|
||||
set(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};/usr/local/opt/gettext/lib")
|
||||
set(CMAKE_PROGRAM_PATH "${CMAKE_PROGRAM_PATH};/usr/local/opt/gettext/bin")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_LINK OR ENABLE_WX)
|
||||
find_path(LIBINTL_INC libintl.h)
|
||||
find_library(LIBINTL_LIB NAMES libintl intl)
|
||||
find_library(LIBICONV_LIB NAMES libiconv iconv)
|
||||
find_library(LIBCHARSET_LIB NAMES libcharset charset)
|
||||
if(LIBINTL_LIB)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBINTL_LIB})
|
||||
list(APPEND NLS_LIBS ${LIBINTL_LIB})
|
||||
endif()
|
||||
if(LIBICONV_LIB)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBICONV_LIB})
|
||||
list(APPEND NLS_LIBS ${LIBICONV_LIB})
|
||||
endif()
|
||||
if(LIBCHARSET_LIB)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBCHARSET_LIB})
|
||||
list(APPEND NLS_LIBS ${LIBCHARSET_LIB})
|
||||
endif()
|
||||
include(CheckFunctionExists)
|
||||
check_function_exists(gettext GETTEXT_FN)
|
||||
if(NOT (LIBINTL_INC OR GETTEXT_FN))
|
||||
message(FATAL_ERROR "NLS requires libintl/gettext")
|
||||
endif()
|
||||
endif()
|
||||
|
|
@ -1,231 +1,232 @@
|
|||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindGettext
|
||||
# -----------
|
||||
#
|
||||
# Find GNU gettext tools
|
||||
#
|
||||
# This module looks for the GNU gettext tools. This module defines the
|
||||
# following values:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool.
|
||||
# GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool.
|
||||
# GETTEXT_FOUND: True if gettext has been found.
|
||||
# GETTEXT_VERSION_STRING: the version of gettext found (since CMake 2.8.8)
|
||||
#
|
||||
#
|
||||
#
|
||||
# Additionally it provides the following macros:
|
||||
#
|
||||
# GETTEXT_CREATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN )
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# This will create a target "translations" which will convert the
|
||||
# given input po files into the binary output mo file. If the
|
||||
# ALL option is used, the translations will also be created when
|
||||
# building the default target.
|
||||
#
|
||||
# GETTEXT_PROCESS_POT_FILE( <potfile> [ALL] [INSTALL_DESTINATION <destdir>]
|
||||
# LANGUAGES <lang1> <lang2> ... )
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# Process the given pot file to mo files.
|
||||
# If INSTALL_DESTINATION is given then automatically install rules will
|
||||
# be created, the language subdirectory will be taken into account
|
||||
# (by default use share/locale/).
|
||||
# If ALL is specified, the pot file is processed when building the all traget.
|
||||
# It creates a custom target "potfile".
|
||||
#
|
||||
# GETTEXT_PROCESS_PO_FILES( <lang> [ALL] [INSTALL_DESTINATION <dir>]
|
||||
# PO_FILES <po1> <po2> ... )
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# Process the given po files to mo files for the given language.
|
||||
# If INSTALL_DESTINATION is given then automatically install rules will
|
||||
# be created, the language subdirectory will be taken into account
|
||||
# (by default use share/locale/).
|
||||
# If ALL is specified, the po files are processed when building the all traget.
|
||||
# It creates a custom target "pofiles".
|
||||
#
|
||||
# .. note::
|
||||
# If you wish to use the Gettext library (libintl), use :module:`FindIntl`.
|
||||
#[=======================================================================[.rst:
|
||||
FindGettext
|
||||
-----------
|
||||
|
||||
Find GNU gettext tools
|
||||
|
||||
This module looks for the GNU gettext tools. This module defines the
|
||||
following values:
|
||||
|
||||
::
|
||||
|
||||
GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool.
|
||||
GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool.
|
||||
GETTEXT_FOUND: True if gettext has been found.
|
||||
GETTEXT_VERSION_STRING: the version of gettext found (since CMake 2.8.8)
|
||||
|
||||
|
||||
|
||||
Additionally it provides the following macros:
|
||||
|
||||
GETTEXT_CREATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN )
|
||||
|
||||
::
|
||||
|
||||
This will create a target "translations" which will convert the
|
||||
given input po files into the binary output mo file. If the
|
||||
ALL option is used, the translations will also be created when
|
||||
building the default target.
|
||||
|
||||
GETTEXT_PROCESS_POT_FILE( <potfile> [ALL] [INSTALL_DESTINATION <destdir>]
|
||||
LANGUAGES <lang1> <lang2> ... )
|
||||
|
||||
::
|
||||
|
||||
Process the given pot file to mo files.
|
||||
If INSTALL_DESTINATION is given then automatically install rules will
|
||||
be created, the language subdirectory will be taken into account
|
||||
(by default use share/locale/).
|
||||
If ALL is specified, the pot file is processed when building the all target.
|
||||
It creates a custom target "potfile".
|
||||
|
||||
GETTEXT_PROCESS_PO_FILES( <lang> [ALL] [INSTALL_DESTINATION <dir>]
|
||||
PO_FILES <po1> <po2> ... )
|
||||
|
||||
::
|
||||
|
||||
Process the given po files to mo files for the given language.
|
||||
If INSTALL_DESTINATION is given then automatically install rules will
|
||||
be created, the language subdirectory will be taken into account
|
||||
(by default use share/locale/).
|
||||
If ALL is specified, the po files are processed when building the all target.
|
||||
It creates a custom target "pofiles".
|
||||
|
||||
.. versionadded:: 3.2
|
||||
If you wish to use the Gettext library (libintl), use :module:`FindIntl`.
|
||||
#]=======================================================================]
|
||||
|
||||
find_program(GETTEXT_MSGMERGE_EXECUTABLE msgmerge)
|
||||
|
||||
find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
|
||||
|
||||
if(GETTEXT_MSGMERGE_EXECUTABLE)
|
||||
execute_process(COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --version
|
||||
execute_process(COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --version
|
||||
OUTPUT_VARIABLE gettext_version
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
get_filename_component(msgmerge_name ${GETTEXT_MSGMERGE_EXECUTABLE} NAME)
|
||||
get_filename_component(msgmerge_namewe ${GETTEXT_MSGMERGE_EXECUTABLE} NAME_WE)
|
||||
if (gettext_version MATCHES "^(${msgmerge_name}|${msgmerge_namewe}) \\([^\\)]*\\) ([0-9\\.]+[^ \n]*)")
|
||||
set(GETTEXT_VERSION_STRING "${CMAKE_MATCH_2}")
|
||||
endif()
|
||||
unset(gettext_version)
|
||||
unset(msgmerge_name)
|
||||
unset(msgmerge_namewe)
|
||||
get_filename_component(msgmerge_name ${GETTEXT_MSGMERGE_EXECUTABLE} NAME)
|
||||
get_filename_component(msgmerge_namewe ${GETTEXT_MSGMERGE_EXECUTABLE} NAME_WE)
|
||||
if (gettext_version MATCHES "^(${msgmerge_name}|${msgmerge_namewe}) \\([^\\)]*\\) ([0-9\\.]+[^ \n]*)")
|
||||
set(GETTEXT_VERSION_STRING "${CMAKE_MATCH_2}")
|
||||
endif()
|
||||
unset(gettext_version)
|
||||
unset(msgmerge_name)
|
||||
unset(msgmerge_namewe)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gettext
|
||||
REQUIRED_VARS GETTEXT_MSGMERGE_EXECUTABLE GETTEXT_MSGFMT_EXECUTABLE
|
||||
VERSION_VAR GETTEXT_VERSION_STRING)
|
||||
|
||||
function(_GETTEXT_GET_UNIQUE_TARGET_NAME _name _unique_name)
|
||||
set(propertyName "_GETTEXT_UNIQUE_COUNTER_${_name}")
|
||||
get_property(currentCounter GLOBAL PROPERTY "${propertyName}")
|
||||
if(NOT currentCounter)
|
||||
set(currentCounter 1)
|
||||
endif()
|
||||
set(${_unique_name} "${_name}_${currentCounter}" PARENT_SCOPE)
|
||||
math(EXPR currentCounter "${currentCounter} + 1")
|
||||
set_property(GLOBAL PROPERTY ${propertyName} ${currentCounter} )
|
||||
set(propertyName "_GETTEXT_UNIQUE_COUNTER_${_name}")
|
||||
get_property(currentCounter GLOBAL PROPERTY "${propertyName}")
|
||||
if(NOT currentCounter)
|
||||
set(currentCounter 1)
|
||||
endif()
|
||||
set(${_unique_name} "${_name}_${currentCounter}" PARENT_SCOPE)
|
||||
math(EXPR currentCounter "${currentCounter} + 1")
|
||||
set_property(GLOBAL PROPERTY ${propertyName} ${currentCounter} )
|
||||
endfunction()
|
||||
|
||||
macro(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
|
||||
# make it a real variable, so we can modify it here
|
||||
set(_firstPoFile "${_firstPoFileArg}")
|
||||
# make it a real variable, so we can modify it here
|
||||
set(_firstPoFile "${_firstPoFileArg}")
|
||||
|
||||
set(_gmoFiles)
|
||||
get_filename_component(_potName ${_potFile} NAME)
|
||||
string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
|
||||
get_filename_component(_absPotFile ${_potFile} ABSOLUTE)
|
||||
set(_gmoFiles)
|
||||
get_filename_component(_potName ${_potFile} NAME)
|
||||
string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
|
||||
get_filename_component(_absPotFile ${_potFile} ABSOLUTE)
|
||||
|
||||
set(_addToAll)
|
||||
if(${_firstPoFile} STREQUAL "ALL")
|
||||
set(_addToAll "ALL")
|
||||
set(_firstPoFile)
|
||||
endif()
|
||||
set(_addToAll)
|
||||
if(${_firstPoFile} STREQUAL "ALL")
|
||||
set(_addToAll "ALL")
|
||||
set(_firstPoFile)
|
||||
endif()
|
||||
|
||||
foreach (_currentPoFile ${_firstPoFile} ${ARGN})
|
||||
get_filename_component(_absFile ${_currentPoFile} ABSOLUTE)
|
||||
get_filename_component(_abs_PATH ${_absFile} PATH)
|
||||
string(REGEX REPLACE "^.*/([^/]+)(\\.[^.]+)$" "\\1" _lang ${_absFile})
|
||||
set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
|
||||
foreach (_currentPoFile ${_firstPoFile} ${ARGN})
|
||||
get_filename_component(_absFile ${_currentPoFile} ABSOLUTE)
|
||||
get_filename_component(_abs_PATH ${_absFile} PATH)
|
||||
get_filename_component(_lang ${_absFile} NAME_WE)
|
||||
set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${_gmoFile}
|
||||
#COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_absFile} ${_absPotFile}
|
||||
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile}
|
||||
DEPENDS ${_absPotFile} ${_absFile}
|
||||
)
|
||||
add_custom_command(
|
||||
OUTPUT ${_gmoFile}
|
||||
# COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_absFile} ${_absPotFile}
|
||||
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile}
|
||||
DEPENDS ${_absPotFile} ${_absFile}
|
||||
)
|
||||
|
||||
install(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
|
||||
set(_gmoFiles ${_gmoFiles} ${_gmoFile})
|
||||
install(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
|
||||
set(_gmoFiles ${_gmoFiles} ${_gmoFile})
|
||||
|
||||
endforeach ()
|
||||
endforeach ()
|
||||
|
||||
if(NOT TARGET translations)
|
||||
add_custom_target(translations)
|
||||
endif()
|
||||
if(NOT TARGET translations)
|
||||
add_custom_target(translations)
|
||||
endif()
|
||||
|
||||
_GETTEXT_GET_UNIQUE_TARGET_NAME(translations uniqueTargetName)
|
||||
|
||||
add_custom_target(${uniqueTargetName} ${_addToAll} DEPENDS ${_gmoFiles})
|
||||
add_custom_target(${uniqueTargetName} ${_addToAll} DEPENDS ${_gmoFiles})
|
||||
|
||||
add_dependencies(translations ${uniqueTargetName})
|
||||
|
||||
add_dependencies(translations ${uniqueTargetName})
|
||||
endmacro()
|
||||
|
||||
|
||||
function(GETTEXT_PROCESS_POT_FILE _potFile)
|
||||
set(_gmoFiles)
|
||||
set(_options ALL)
|
||||
set(_oneValueArgs INSTALL_DESTINATION)
|
||||
set(_multiValueArgs LANGUAGES)
|
||||
set(_gmoFiles)
|
||||
set(_options ALL)
|
||||
set(_oneValueArgs INSTALL_DESTINATION)
|
||||
set(_multiValueArgs LANGUAGES)
|
||||
|
||||
CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
|
||||
CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
|
||||
|
||||
get_filename_component(_potName ${_potFile} NAME)
|
||||
string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
|
||||
get_filename_component(_absPotFile ${_potFile} ABSOLUTE)
|
||||
get_filename_component(_potName ${_potFile} NAME)
|
||||
string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _potBasename ${_potName})
|
||||
get_filename_component(_absPotFile ${_potFile} ABSOLUTE)
|
||||
|
||||
foreach (_lang ${_parsedArguments_LANGUAGES})
|
||||
set(_poFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.po")
|
||||
set(_gmoFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo")
|
||||
foreach (_lang ${_parsedArguments_LANGUAGES})
|
||||
set(_poFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.po")
|
||||
set(_gmoFile "${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${_poFile}"
|
||||
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_poFile} ${_absPotFile}
|
||||
DEPENDS ${_absPotFile}
|
||||
)
|
||||
add_custom_command(
|
||||
OUTPUT "${_poFile}"
|
||||
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_poFile} ${_absPotFile}
|
||||
DEPENDS ${_absPotFile}
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${_gmoFile}"
|
||||
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_poFile}
|
||||
DEPENDS ${_absPotFile} ${_poFile}
|
||||
)
|
||||
add_custom_command(
|
||||
OUTPUT "${_gmoFile}"
|
||||
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_poFile}
|
||||
DEPENDS ${_absPotFile} ${_poFile}
|
||||
)
|
||||
|
||||
if(_parsedArguments_INSTALL_DESTINATION)
|
||||
install(FILES ${_gmoFile} DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
|
||||
endif()
|
||||
list(APPEND _gmoFiles ${_gmoFile})
|
||||
endforeach ()
|
||||
if(_parsedArguments_INSTALL_DESTINATION)
|
||||
install(FILES ${_gmoFile} DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo)
|
||||
endif()
|
||||
list(APPEND _gmoFiles ${_gmoFile})
|
||||
endforeach ()
|
||||
|
||||
if(NOT TARGET potfiles)
|
||||
add_custom_target(potfiles)
|
||||
add_custom_target(potfiles)
|
||||
endif()
|
||||
|
||||
_GETTEXT_GET_UNIQUE_TARGET_NAME( potfiles uniqueTargetName)
|
||||
|
||||
if(_parsedArguments_ALL)
|
||||
add_custom_target(${uniqueTargetName} ALL DEPENDS ${_gmoFiles})
|
||||
else()
|
||||
add_custom_target(${uniqueTargetName} DEPENDS ${_gmoFiles})
|
||||
endif()
|
||||
if(_parsedArguments_ALL)
|
||||
add_custom_target(${uniqueTargetName} ALL DEPENDS ${_gmoFiles})
|
||||
else()
|
||||
add_custom_target(${uniqueTargetName} DEPENDS ${_gmoFiles})
|
||||
endif()
|
||||
|
||||
add_dependencies(potfiles ${uniqueTargetName})
|
||||
add_dependencies(potfiles ${uniqueTargetName})
|
||||
|
||||
endfunction()
|
||||
|
||||
|
||||
function(GETTEXT_PROCESS_PO_FILES _lang)
|
||||
set(_options ALL)
|
||||
set(_oneValueArgs INSTALL_DESTINATION)
|
||||
set(_multiValueArgs PO_FILES)
|
||||
set(_gmoFiles)
|
||||
set(_options ALL)
|
||||
set(_oneValueArgs INSTALL_DESTINATION)
|
||||
set(_multiValueArgs PO_FILES)
|
||||
set(_gmoFiles)
|
||||
|
||||
CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
|
||||
CMAKE_PARSE_ARGUMENTS(_parsedArguments "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
|
||||
|
||||
foreach(_current_PO_FILE ${_parsedArguments_PO_FILES})
|
||||
get_filename_component(_name ${_current_PO_FILE} NAME)
|
||||
string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _basename ${_name})
|
||||
set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo)
|
||||
add_custom_command(OUTPUT ${_gmoFile}
|
||||
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
DEPENDS ${_current_PO_FILE}
|
||||
)
|
||||
foreach(_current_PO_FILE ${_parsedArguments_PO_FILES})
|
||||
get_filename_component(_name ${_current_PO_FILE} NAME)
|
||||
string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _basename ${_name})
|
||||
set(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo)
|
||||
add_custom_command(OUTPUT ${_gmoFile}
|
||||
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_current_PO_FILE}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
DEPENDS ${_current_PO_FILE}
|
||||
)
|
||||
|
||||
if(_parsedArguments_INSTALL_DESTINATION)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES/ RENAME ${_basename}.mo)
|
||||
endif()
|
||||
list(APPEND _gmoFiles ${_gmoFile})
|
||||
endforeach()
|
||||
if(_parsedArguments_INSTALL_DESTINATION)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.gmo DESTINATION ${_parsedArguments_INSTALL_DESTINATION}/${_lang}/LC_MESSAGES/ RENAME ${_basename}.mo)
|
||||
endif()
|
||||
list(APPEND _gmoFiles ${_gmoFile})
|
||||
endforeach()
|
||||
|
||||
|
||||
if(NOT TARGET pofiles)
|
||||
add_custom_target(pofiles)
|
||||
add_custom_target(pofiles)
|
||||
endif()
|
||||
|
||||
_GETTEXT_GET_UNIQUE_TARGET_NAME( pofiles uniqueTargetName)
|
||||
|
||||
if(_parsedArguments_ALL)
|
||||
add_custom_target(${uniqueTargetName} ALL DEPENDS ${_gmoFiles})
|
||||
else()
|
||||
add_custom_target(${uniqueTargetName} DEPENDS ${_gmoFiles})
|
||||
endif()
|
||||
if(_parsedArguments_ALL)
|
||||
add_custom_target(${uniqueTargetName} ALL DEPENDS ${_gmoFiles})
|
||||
else()
|
||||
add_custom_target(${uniqueTargetName} DEPENDS ${_gmoFiles})
|
||||
endif()
|
||||
|
||||
add_dependencies(pofiles ${uniqueTargetName})
|
||||
add_dependencies(pofiles ${uniqueTargetName})
|
||||
|
||||
endfunction()
|
||||
|
|
|
@ -1,110 +0,0 @@
|
|||
#.rst:
|
||||
# FindOpenAL
|
||||
# ----------
|
||||
#
|
||||
#
|
||||
#
|
||||
# Locate OpenAL This module defines OPENAL_LIBRARY OPENAL_FOUND, if
|
||||
# false, do not try to link to OpenAL OPENAL_INCLUDE_DIR, where to find
|
||||
# the headers
|
||||
#
|
||||
# $OPENALDIR is an environment variable that would correspond to the
|
||||
# ./configure --prefix=$OPENALDIR used in building OpenAL.
|
||||
#
|
||||
# Created by Eric Wing. This was influenced by the FindSDL.cmake
|
||||
# module.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2005-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This makes the presumption that you are include al.h like
|
||||
# #include "al.h"
|
||||
# and not
|
||||
# #include <AL/al.h>
|
||||
# The reason for this is that the latter is not entirely portable.
|
||||
# Windows/Creative Labs does not by default put their headers in AL/ and
|
||||
# OS X uses the convention <OpenAL/al.h>.
|
||||
#
|
||||
# For Windows, Creative Labs seems to have added a registry key for their
|
||||
# OpenAL 1.1 installer. I have added that key to the list of search paths,
|
||||
# however, the key looks like it could be a little fragile depending on
|
||||
# if they decide to change the 1.00.0000 number for bug fix releases.
|
||||
# Also, they seem to have laid down groundwork for multiple library platforms
|
||||
# which puts the library in an extra subdirectory. Currently there is only
|
||||
# Win32 and I have hardcoded that here. This may need to be adjusted as
|
||||
# platforms are introduced.
|
||||
# The OpenAL 1.0 installer doesn't seem to have a useful key I can use.
|
||||
# I do not know if the Nvidia OpenAL SDK has a registry key.
|
||||
#
|
||||
# For OS X, remember that OpenAL was added by Apple in 10.4 (Tiger).
|
||||
# To support the framework, I originally wrote special framework detection
|
||||
# code in this module which I have now removed with CMake's introduction
|
||||
# of native support for frameworks.
|
||||
# In addition, OpenAL is open source, and it is possible to compile on Panther.
|
||||
# Furthermore, due to bugs in the initial OpenAL release, and the
|
||||
# transition to OpenAL 1.1, it is common to need to override the built-in
|
||||
# framework.
|
||||
# Per my request, CMake should search for frameworks first in
|
||||
# the following order:
|
||||
# ~/Library/Frameworks/OpenAL.framework/Headers
|
||||
# /Library/Frameworks/OpenAL.framework/Headers
|
||||
# /System/Library/Frameworks/OpenAL.framework/Headers
|
||||
#
|
||||
# On OS X, this will prefer the Framework version (if found) over others.
|
||||
# People will have to manually change the cache values of
|
||||
# OPENAL_LIBRARY to override this selection or set the CMake environment
|
||||
# CMAKE_INCLUDE_PATH to modify the search paths.
|
||||
|
||||
find_path(OPENAL_INCLUDE_DIR al.h
|
||||
HINTS
|
||||
ENV OPENALDIR
|
||||
PATH_SUFFIXES AL OpenAL
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]
|
||||
)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_OpenAL_ARCH_DIR libs/Win64)
|
||||
else()
|
||||
set(_OpenAL_ARCH_DIR libs/Win32)
|
||||
endif()
|
||||
|
||||
find_library(OPENAL_LIBRARY
|
||||
NAMES OpenAL al openal OpenAL32
|
||||
HINTS
|
||||
ENV OPENALDIR
|
||||
PATH_SUFFIXES lib64 lib libs64 libs ${_OpenAL_ARCH_DIR}
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/sw
|
||||
/opt/local
|
||||
/opt/csw
|
||||
/opt
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir]
|
||||
)
|
||||
|
||||
unset(_OpenAL_ARCH_DIR)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENAL_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
|
|
@ -1,244 +0,0 @@
|
|||
# This module defines
|
||||
# SDL2_LIBRARY, the name of the library to link against
|
||||
# SDL2_FOUND, if false, do not try to link to SDL2
|
||||
# SDL2_INCLUDE_DIR, where to find SDL.h
|
||||
#
|
||||
# If you have pkg-config, these extra variables are also defined:
|
||||
# SDL2_DEFINITIONS, extra CFLAGS
|
||||
# SDL2_EXTRA_LIBS, extra link libs
|
||||
# SDL2_LINKER_FLAGS, extra link flags
|
||||
#
|
||||
# The latter two are automatically added to SDL2_LIBRARY
|
||||
#
|
||||
# To use them, add code such as:
|
||||
#
|
||||
# # SET(SDL2_STATIC ON) # if you want to link SDL2 statically
|
||||
# FIND_PACKAGE(SDL2 REQUIRED)
|
||||
# ADD_DEFINITIONS(${SDL2_DEFINITIONS})
|
||||
# TARGET_LINK_LIBRARIES(your-executable-target ${SDL2_LIBRARY} ...)
|
||||
#
|
||||
# This module responds to the the flag:
|
||||
# SDL2_BUILDING_LIBRARY
|
||||
# If this is defined, then no SDL2main will be linked in because
|
||||
# only applications need main().
|
||||
# Otherwise, it is assumed you are building an application and this
|
||||
# module will attempt to locate and set the the proper link flags
|
||||
# as part of the returned SDL2_LIBRARY variable.
|
||||
#
|
||||
# If you want to link SDL2 statically, set SDL2_STATIC to ON.
|
||||
#
|
||||
# Don't forget to include SDLmain.h and SDLmain.m 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_TEMP in your configuration
|
||||
# and no SDL2_LIBRARY, it means CMake did not find your SDL2 library
|
||||
# (SDL2.dll, libsdl2.so, SDL2.framework, etc).
|
||||
# Set SDL2_LIBRARY_TEMP 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_LIBRARY
|
||||
# variable, but when these values are unset, SDL2_LIBRARY 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
|
||||
#
|
||||
# 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 SDL2main 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 values of
|
||||
# SDL2_LIBRARY to override this selection or set the CMake environment
|
||||
# CMAKE_INCLUDE_PATH to modify the search paths.
|
||||
#
|
||||
# Note that the header path has changed from SDL3/SDL.h to just SDL.h
|
||||
# This needed to change because "proper" SDL convention
|
||||
# is #include "SDL.h", not <SDL2/SDL.h>. This is done for portability
|
||||
# reasons because not all systems place things in SDL2/ (see FreeBSD).
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2003-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
SET(SDL2_SEARCH_PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local # Mac Homebrew and local installs
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # MacPorts
|
||||
/opt/csw # OpenCSW (Solaris)
|
||||
/opt
|
||||
${SDL2_PATH}/include
|
||||
${SDL2_PATH}/lib
|
||||
)
|
||||
|
||||
FIND_PATH(SDL2_INCLUDE_DIR SDL.h
|
||||
HINTS $ENV{SDL2DIR}
|
||||
PATH_SUFFIXES SDL2
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
)
|
||||
|
||||
SET(CURRENT_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
if(SDL2_STATIC)
|
||||
if(MSVC)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib)
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
unset(lib_suffixes)
|
||||
if(MSVC)
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES "-static$")
|
||||
list(APPEND lib_suffixes -static)
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^(Debug|RelWithDebInfo)$")
|
||||
list(APPEND lib_suffixes d)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Calculate combination of possible name+suffixes.
|
||||
unset(names)
|
||||
set(lib_name SDL2)
|
||||
set(current ${lib_name})
|
||||
foreach(suffix ${lib_suffixes})
|
||||
list(APPEND names "${current}${suffix}" "${lib_name}${suffix}")
|
||||
set(current "${current}${suffix}")
|
||||
endforeach()
|
||||
|
||||
# Fallback to name by itself.
|
||||
list(APPEND names ${lib_name})
|
||||
|
||||
FIND_LIBRARY(SDL2_LIBRARY_TEMP
|
||||
NAMES ${names}
|
||||
HINTS $ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib lib/x64 lib/x86
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
)
|
||||
|
||||
if(NOT (SDL2_BUILDING_LIBRARY OR ${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.
|
||||
find_library(SDL2MAIN_LIBRARY
|
||||
NAMES SDL2main${lib_suffix}
|
||||
HINTS $ENV{SDL2DIR}
|
||||
PATH_SUFFIXES lib64 lib lib/x64 lib/x86
|
||||
PATHS ${SDL2_SEARCH_PATHS}
|
||||
)
|
||||
endif()
|
||||
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CURRENT_FIND_LIBRARY_SUFFIXES})
|
||||
UNSET(CURRENT_FIND_LIBRARY_SUFFIXES)
|
||||
|
||||
# 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)
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# MinGW needs an additional link flag, -mwindows (to make a GUI app)
|
||||
# but we only add it when not making a Debug build.
|
||||
# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -mwindows
|
||||
IF(MINGW)
|
||||
SET(MINGW32_LIBRARY -lmingw32 CACHE STRING "MinGW library")
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|RelWithDebInfo)$")
|
||||
SET(MINGW32_LIBRARY ${MINGW32_LIBRARY} -mwindows)
|
||||
ENDIF()
|
||||
ENDIF(MINGW)
|
||||
|
||||
IF(SDL2_LIBRARY_TEMP)
|
||||
# For SDL2main
|
||||
if(SDL2MAIN_LIBRARY AND NOT WIN32)
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
|
||||
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_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
|
||||
ENDIF(APPLE)
|
||||
|
||||
# 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_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
|
||||
ENDIF(NOT APPLE)
|
||||
|
||||
# For MinGW library
|
||||
IF(MINGW)
|
||||
SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP} -lversion -limm32)
|
||||
ENDIF(MINGW)
|
||||
|
||||
# Add some stuff from pkg-config, if available
|
||||
IF(NOT PKG_CONFIG_EXECUTABLE)
|
||||
FIND_PACKAGE(PkgConfig QUIET)
|
||||
ENDIF(NOT PKG_CONFIG_EXECUTABLE)
|
||||
|
||||
IF(PKG_CONFIG_EXECUTABLE)
|
||||
# get any definitions
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --cflags-only-other sdl2 OUTPUT_VARIABLE SDL2_DEFINITIONS ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
SET(SDL2_DEFINITIONS ${SDL2_DEFINITIONS} CACHE STRING "Extra CFLAGS for SDL2 from pkg-config")
|
||||
|
||||
# get any extra stuff needed for linking
|
||||
IF(NOT SDL2_STATIC)
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --libs-only-other sdl2 OUTPUT_VARIABLE SDL2_LINKER_FLAGS_RAW ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --libs-only-l sdl2 OUTPUT_VARIABLE SDL2_EXTRA_LIBS_RAW ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
ELSE(NOT SDL2_STATIC)
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --static --libs-only-other sdl2 OUTPUT_VARIABLE SDL2_LINKER_FLAGS_RAW ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
EXECUTE_PROCESS(COMMAND ${PKG_CONFIG_EXECUTABLE} --static --libs-only-l sdl2 OUTPUT_VARIABLE SDL2_EXTRA_LIBS_RAW ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
ENDIF(NOT SDL2_STATIC)
|
||||
|
||||
STRING(REGEX REPLACE "[^ ]+SDL2[^ ]*" "" SDL2_EXTRA_LIBS_RAW2 "${SDL2_EXTRA_LIBS_RAW}")
|
||||
STRING(REGEX REPLACE " +" ";" SDL2_EXTRA_LIBS "${SDL2_EXTRA_LIBS_RAW2}")
|
||||
STRING(REGEX REPLACE " +" ";" SDL2_LINKER_FLAGS "${SDL2_LINKER_FLAGS_RAW}")
|
||||
|
||||
SET(SDL2_LINKER_FLAGS ${SDL2_LINKER_FLAGS} CACHE STRING "Linker flags for linking SDL2")
|
||||
SET(SDL2_EXTRA_LIBS ${SDL2_EXTRA_LIBS} CACHE STRING "Extra libraries for linking SDL2")
|
||||
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${SDL2_EXTRA_LIBS} ${SDL2_LINKER_FLAGS})
|
||||
ENDIF(PKG_CONFIG_EXECUTABLE)
|
||||
|
||||
# Set the final string here so the GUI reflects the final state.
|
||||
SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
|
||||
# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
|
||||
SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
|
||||
ENDIF(SDL2_LIBRARY_TEMP)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
|
@ -57,7 +57,7 @@
|
|||
|
||||
# define the SFML_STATIC macro if static build was chosen
|
||||
if(SFML_STATIC_LIBRARIES)
|
||||
add_definitions(-DSFML_STATIC)
|
||||
add_compile_definitions(SFML_STATIC)
|
||||
endif()
|
||||
|
||||
# define the list of search paths for headers and libraries
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
# FindSSP.cmake
|
||||
#
|
||||
# Find libssp necessary when using gcc with e.g. -fstack-protector=strong
|
||||
#
|
||||
# See: http://wiki.osdev.org/Stack_Smashing_Protector
|
||||
#
|
||||
# To use:
|
||||
#
|
||||
# put a copy into your <project_root>/cmake/
|
||||
#
|
||||
# In your main CMakeLists.txt do something like this:
|
||||
#
|
||||
# if(WIN32)
|
||||
# set(SSP_STATIC ON)
|
||||
# endif()
|
||||
#
|
||||
# find_package(SSP)
|
||||
#
|
||||
# if(SSP_LIBRARY)
|
||||
# set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} ${SSP_LIBRARY}")
|
||||
# set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} ${SSP_LIBRARY}")
|
||||
# endif()
|
||||
|
||||
# only do this when compiling with gcc/g++
|
||||
if(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||
return()
|
||||
endif()
|
||||
|
||||
function(FindSSP)
|
||||
if(NOT CMAKE_CXX_COMPILER AND CMAKE_C_COMPILER)
|
||||
set(CMAKE_CXX_COMPILER ${CMAKE_C_COMPILER})
|
||||
endif()
|
||||
|
||||
foreach(arg ${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_COMPILER_ARG2} ${CMAKE_CXX_COMPILER_ARG3} ${CMAKE_CXX_COMPILER_ARG4} ${CMAKE_CXX_COMPILER_ARG5} ${CMAKE_CXX_COMPILER_ARG6} ${CMAKE_CXX_COMPILER_ARG7} ${CMAKE_CXX_COMPILER_ARG8} ${CMAKE_CXX_COMPILER_ARG9})
|
||||
string(STRIP ${arg} arg)
|
||||
set(gcc_args "${gcc_args};${arg}")
|
||||
endforeach()
|
||||
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${gcc_args} --print-prog-name=gcc OUTPUT_VARIABLE GCC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(WIN32 AND NOT MSYS)
|
||||
execute_process(COMMAND where.exe ${GCC_EXECUTABLE} OUTPUT_VARIABLE GCC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
else()
|
||||
execute_process(COMMAND sh -c "command -v ${GCC_EXECUTABLE}" OUTPUT_VARIABLE GCC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
get_filename_component(GCC_DIRNAME "${GCC_EXECUTABLE}" DIRECTORY)
|
||||
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${gcc_args} --print-libgcc-file-name OUTPUT_VARIABLE LIBGCC_FILE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
get_filename_component(LIBGCC_DIRNAME "${LIBGCC_FILE}" DIRECTORY)
|
||||
|
||||
set(SSP_SEARCH_PATHS ${GCC_DIRNAME} ${LIBGCC_DIRNAME})
|
||||
|
||||
if(SSP_STATIC)
|
||||
if(WIN32)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a)
|
||||
else()
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(SSP_LIBRARY
|
||||
NAMES ssp libssp
|
||||
HINTS ${SSP_SEARCH_PATHS}
|
||||
PATH_SUFFIXES lib64 lib lib/x64 lib/x86
|
||||
)
|
||||
|
||||
set(SSP_LIBRARY PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
FindSSP()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(SSP REQUIRED_VARS SSP_LIBRARY)
|
|
@ -7,23 +7,6 @@
|
|||
#
|
||||
# Returns the refspec and sha hash of the current head revision
|
||||
#
|
||||
# git_describe(<var> [<additional arguments to git describe> ...])
|
||||
#
|
||||
# Returns the results of git describe on the source tree, and adjusting
|
||||
# the output so that it tests false if an error occurs.
|
||||
#
|
||||
# git_get_exact_tag(<var> [<additional arguments to git describe> ...])
|
||||
#
|
||||
# Returns the results of git describe --exact-match on the source tree,
|
||||
# and adjusting the output so that it tests false if there was no exact
|
||||
# matching tag.
|
||||
#
|
||||
# git_local_changes(<var>)
|
||||
#
|
||||
# Returns either "CLEAN" or "DIRTY" with respect to uncommitted changes.
|
||||
# Uses the return code of "git diff-index --quiet HEAD --".
|
||||
# Does not regard untracked files.
|
||||
#
|
||||
# Requires CMake 2.6 or newer (uses the 'function' command)
|
||||
#
|
||||
# Original Author:
|
||||
|
@ -85,84 +68,3 @@ function(get_git_head_revision _refspecvar _hashvar)
|
|||
set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
|
||||
set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_describe _var)
|
||||
if(NOT GIT_FOUND)
|
||||
find_package(Git QUIET)
|
||||
endif()
|
||||
get_git_head_revision(refspec hash)
|
||||
if(NOT GIT_FOUND)
|
||||
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
if(NOT hash)
|
||||
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# TODO sanitize
|
||||
#if((${ARGN}" MATCHES "&&") OR
|
||||
# (ARGN MATCHES "||") OR
|
||||
# (ARGN MATCHES "\\;"))
|
||||
# message("Please report the following error to the project!")
|
||||
# message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
|
||||
#endif()
|
||||
|
||||
#message(STATUS "Arguments to execute_process: ${ARGN}")
|
||||
|
||||
execute_process(COMMAND
|
||||
"${GIT_EXECUTABLE}"
|
||||
describe
|
||||
${hash}
|
||||
${ARGN}
|
||||
WORKING_DIRECTORY
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
RESULT_VARIABLE
|
||||
res
|
||||
OUTPUT_VARIABLE
|
||||
out
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(NOT res EQUAL 0)
|
||||
set(out "${out}-${res}-NOTFOUND")
|
||||
endif()
|
||||
|
||||
set(${_var} "${out}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_get_exact_tag _var)
|
||||
git_describe(out --exact-match ${ARGN})
|
||||
set(${_var} "${out}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(git_local_changes _var)
|
||||
if(NOT GIT_FOUND)
|
||||
find_package(Git QUIET)
|
||||
endif()
|
||||
get_git_head_revision(refspec hash)
|
||||
if(NOT GIT_FOUND)
|
||||
set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
if(NOT hash)
|
||||
set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND
|
||||
"${GIT_EXECUTABLE}"
|
||||
diff-index --quiet HEAD --
|
||||
WORKING_DIRECTORY
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
RESULT_VARIABLE
|
||||
res
|
||||
OUTPUT_VARIABLE
|
||||
out
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(res EQUAL 0)
|
||||
set(${_var} "CLEAN" PARENT_SCOPE)
|
||||
else()
|
||||
set(${_var} "DIRTY" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
|
|
@ -3,7 +3,6 @@ function(git_version version revision version_release)
|
|||
set(${revision} "" CACHE STRING "Latest Git Tag Revision" FORCE)
|
||||
set(${version_release} 0 CACHE STRING "Is this a versioned release without revision" FORCE)
|
||||
|
||||
find_package(Git)
|
||||
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
# get latest version from tag history
|
||||
execute_process(COMMAND "${GIT_EXECUTABLE}" tag "--format=%(align:width=20)%(refname:short)%(end)%(if)%(*objectname)%(then)%(*objectname)%(else)%(objectname)%(end)" --sort=-v:refname OUTPUT_VARIABLE tags OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
function(use_llvm_toolchain)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL Clang)
|
||||
set(compiler "${CMAKE_C_COMPILER}")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
set(compiler "${CMAKE_CXX_COMPILER}")
|
||||
else()
|
||||
return()
|
||||
endif()
|
||||
|
||||
foreach(tool ar ranlib ld nm objdump as)
|
||||
execute_process(
|
||||
COMMAND "${compiler}" -print-prog-name=llvm-${tool}
|
||||
OUTPUT_VARIABLE prog_path
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
# for FreeBSD
|
||||
if(NOT prog_path MATCHES "^/")
|
||||
get_filename_component(
|
||||
abs_path ${prog_path} ABSOLUTE
|
||||
BASE_DIR /usr/local/llvm-devel/bin
|
||||
)
|
||||
|
||||
if(EXISTS ${abs_path})
|
||||
set(prog_path ${abs_path})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(prog_path MATCHES "^/")
|
||||
if(tool STREQUAL ld)
|
||||
set(tool linker)
|
||||
elseif(tool STREQUAL as)
|
||||
set(tool asm_compiler)
|
||||
endif()
|
||||
|
||||
string(TOUPPER ${tool} utool)
|
||||
|
||||
set(CMAKE_${utool} "${prog_path}" PARENT_SCOPE)
|
||||
set(CMAKE_${utool} "${prog_path}" CACHE FILEPATH "${tool}" FORCE)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
use_llvm_toolchain()
|
|
@ -11,8 +11,8 @@
|
|||
# In addition, the following commands are called with the package manager's
|
||||
# paths:
|
||||
#
|
||||
# INCLUDE_DIRECTORIES()
|
||||
# LINK_DIRECTORIES()
|
||||
# include_directories()
|
||||
# link_directories()
|
||||
#
|
||||
# The paths of package managers not currently in $ENV{PATH} are added to
|
||||
# CMAKE_IGNORE_PATH .
|
||||
|
@ -41,68 +41,75 @@
|
|||
# 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.
|
||||
|
||||
IF(NOT APPLE)
|
||||
RETURN()
|
||||
ENDIF()
|
||||
if(NOT APPLE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
IF(EXISTS /usr/local/bin/brew AND $ENV{PATH} MATCHES "(^|:)/usr/local/bin/?(:|$)")
|
||||
MESSAGE("-- Configuring for Mac Homebrew")
|
||||
if(NOT "$ENV{IN_NIX_SHELL}" STREQUAL "")
|
||||
message(STATUS "Configuring for Nix")
|
||||
|
||||
SET(MAC_HOMEBREW ON)
|
||||
set(NIX ON)
|
||||
|
||||
SET(CMAKE_IGNORE_PATH /opt/local /opt/local/bin /opt/local/include /opt/local/Library/Frameworks /opt/local/lib ${CMAKE_IGNORE_PATH})
|
||||
SET(CMAKE_IGNORE_PATH /sw /sw/bin /sw/include /sw/Library/Frameworks /sw/lib ${CMAKE_IGNORE_PATH})
|
||||
set(CMAKE_IGNORE_PATH /opt/local /opt/local/bin /opt/local/include /opt/local/Library/Frameworks /opt/local/lib ${CMAKE_IGNORE_PATH})
|
||||
set(CMAKE_IGNORE_PATH /sw /sw/bin /sw/include /sw/Library/Frameworks /sw/lib ${CMAKE_IGNORE_PATH})
|
||||
elseif(EXISTS /usr/local/bin/brew AND $ENV{PATH} MATCHES "(^|:)/usr/local/bin/?(:|$)")
|
||||
message(STATUS "Configuring for Mac Homebrew")
|
||||
|
||||
SET(CMAKE_FRAMEWORK_PATH /usr/local/Frameworks ${CMAKE_FRAMEWORK_PATH})
|
||||
set(MAC_HOMEBREW ON)
|
||||
|
||||
SET(CMAKE_INCLUDE_PATH /usr/local/include ${CMAKE_INCLUDE_PATH})
|
||||
INCLUDE_DIRECTORIES("/usr/local/include")
|
||||
set(CMAKE_IGNORE_PATH /opt/local /opt/local/bin /opt/local/include /opt/local/Library/Frameworks /opt/local/lib ${CMAKE_IGNORE_PATH})
|
||||
set(CMAKE_IGNORE_PATH /sw /sw/bin /sw/include /sw/Library/Frameworks /sw/lib ${CMAKE_IGNORE_PATH})
|
||||
|
||||
SET(CMAKE_LIBRARY_PATH /usr/local/lib ${CMAKE_LIBRARY_PATH})
|
||||
LINK_DIRECTORIES("/usr/local/lib")
|
||||
set(CMAKE_FRAMEWORK_PATH /usr/local/Frameworks ${CMAKE_FRAMEWORK_PATH})
|
||||
|
||||
SET(CMAKE_PROGRAM_PATH /usr/local/bin ${CMAKE_PROGRAM_PATH})
|
||||
set(CMAKE_INCLUDE_PATH /usr/local/include ${CMAKE_INCLUDE_PATH})
|
||||
include_directories("/usr/local/include")
|
||||
|
||||
set(CMAKE_LIBRARY_PATH /usr/local/lib ${CMAKE_LIBRARY_PATH})
|
||||
link_directories("/usr/local/lib")
|
||||
|
||||
set(CMAKE_PROGRAM_PATH /usr/local/bin ${CMAKE_PROGRAM_PATH})
|
||||
|
||||
set(ZLIB_ROOT /usr/local/opt/zlib)
|
||||
ELSEIF(EXISTS /opt/local/bin/port AND $ENV{PATH} MATCHES "(^|:)/opt/local/bin/?(:|$)")
|
||||
MESSAGE("-- Configuring for MacPorts")
|
||||
elseif(EXISTS /opt/local/bin/port AND $ENV{PATH} MATCHES "(^|:)/opt/local/bin/?(:|$)")
|
||||
message(STATUS "Configuring for MacPorts")
|
||||
|
||||
SET(MACPORTS ON)
|
||||
set(MACPORTS ON)
|
||||
|
||||
SET(CMAKE_IGNORE_PATH /sw /sw/bin /sw/include /sw/Library/Frameworks /sw/lib ${CMAKE_IGNORE_PATH})
|
||||
set(CMAKE_IGNORE_PATH /sw /sw/bin /sw/include /sw/Library/Frameworks /sw/lib ${CMAKE_IGNORE_PATH})
|
||||
|
||||
SET(CMAKE_FRAMEWORK_PATH /opt/local/Library/Frameworks ${CMAKE_FRAMEWORK_PATH})
|
||||
set(CMAKE_FRAMEWORK_PATH /opt/local/Library/Frameworks ${CMAKE_FRAMEWORK_PATH})
|
||||
|
||||
SET(CMAKE_INCLUDE_PATH /opt/local/include ${CMAKE_INCLUDE_PATH})
|
||||
INCLUDE_DIRECTORIES("/opt/local/include")
|
||||
set(CMAKE_INCLUDE_PATH /opt/local/include ${CMAKE_INCLUDE_PATH})
|
||||
include_directories("/opt/local/include")
|
||||
|
||||
SET(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH})
|
||||
LINK_DIRECTORIES("/opt/local/lib")
|
||||
set(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH})
|
||||
link_directories("/opt/local/lib")
|
||||
|
||||
SET(CMAKE_PROGRAM_PATH /opt/local/bin ${CMAKE_PROGRAM_PATH})
|
||||
ELSEIF(EXISTS /sw/bin/fink AND $ENV{PATH} MATCHES "(^|:)/sw/bin/?(:|$)")
|
||||
MESSAGE("-- Configuring for Fink")
|
||||
set(CMAKE_PROGRAM_PATH /opt/local/bin ${CMAKE_PROGRAM_PATH})
|
||||
elseif(EXISTS /sw/bin/fink AND $ENV{PATH} MATCHES "(^|:)/sw/bin/?(:|$)")
|
||||
message(STATUS "Configuring for Fink")
|
||||
|
||||
SET(FINK ON)
|
||||
set(FINK ON)
|
||||
|
||||
SET(CMAKE_IGNORE_PATH /opt/local /opt/local/bin /opt/local/include /opt/local/Library/Frameworks /opt/local/lib ${CMAKE_IGNORE_PATH})
|
||||
set(CMAKE_IGNORE_PATH /opt/local /opt/local/bin /opt/local/include /opt/local/Library/Frameworks /opt/local/lib ${CMAKE_IGNORE_PATH})
|
||||
|
||||
SET(CMAKE_FRAMEWORK_PATH /sw/Library/Frameworks ${CMAKE_FRAMEWORK_PATH})
|
||||
set(CMAKE_FRAMEWORK_PATH /sw/Library/Frameworks ${CMAKE_FRAMEWORK_PATH})
|
||||
|
||||
SET(CMAKE_INCLUDE_PATH /sw/include ${CMAKE_INCLUDE_PATH})
|
||||
INCLUDE_DIRECTORIES("/sw/include")
|
||||
set(CMAKE_INCLUDE_PATH /sw/include ${CMAKE_INCLUDE_PATH})
|
||||
include_directories("/sw/include")
|
||||
|
||||
SET(CMAKE_LIBRARY_PATH /sw/lib ${CMAKE_LIBRARY_PATH})
|
||||
LINK_DIRECTORIES("/sw/lib")
|
||||
set(CMAKE_LIBRARY_PATH /sw/lib ${CMAKE_LIBRARY_PATH})
|
||||
link_directories("/sw/lib")
|
||||
|
||||
SET(CMAKE_PROGRAM_PATH /sw/bin ${CMAKE_PROGRAM_PATH})
|
||||
ELSE()
|
||||
set(CMAKE_PROGRAM_PATH /sw/bin ${CMAKE_PROGRAM_PATH})
|
||||
else()
|
||||
# no package manager found or active, do nothing
|
||||
RETURN()
|
||||
ENDIF()
|
||||
return()
|
||||
endif()
|
||||
|
||||
# only ignore /usr/local if brew is installed and not in the PATH
|
||||
# in other cases, it is the user's personal installations
|
||||
IF(NOT MAC_HOMEBREW AND EXISTS /usr/local/bin/brew)
|
||||
SET(CMAKE_IGNORE_PATH /usr/local /usr/local/bin /usr/local/include /usr/local/Library/Frameworks /usr/local/lib ${CMAKE_IGNORE_PATH})
|
||||
ENDIF()
|
||||
if(NOT MAC_HOMEBREW AND EXISTS /usr/local/bin/brew)
|
||||
set(CMAKE_IGNORE_PATH /usr/local /usr/local/bin /usr/local/include /usr/local/Library/Frameworks /usr/local/lib /usr/local/opt/gettext/bin /usr/local/opt/gettext/lib ${CMAKE_IGNORE_PATH})
|
||||
endif()
|
||||
|
|
|
@ -10,12 +10,6 @@ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
|||
message(FATAL_ERROR "releases can only be done from a git clone")
|
||||
endif()
|
||||
|
||||
find_package(Git)
|
||||
|
||||
if(NOT GIT_FOUND)
|
||||
message(FATAL_ERROR "git is required to make a release")
|
||||
endif()
|
||||
|
||||
find_program(GPG_EXECUTABLE gpg)
|
||||
|
||||
if(NOT GPG_EXECUTABLE)
|
||||
|
@ -37,7 +31,7 @@ function(make_release_commit_and_tag)
|
|||
# First make sure we are on master.
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --short --abbrev-ref=strict HEAD
|
||||
COMMAND git rev-parse --short --abbrev-ref=strict HEAD
|
||||
OUTPUT_VARIABLE git_branch
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
|
@ -48,7 +42,7 @@ function(make_release_commit_and_tag)
|
|||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} status --porcelain=2
|
||||
COMMAND git status --porcelain=2
|
||||
OUTPUT_VARIABLE git_status
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
|
@ -61,7 +55,7 @@ function(make_release_commit_and_tag)
|
|||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} tag --sort=-v:refname
|
||||
COMMAND git tag --sort=-v:refname
|
||||
OUTPUT_VARIABLE git_tags
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
|
@ -82,7 +76,7 @@ function(make_release_commit_and_tag)
|
|||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} log ${git_last_tag}.. "--pretty=format:* %h - %s [%aL]"
|
||||
COMMAND git log ${git_last_tag}.. "--pretty=format:* %h - %s [%aL]"
|
||||
OUTPUT_VARIABLE release_log
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
|
@ -92,17 +86,17 @@ function(make_release_commit_and_tag)
|
|||
|
||||
if(TAG_RELEASE STREQUAL UNDO)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} tag -d ${git_last_tag}
|
||||
COMMAND git tag -d ${git_last_tag}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} reset HEAD~1
|
||||
COMMAND git reset HEAD~1
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} checkout HEAD CHANGELOG.md
|
||||
COMMAND git checkout HEAD CHANGELOG.md
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
|
@ -186,10 +180,12 @@ Ignore the following cmake error.
|
|||
endwhile()
|
||||
|
||||
# Convert to UNIX line endings on Windows, just copy the file otherwise.
|
||||
|
||||
if(CMAKE_HOST_SYSTEM MATCHES Windows OR ((NOT DEFINED CMAKE_HOST_SYSTEM) AND WIN32))
|
||||
if(NOT DEFINED POWERSHELL)
|
||||
message(FATAL_ERROR "Powershell is required to convert line endings on Windows.")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[
|
||||
COMMAND ${POWERSHELL} -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[
|
||||
$text = [IO.File]::ReadAllText("CHANGELOG.md.work") -replace "`r`n", "`n"
|
||||
[IO.File]::WriteAllText("CHANGELOG.md", $text)
|
||||
]=]
|
||||
|
@ -212,45 +208,37 @@ Ignore the following cmake error.
|
|||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} add CHANGELOG.md
|
||||
COMMAND git add CHANGELOG.md
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
# Make the release commit.
|
||||
message(FATAL_ERROR "
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} commit -m "release ${new_tag}" --signoff -S
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
Release prepared.
|
||||
|
||||
# Make release tag.
|
||||
Edit CHANGELOG.md to remove any non-user-facing commits, and optionally add any
|
||||
release notes.
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} tag -s -m${new_tag} ${new_tag}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
Run the following commands to commit the change:
|
||||
|
||||
message(FATAL_ERROR [=[
|
||||
|
||||
Release commit and tag generated.
|
||||
|
||||
**** IF YOU ARE SURE YOU WANT TO RELEASE ****
|
||||
|
||||
Run the following commands to push the release commit and tag:
|
||||
|
||||
git push
|
||||
git push --tags
|
||||
|
||||
**** TO UNDO THE RELEASE ****
|
||||
git commit -m'release ${new_tag}' --signoff -S
|
||||
git tag -s -m'${new_tag}' ${new_tag}
|
||||
|
||||
To rollback these changes, run this command:
|
||||
|
||||
cmake .. -DTAG_RELEASE=UNDO
|
||||
|
||||
Ignore the "configuration incomplete" message following, this mode does not
|
||||
==== IF YOU ARE SURE YOU WANT TO RELEASE, THIS **CANNOT** BE REVERSED ====
|
||||
|
||||
Run the following to push the release commit and tag:
|
||||
|
||||
git push
|
||||
git push --tags
|
||||
|
||||
Ignore the 'configuration incomplete' message following, this mode does not
|
||||
build anything.
|
||||
|
||||
]=])
|
||||
")
|
||||
endfunction()
|
||||
|
||||
make_release_commit_and_tag()
|
||||
|
|
|
@ -0,0 +1,164 @@
|
|||
option(BUILD_TESTING "Build testing" ON)
|
||||
option(BUILD_SHARED_LIBS "Build dynamic libraries" OFF)
|
||||
|
||||
option(TRANSLATIONS_ONLY "Build only the translations.zip" OFF)
|
||||
if(TRANSLATIONS_ONLY)
|
||||
set(BUILD_DEFAULT OFF)
|
||||
else()
|
||||
set(BUILD_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
set(ENABLE_SDL_DEFAULT ${BUILD_DEFAULT})
|
||||
if(WIN32 OR APPLE)
|
||||
set(ENABLE_SDL_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
option(ENABLE_SDL "Build the SDL port" ${ENABLE_SDL_DEFAULT})
|
||||
option(ENABLE_WX "Build the wxWidgets port" ${BUILD_DEFAULT})
|
||||
option(ENABLE_DEBUGGER "Enable the debugger" ON)
|
||||
option(ENABLE_ASAN "Enable -fsanitize=address by default. Requires debug build with GCC/Clang" OFF)
|
||||
|
||||
# Static linking
|
||||
set(VBAM_STATIC_DEFAULT OFF)
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES -static OR CMAKE_TOOLCHAIN_FILE MATCHES "mxe|-static")
|
||||
set(VBAM_STATIC_DEFAULT ON)
|
||||
elseif(MINGW OR MSYS)
|
||||
# Default to static builds on MinGW and all MSYS2 envs.
|
||||
set(VBAM_STATIC_DEFAULT ON)
|
||||
endif()
|
||||
option(VBAM_STATIC "Try to link all libraries statically" ${VBAM_STATIC_DEFAULT})
|
||||
|
||||
if(VBAM_STATIC)
|
||||
set(SDL2_STATIC ON)
|
||||
set(SFML_STATIC_LIBRARIES ON)
|
||||
set(FFMPEG_STATIC ON)
|
||||
set(OPENAL_STATIC ON)
|
||||
set_property(GLOBAL PROPERTY LINK_SEARCH_START_STATIC ON)
|
||||
set_property(GLOBAL PROPERTY LINK_SEARCH_END_STATIC ON)
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib)
|
||||
else()
|
||||
list(INSERT CMAKE_FIND_LIBRARY_SUFFIXES 0 .a)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
option(ENABLE_ASM "Enable x86 ASM related options" OFF)
|
||||
|
||||
# The ARM ASM core seems to be very buggy, see #98 and #54. Default to it being
|
||||
# OFF for the time being, until it is either fixed or replaced.
|
||||
option(ENABLE_ASM_CORE "Enable x86 ASM CPU cores (EXPERIMENTAL)" OFF)
|
||||
|
||||
set(ASM_SCALERS_DEFAULT ${ENABLE_ASM})
|
||||
set(MMX_DEFAULT ${ENABLE_ASM})
|
||||
|
||||
option(ENABLE_ASM_SCALERS "Enable x86 ASM graphic filters" ${ASM_SCALERS_DEFAULT})
|
||||
|
||||
include(CMakeDependentOption)
|
||||
cmake_dependent_option(ENABLE_MMX "Enable MMX" ${MMX_DEFAULT} "ENABLE_ASM_SCALERS" OFF)
|
||||
|
||||
option(ENABLE_LIRC "Enable LIRC support" OFF)
|
||||
|
||||
# Add support for Homebrew, MacPorts and Fink on macOS
|
||||
option(DISABLE_MACOS_PACKAGE_MANAGERS "Set to TRUE to disable support for macOS Homebrew, MacPorts and Fink." FALSE)
|
||||
if(APPLE AND NOT DISABLE_MACOS_PACKAGE_MANAGERS)
|
||||
include(MacPackageManagers)
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
# Link / SFML
|
||||
if(TRANSLATIONS_ONLY)
|
||||
set(ENABLE_LINK_DEFAULT OFF)
|
||||
else()
|
||||
find_package(SFML 3.0 COMPONENTS network system)
|
||||
set(ENABLE_LINK_DEFAULT OFF)
|
||||
if(SFML_FOUND)
|
||||
set(ENABLE_LINK_DEFAULT ON)
|
||||
endif()
|
||||
endif()
|
||||
option(ENABLE_LINK "Enable GBA linking functionality" ${ENABLE_LINK_DEFAULT})
|
||||
|
||||
# FFMpeg
|
||||
set(FFMPEG_DEFAULT OFF)
|
||||
set(FFMPEG_COMPONENTS AVCODEC AVFORMAT SWSCALE AVUTIL SWRESAMPLE)
|
||||
set(FFMPEG_COMPONENT_VERSIONS AVCODEC>=58.18.100 AVFORMAT>=58.12.100 SWSCALE>=5.1.100 AVUTIL>=56.14.100 SWRESAMPLE>=3.1.100)
|
||||
|
||||
if(NOT TRANSLATIONS_ONLY AND (NOT DEFINED ENABLE_FFMPEG OR ENABLE_FFMPEG) AND (NOT (X86 AND MINGW)))
|
||||
set(FFMPEG_DEFAULT ON)
|
||||
|
||||
find_package(FFmpeg COMPONENTS ${FFMPEG_COMPONENTS})
|
||||
# check versions, but only if pkgconfig is available
|
||||
if(FFMPEG_FOUND AND PKG_CONFIG_FOUND AND NOT CMAKE_TOOLCHAIN_FILE MATCHES vcpkg)
|
||||
foreach(component ${FFMPEG_COMPONENT_VERSIONS})
|
||||
string(REPLACE ">=" ";" parts ${component})
|
||||
list(GET parts 0 name)
|
||||
list(GET parts 1 version)
|
||||
|
||||
if((NOT DEFINED ${name}_VERSION) OR ${name}_VERSION VERSION_LESS ${version})
|
||||
set(FFMPEG_FOUND OFF)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(NOT FFMPEG_FOUND)
|
||||
set(FFMPEG_DEFAULT OFF)
|
||||
endif()
|
||||
endif()
|
||||
option(ENABLE_FFMPEG "Enable ffmpeg A/V recording" ${FFMPEG_DEFAULT})
|
||||
|
||||
# Online Updates
|
||||
set(ONLINEUPDATES_DEFAULT OFF)
|
||||
if(DEFINED(UPSTREAM_RELEASE) AND UPSTREAM_RELEASE)
|
||||
set(ONLINEUPDATES_DEFAULT ON)
|
||||
endif()
|
||||
option(ENABLE_ONLINEUPDATES "Enable online update checks" ${ONLINEUPDATES_DEFAULT})
|
||||
option(HTTPS "Use https URL for winsparkle" ON)
|
||||
|
||||
# We generally don't want LTO when debugging because it makes linking slow
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(LTO_DEFAULT OFF)
|
||||
else()
|
||||
set(LTO_DEFAULT ON)
|
||||
endif()
|
||||
option(ENABLE_LTO "Compile with Link Time Optimization" ${LTO_DEFAULT})
|
||||
|
||||
option(ENABLE_GBA_LOGGING "Enable extended GBA logging" ON)
|
||||
|
||||
option(UPSTREAM_RELEASE "do some optimizations and release automation tasks" OFF)
|
||||
|
||||
if(WIN32)
|
||||
# not yet implemented
|
||||
option(ENABLE_DIRECT3D "Enable Direct3D rendering for the wxWidgets port" OFF)
|
||||
|
||||
set(XAUDIO2_DEFAULT ON)
|
||||
if (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
# TODO: We should update the XAudio headers to build with clang-cl. See
|
||||
# https://github.com/visualboyadvance-m/visualboyadvance-m/issues/1021
|
||||
set(XAUDIO2_DEFAULT OFF)
|
||||
endif()
|
||||
option(ENABLE_XAUDIO2 "Enable xaudio2 sound output for the wxWidgets port" ${XAUDIO2_DEFAULT})
|
||||
endif()
|
||||
|
||||
set(ENABLE_FAUDIO_DEFAULT OFF)
|
||||
|
||||
find_package(FAudio QUIET)
|
||||
|
||||
if(FAudio_FOUND AND NOT (MINGW AND X86))
|
||||
set(ENABLE_FAUDIO_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
option(ENABLE_FAUDIO "Enable FAudio sound output for the wxWidgets port" ${ENABLE_FAUDIO_DEFAULT})
|
||||
|
||||
option(ZIP_SUFFIX [=[suffix for release zip files, e.g. "-somebranch".zip]=] OFF)
|
||||
|
||||
# The SDL port can't be built without debugging support
|
||||
if(NOT ENABLE_DEBUGGER AND ENABLE_SDL)
|
||||
message(FATAL_ERROR "The SDL port can't be built without debugging support")
|
||||
endif()
|
||||
|
||||
if(TRANSLATIONS_ONLY AND (ENABLE_SDL OR ENABLE_WX))
|
||||
message(FATAL_ERROR "The SDL and wxWidgets ports can't be built when TRANSLATIONS_ONLY is enabled")
|
||||
endif()
|
||||
|
||||
option(GPG_SIGNATURES "Create GPG signatures for release files" OFF)
|
|
@ -1,16 +0,0 @@
|
|||
function(make_path_run_wrapper cmd target)
|
||||
get_filename_component(name "${target}" NAME)
|
||||
get_filename_component(cmd_resolved "${cmd}" REALPATH)
|
||||
get_filename_component(base_name "${cmd_resolved}" NAME)
|
||||
get_filename_component(dir_name "${cmd_resolved}" DIRECTORY)
|
||||
|
||||
set(source "${target}.c")
|
||||
|
||||
configure_file(src/gcc-wrap.c.in "${source}")
|
||||
|
||||
include(HostCompile)
|
||||
host_compile("${source}" "${target}")
|
||||
|
||||
add_custom_target(generate_${name} DEPENDS "${CMAKE_BINARY_DIR}/${name}")
|
||||
add_dependencies(generate generate_${name})
|
||||
endfunction()
|
|
@ -1,38 +1,54 @@
|
|||
if(POLICY CMP0012)
|
||||
cmake_policy(SET CMP0012 NEW) # Saner if() behavior.
|
||||
if(TRANSLATIONS_ONLY)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_TARGET_TRIPLET)
|
||||
if(NOT WIN32)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Check if we are in an MSVC environment.
|
||||
if($ENV{CXX} MATCHES "cl.exe$")
|
||||
find_program(cl_exe_path NAME cl.exe HINTS ENV PATH)
|
||||
|
||||
if(ENV{CXX} MATCHES "cl.exe$" OR cl_exe_path)
|
||||
# Infer the architecture from the LIB folders.
|
||||
foreach(LIB $ENV{LIB})
|
||||
if(${LIB} MATCHES "x64$")
|
||||
set(VBAM_VCPKG_PLATFORM "x64-windows")
|
||||
foreach(lib $ENV{LIB})
|
||||
if(lib MATCHES "x64$")
|
||||
set(VBAM_VCPKG_PLATFORM "x64-windows-static")
|
||||
break()
|
||||
endif()
|
||||
if(${LIB} MATCHES "x86$")
|
||||
set(VBAM_VCPKG_PLATFORM "x86-windows")
|
||||
if(lib MATCHES "x86$")
|
||||
set(VBAM_VCPKG_PLATFORM "x86-windows-static")
|
||||
break()
|
||||
endif()
|
||||
if(${LIB} MATCHES "ARM64$")
|
||||
set(VBAM_VCPKG_PLATFORM "arm64-windows")
|
||||
if(lib MATCHES "ARM64$")
|
||||
set(VBAM_VCPKG_PLATFORM "arm64-windows-static")
|
||||
|
||||
foreach(path $ENV{PATH})
|
||||
if(path MATCHES "[Hh]ost[Xx]64")
|
||||
set(VCPKG_HOST_TRIPLET "x64-windows-static" CACHE STRING "Vcpkg host triplet" FORCE)
|
||||
set(VCPKG_USE_HOST_TOOLS ON CACHE BOOL "Use vcpkg host tools" FORCE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# If all else fails, try to use a sensible default.
|
||||
if(NOT DEFINED VBAM_VCPKG_PLATFORM)
|
||||
set(VBAM_VCPKG_PLATFORM "x64-windows")
|
||||
set(VBAM_VCPKG_PLATFORM "x64-windows-static")
|
||||
endif()
|
||||
|
||||
unset(cl_exe_path)
|
||||
elseif (NOT DEFINED CMAKE_CXX_COMPILER)
|
||||
# No way to infer the compiler.
|
||||
return()
|
||||
|
||||
elseif(${CMAKE_CXX_COMPILER} MATCHES "clang-cl.exe$" OR ${CMAKE_CXX_COMPILER} MATCHES "clang-cl$")
|
||||
# For stand-alone clang-cl, assume x64.
|
||||
set(VBAM_VCPKG_PLATFORM "x64-windows")
|
||||
set(VBAM_VCPKG_PLATFORM "x64-windows-static")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED VBAM_VCPKG_PLATFORM)
|
||||
|
@ -40,11 +56,7 @@ if(NOT DEFINED VCPKG_TARGET_TRIPLET)
|
|||
return()
|
||||
endif()
|
||||
|
||||
if(DEFINED BUILD_SHARED_LIBS AND NOT ${BUILD_SHARED_LIBS})
|
||||
set(VBAM_VCPKG_PLATFORM ${VBAM_VCPKG_PLATFORM}-static)
|
||||
endif()
|
||||
|
||||
set(VCPKG_TARGET_TRIPLET ${VBAM_VCPKG_PLATFORM} CACHE STRING "Vcpkg target triplet (ex. x86-windows)" FORCE)
|
||||
set(VCPKG_TARGET_TRIPLET ${VBAM_VCPKG_PLATFORM} CACHE STRING "Vcpkg target triplet (ex. x64-windows-static)" FORCE)
|
||||
message(STATUS "Inferred VCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}")
|
||||
endif()
|
||||
|
||||
|
@ -56,7 +68,7 @@ function(vcpkg_seconds)
|
|||
)
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND date +'%H:%M:%S'
|
||||
COMMAND date +%H:%M:%S
|
||||
OUTPUT_VARIABLE time
|
||||
)
|
||||
endif()
|
||||
|
@ -71,7 +83,8 @@ function(vcpkg_seconds)
|
|||
endfunction()
|
||||
|
||||
function(vcpkg_check_git_status git_status)
|
||||
if(NOT git_status EQUAL 0)
|
||||
# The VS vcpkg component cannot be written to without elevation.
|
||||
if(NOT git_status EQUAL 0 AND NOT VCPKG_ROOT MATCHES "Visual Studio")
|
||||
message(FATAL_ERROR "Error updating vcpkg from git, please make sure git for windows is installed correctly, it can be installed from Visual Studio components")
|
||||
endif()
|
||||
endfunction()
|
||||
|
@ -128,6 +141,201 @@ function(vcpkg_deps_fixup vcpkg_exe)
|
|||
endif()
|
||||
endfunction()
|
||||
|
||||
function(vcpkg_is_installed vcpkg_exe pkg_name pkg_ver pkg_triplet powershell outvar)
|
||||
set(${outvar} FALSE PARENT_SCOPE)
|
||||
|
||||
unset(CMAKE_MATCH_1)
|
||||
string(REGEX REPLACE "-r([0-9]+)\$" "" pkg_ver ${pkg_ver})
|
||||
set(pkg_rev ${CMAKE_MATCH_1})
|
||||
|
||||
string(REPLACE "-" "." pkg_ver ${pkg_ver})
|
||||
|
||||
if(NOT DEFINED VCPKG_INSTALLED_COUNT)
|
||||
if(VCPKG_ROOT MATCHES "Visual Studio")
|
||||
execute_process(
|
||||
COMMAND ${powershell}
|
||||
-executionpolicy bypass -noprofile
|
||||
-command "import-module '${CMAKE_BINARY_DIR}/vcpkg-binpkg/vcpkg-binpkg.psm1'; vcpkg-list"
|
||||
OUTPUT_VARIABLE vcpkg_list_text
|
||||
)
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} list
|
||||
OUTPUT_VARIABLE vcpkg_list_text
|
||||
ERROR_QUIET
|
||||
)
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "\r?\n" ";" vcpkg_list_raw "${vcpkg_list_text}")
|
||||
|
||||
set(VCPKG_INSTALLED_COUNT 0 PARENT_SCOPE)
|
||||
foreach(pkg ${vcpkg_list_raw})
|
||||
if(NOT pkg MATCHES "^([^:[]+)[^:]*:([^ ]+) +([0-9][^ ]*) +.*\$")
|
||||
continue()
|
||||
endif()
|
||||
set(inst_pkg_name ${CMAKE_MATCH_1})
|
||||
set(inst_pkg_ver ${CMAKE_MATCH_3})
|
||||
set(inst_pkg_triplet ${CMAKE_MATCH_2})
|
||||
|
||||
unset(CMAKE_MATCH_1)
|
||||
string(REGEX REPLACE "#([0-9]+)\$" "" inst_pkg_ver ${inst_pkg_ver})
|
||||
if(CMAKE_MATCH_1)
|
||||
set(inst_pkg_rev ${CMAKE_MATCH_1})
|
||||
else()
|
||||
set(inst_pkg_rev FALSE)
|
||||
endif()
|
||||
|
||||
string(REPLACE "-" "." inst_pkg_ver ${inst_pkg_ver})
|
||||
|
||||
list(APPEND VCPKG_INSTALLED ${inst_pkg_name} ${inst_pkg_ver} ${inst_pkg_rev} ${inst_pkg_triplet})
|
||||
math(EXPR VCPKG_INSTALLED_COUNT "${VCPKG_INSTALLED_COUNT} + 1")
|
||||
endforeach()
|
||||
set(VCPKG_INSTALLED ${VCPKG_INSTALLED} PARENT_SCOPE)
|
||||
set(VCPKG_INSTALLED_COUNT ${VCPKG_INSTALLED_COUNT} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(NOT VCPKG_INSTALLED_COUNT GREATER 0)
|
||||
return()
|
||||
endif()
|
||||
|
||||
math(EXPR idx_max "(${VCPKG_INSTALLED_COUNT} - 1) * 4")
|
||||
|
||||
foreach(idx RANGE 0 ${idx_max} 4)
|
||||
math(EXPR idx_ver "${idx} + 1")
|
||||
math(EXPR idx_rev "${idx} + 2")
|
||||
math(EXPR idx_triplet "${idx} + 3")
|
||||
list(GET VCPKG_INSTALLED ${idx} inst_pkg_name)
|
||||
list(GET VCPKG_INSTALLED ${idx_ver} inst_pkg_ver)
|
||||
list(GET VCPKG_INSTALLED ${idx_rev} inst_pkg_rev)
|
||||
list(GET VCPKG_INSTALLED ${idx_triplet} inst_pkg_triplet)
|
||||
|
||||
if(NOT inst_pkg_triplet STREQUAL pkg_triplet)
|
||||
continue()
|
||||
endif()
|
||||
|
||||
if(inst_pkg_name STREQUAL pkg_name
|
||||
AND pkg_ver VERSION_LESS inst_pkg_ver
|
||||
OR (pkg_ver VERSION_EQUAL inst_pkg_ver
|
||||
AND ((NOT pkg_rev AND NOT inst_pkg_rev)
|
||||
OR (pkg_rev AND inst_pkg_rev AND (NOT pkg_rev GREATER inst_pkg_rev)))))
|
||||
|
||||
set(${outvar} TRUE PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(get_binary_packages vcpkg_exe)
|
||||
set(binary_packages_installed FALSE PARENT_SCOPE)
|
||||
|
||||
unset(triplets)
|
||||
unset(host_triplet)
|
||||
# Determine host triplet for vcpkg build dependencies
|
||||
if(WIN32)
|
||||
if($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[Aa][Rr][Mm]64")
|
||||
set(host_triplet "arm64-windows")
|
||||
elseif($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[Aa][Mm][Dd]64|[Xx]64")
|
||||
set(host_triplet "x64-windows")
|
||||
else()
|
||||
set(host_triplet "x86-windows")
|
||||
endif()
|
||||
endif()
|
||||
if(DEFINED host_triplet)
|
||||
list(APPEND triplets ${host_triplet})
|
||||
endif()
|
||||
list(APPEND triplets ${VCPKG_TARGET_TRIPLET})
|
||||
|
||||
foreach(triplet ${triplets})
|
||||
file(
|
||||
DOWNLOAD "https://nightly.visualboyadvance-m.org/vcpkg/${triplet}/" "${CMAKE_BINARY_DIR}/binary_package_list_${triplet}.html"
|
||||
STATUS pkg_list_status
|
||||
)
|
||||
list(GET pkg_list_status 1 pkg_list_error)
|
||||
list(GET pkg_list_status 0 pkg_list_status)
|
||||
|
||||
if(NOT pkg_list_status EQUAL 0)
|
||||
message(STATUS "Failed to download vcpkg binary package list: ${pkg_list_status} - ${pkg_list_error}")
|
||||
return()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset(binary_packages)
|
||||
foreach(triplet ${triplets})
|
||||
file(READ "${CMAKE_BINARY_DIR}/binary_package_list_${triplet}.html" raw_html)
|
||||
string(REGEX MATCHALL "<a href=\"[^\"]+[.]zip\"" links ${raw_html})
|
||||
foreach(link ${links})
|
||||
string(REGEX REPLACE "<a href=\"([^\"]+[.]zip)\"" "\\1" pkg ${link})
|
||||
list(APPEND binary_packages ${pkg})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
set(vcpkg_binpkg_dir ${CMAKE_BINARY_DIR}/vcpkg-binpkg)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
vcpkg_binpkg
|
||||
URL "https://github.com/rkitover/vcpkg-binpkg-prototype/archive/refs/heads/master.zip"
|
||||
SOURCE_DIR ${vcpkg_binpkg_dir}
|
||||
)
|
||||
|
||||
FetchContent_GetProperties(vcpkg_binpkg)
|
||||
if(NOT vcpkg_binpkg_POPULATED)
|
||||
FetchContent_Populate(vcpkg_binpkg)
|
||||
endif()
|
||||
|
||||
unset(to_install)
|
||||
foreach(pkg ${binary_packages})
|
||||
if(NOT pkg MATCHES "([^_]+)_([^_]+)_([^.]+)[.]zip")
|
||||
continue()
|
||||
endif()
|
||||
set(pkg_name ${CMAKE_MATCH_1})
|
||||
set(pkg_version ${CMAKE_MATCH_2})
|
||||
set(pkg_triplet ${CMAKE_MATCH_3})
|
||||
|
||||
vcpkg_is_installed(${vcpkg_exe} ${pkg_name} ${pkg_version} ${pkg_triplet} ${POWERSHELL} pkg_installed)
|
||||
|
||||
if(NOT pkg_installed)
|
||||
list(APPEND to_install ${pkg})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(to_install)
|
||||
set(bin_pkgs_dir ${CMAKE_BINARY_DIR}/vcpkg-binary-packages)
|
||||
file(MAKE_DIRECTORY ${bin_pkgs_dir})
|
||||
|
||||
foreach(pkg ${to_install})
|
||||
string(REGEX REPLACE "^[^_]+_[^_]+_([^.]+)[.]zip\$" "\\1" pkg_triplet ${pkg})
|
||||
|
||||
message(STATUS "Downloading https://nightly.visualboyadvance-m.org/vcpkg/${pkg_triplet}/${pkg} ...")
|
||||
|
||||
file(
|
||||
DOWNLOAD "https://nightly.visualboyadvance-m.org/vcpkg/${pkg_triplet}/${pkg}" "${bin_pkgs_dir}/${pkg}"
|
||||
STATUS pkg_download_status
|
||||
)
|
||||
list(GET pkg_download_status 1 pkg_download_error)
|
||||
list(GET pkg_download_status 0 pkg_download_status)
|
||||
|
||||
if(NOT pkg_download_status EQUAL 0)
|
||||
message(STATUS "Failed to download vcpkg binary package '${pkg}': ${pkg_download_status} - ${pkg_download_error}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
message(STATUS "done.")
|
||||
endforeach()
|
||||
|
||||
# -command "import-module ($env:USERPROFILE + '/source/repos/vcpkg-binpkg-prototype/vcpkg-binpkg.psm1'); vcpkg-instpkg ."
|
||||
execute_process(
|
||||
COMMAND ${POWERSHELL}
|
||||
-executionpolicy bypass -noprofile
|
||||
-command "import-module '${CMAKE_BINARY_DIR}/vcpkg-binpkg/vcpkg-binpkg.psm1'; vcpkg-instpkg ."
|
||||
WORKING_DIRECTORY ${bin_pkgs_dir}
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${bin_pkgs_dir})
|
||||
endif()
|
||||
|
||||
set(binary_packages_installed TRUE PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(vcpkg_remove_optional_deps vcpkg_exe)
|
||||
list(LENGTH VCPKG_DEPS_OPTIONAL optionals_list_len)
|
||||
math(EXPR optionals_list_last "${optionals_list_len} - 1")
|
||||
|
@ -147,17 +355,34 @@ function(vcpkg_remove_optional_deps vcpkg_exe)
|
|||
endfunction()
|
||||
|
||||
function(vcpkg_set_toolchain)
|
||||
if(NOT DEFINED POWERSHELL)
|
||||
message(FATAL_ERROR "Powershell is required to use vcpkg binaries.")
|
||||
endif()
|
||||
if(NOT DEFINED ENV{VCPKG_ROOT})
|
||||
get_filename_component(preferred_root ${CMAKE_SOURCE_DIR}/../vcpkg ABSOLUTE)
|
||||
|
||||
if(WIN32)
|
||||
if(DEFINED ENV{CI} OR EXISTS /vcpkg)
|
||||
set(VCPKG_ROOT /vcpkg)
|
||||
elseif(EXISTS c:/vcpkg)
|
||||
set(VCPKG_ROOT c:/vcpkg)
|
||||
# Prefer the preferred root to the VS default which is more difficult to deal with, if it exists.
|
||||
elseif(EXISTS ${preferred_root})
|
||||
set(VCPKG_ROOT ${preferred_root})
|
||||
else()
|
||||
find_program(vcpkg_exe_path NAME vcpkg.exe HINTS ENV PATH)
|
||||
|
||||
if(vcpkg_exe_path)
|
||||
get_filename_component(VCPKG_ROOT ${vcpkg_exe_path} DIRECTORY)
|
||||
get_filename_component(VCPKG_ROOT ${VCPKG_ROOT} ABSOLUTE)
|
||||
endif()
|
||||
|
||||
unset(vcpkg_exe_path)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_ROOT)
|
||||
get_filename_component(VCPKG_ROOT ${CMAKE_SOURCE_DIR}/../vcpkg ABSOLUTE)
|
||||
set(VCPKG_ROOT ${preferred_root})
|
||||
endif()
|
||||
|
||||
set(ENV{VCPKG_ROOT} ${VCPKG_ROOT})
|
||||
|
@ -230,8 +455,6 @@ function(vcpkg_set_toolchain)
|
|||
vcpkg_check_git_status(${git_status})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_check_git_status(${git_status})
|
||||
endif()
|
||||
|
||||
# build latest vcpkg, if needed
|
||||
|
@ -254,9 +477,9 @@ function(vcpkg_set_toolchain)
|
|||
endforeach()
|
||||
|
||||
if(WIN32)
|
||||
set(vcpkg_exe vcpkg)
|
||||
set(vcpkg_exe "${VCPKG_ROOT}/vcpkg.exe")
|
||||
else()
|
||||
set(vcpkg_exe ./vcpkg)
|
||||
set(vcpkg_exe "${VCPKG_ROOT}/vcpkg")
|
||||
endif()
|
||||
|
||||
# update portfiles
|
||||
|
@ -265,68 +488,72 @@ function(vcpkg_set_toolchain)
|
|||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
|
||||
# Get number of seconds since midnight (might be wrong if am/pm is in effect on Windows.)
|
||||
vcpkg_seconds()
|
||||
set(began ${seconds})
|
||||
get_binary_packages(${vcpkg_exe})
|
||||
|
||||
# Limit total installation time to 20 minutes to not overrun CI time limit.
|
||||
math(EXPR time_limit "${began} + (20 * 60)")
|
||||
if(NOT binary_packages_installed)
|
||||
# Get number of seconds since midnight (might be wrong if am/pm is in effect on Windows.)
|
||||
vcpkg_seconds()
|
||||
set(began ${seconds})
|
||||
|
||||
vcpkg_deps_fixup("${vcpkg_exe}")
|
||||
# Limit total installation time to 20 minutes to not overrun CI time limit.
|
||||
math(EXPR time_limit "${began} + (20 * 60)")
|
||||
|
||||
# Install core deps.
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} install ${VCPKG_DEPS_QUALIFIED}
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
vcpkg_deps_fixup("${vcpkg_exe}")
|
||||
|
||||
# If ports have been updated, and there is time, rebuild cache one at a time to not overrun the CI time limit.
|
||||
vcpkg_seconds()
|
||||
|
||||
if(seconds LESS time_limit)
|
||||
vcpkg_get_first_upgrade(${vcpkg_exe})
|
||||
|
||||
if(DEFINED first_upgrade)
|
||||
# If we have to upgrade zlib, remove optional deps first so that
|
||||
# the build doesn't overrun the CI time limit.
|
||||
if(first_upgrade STREQUAL "zlib")
|
||||
vcpkg_remove_optional_deps(${vcpkg_exe})
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} upgrade --no-dry-run "${first_upgrade}:${VCPKG_TARGET_TRIPLET}"
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install optional deps, within time limit.
|
||||
list(LENGTH VCPKG_DEPS_OPTIONAL optionals_list_len)
|
||||
math(EXPR optionals_list_last "${optionals_list_len} - 1")
|
||||
|
||||
foreach(i RANGE 0 ${optionals_list_last} 2)
|
||||
list(GET VCPKG_DEPS_OPTIONAL ${i} dep)
|
||||
|
||||
math(EXPR var_idx "${i} + 1")
|
||||
|
||||
list(GET VCPKG_DEPS_OPTIONAL ${var_idx} var)
|
||||
set(val "${${var}}")
|
||||
# Install core deps.
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} install ${VCPKG_DEPS_QUALIFIED}
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
|
||||
# If ports have been updated, and there is time, rebuild cache one at a time to not overrun the CI time limit.
|
||||
vcpkg_seconds()
|
||||
|
||||
if("${val}" OR (seconds LESS time_limit AND ("${val}" OR "${val}" STREQUAL "")))
|
||||
set(dep_qualified "${dep}:${VCPKG_TARGET_TRIPLET}")
|
||||
if(seconds LESS time_limit)
|
||||
vcpkg_get_first_upgrade(${vcpkg_exe})
|
||||
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} install ${dep_qualified}
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
if(DEFINED first_upgrade)
|
||||
# If we have to upgrade zlib, remove optional deps first so that
|
||||
# the build doesn't overrun the CI time limit.
|
||||
if(first_upgrade STREQUAL "zlib")
|
||||
vcpkg_remove_optional_deps(${vcpkg_exe})
|
||||
endif()
|
||||
|
||||
set(${var} ON)
|
||||
else()
|
||||
set(${var} OFF)
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} upgrade --no-dry-run "${first_upgrade}:${VCPKG_TARGET_TRIPLET}"
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Install optional deps, within time limit.
|
||||
list(LENGTH VCPKG_DEPS_OPTIONAL optionals_list_len)
|
||||
math(EXPR optionals_list_last "${optionals_list_len} - 1")
|
||||
|
||||
foreach(i RANGE 0 ${optionals_list_last} 2)
|
||||
list(GET VCPKG_DEPS_OPTIONAL ${i} dep)
|
||||
|
||||
math(EXPR var_idx "${i} + 1")
|
||||
|
||||
list(GET VCPKG_DEPS_OPTIONAL ${var_idx} var)
|
||||
set(val "${${var}}")
|
||||
|
||||
vcpkg_seconds()
|
||||
|
||||
if("${val}" OR (seconds LESS time_limit AND ("${val}" OR "${val}" STREQUAL "")))
|
||||
set(dep_qualified "${dep}:${VCPKG_TARGET_TRIPLET}")
|
||||
|
||||
execute_process(
|
||||
COMMAND ${vcpkg_exe} install ${dep_qualified}
|
||||
WORKING_DIRECTORY ${VCPKG_ROOT}
|
||||
)
|
||||
|
||||
set(${var} ON)
|
||||
else()
|
||||
set(${var} OFF)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(WIN32 AND VCPKG_TARGET_TRIPLET MATCHES x64 AND CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
set(CMAKE_GENERATOR_PLATFORM x64 CACHE STRING "visual studio build architecture" FORCE)
|
||||
|
@ -349,14 +576,4 @@ endfunction()
|
|||
|
||||
vcpkg_set_toolchain()
|
||||
|
||||
# Make vcpkg use debug libs for RelWithDebInfo
|
||||
set(orig_build_type ${CMAKE_BUILD_TYPE})
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif()
|
||||
|
||||
include(${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake)
|
||||
|
||||
set(CMAKE_BUILD_TYPE ${orig_build_type})
|
||||
unset(orig_build_type)
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
include(VbamFunctions)
|
||||
|
||||
function(add_compiler_flags)
|
||||
foreach(var RELEASE DEBUG RELWITHDEBINFO MINSIZEREL)
|
||||
set("CMAKE_CXX_FLAGS_${var}" "" CACHE STRING "MUST BE UNSET" FORCE)
|
||||
set("CMAKE_CXX_FLAGS_${var}" "" PARENT_SCOPE)
|
||||
set("CMAKE_C_FLAGS_${var}" "" CACHE STRING "MUST BE UNSET" FORCE)
|
||||
set("CMAKE_C_FLAGS_${var}" "" PARENT_SCOPE)
|
||||
endforeach()
|
||||
|
||||
# Set C and CXX flags if not already set.
|
||||
foreach(flag ${ARGV})
|
||||
foreach(var CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
|
||||
# Remove any duplicates first.
|
||||
remove_dupes("${${var}}" "${var}")
|
||||
|
||||
string(FIND "${${var}}" "${flag}" found)
|
||||
|
||||
if(found EQUAL -1)
|
||||
set("${var}" "${${var}} ${flag}" CACHE STRING "Compiler Flags" FORCE)
|
||||
set("${var}" "${${var}} ${flag}" PARENT_SCOPE)
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(add_linker_flags)
|
||||
# Set linker flags if not already set.
|
||||
foreach(flag ${ARGV})
|
||||
foreach(var EXE SHARED)
|
||||
set(var "CMAKE_${var}_LINKER_FLAGS")
|
||||
|
||||
# Remove any duplicates first.
|
||||
remove_dupes("${${var}}" "${var}")
|
||||
|
||||
string(FIND "${${var}}" "${flag}" found)
|
||||
|
||||
if(found EQUAL -1)
|
||||
set("${var}" "${${var}} ${flag}" CACHE STRING "Linker Flags" FORCE)
|
||||
set("${var}" "${${var}} ${flag}" PARENT_SCOPE)
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
endfunction()
|
|
@ -0,0 +1,37 @@
|
|||
if(NOT ENABLE_ASAN)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
check_cxx_compiler_flag(/fsanitize=address MSVC_ASAN_SUPPORTED)
|
||||
if(MSVC_ASAN_SUPPORTED)
|
||||
add_compile_options(/fsanitize=address)
|
||||
add_compile_definitions(_DISABLE_VECTOR_ANNOTATION _DISABLE_STRING_ANNOTATION)
|
||||
else()
|
||||
message(WARNING "ASAN not available for the compiler, disabling.")
|
||||
set(ENABLE_ASAN OFF)
|
||||
return()
|
||||
endif()
|
||||
else()
|
||||
# ASAN does not work on non-debug builds for GCC and Clang.
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
message(WARNING "ASAN requires debug build, set -DCMAKE_BUILD_TYPE=Debug, disabling.")
|
||||
set(ENABLE_ASAN OFF)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# It is necessary to modify the linker flagas for the compiler check to work.
|
||||
set(BACKUP_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-fsanitize=address")
|
||||
check_cxx_compiler_flag(-fsanitize=address ASAN_SUPPORTED)
|
||||
set(CMAKE_EXE_LINKER_FLAGS ${BACKUP_LINKER_FLAGS})
|
||||
|
||||
if(ASAN_SUPPORTED)
|
||||
add_compile_options(-fsanitize=address)
|
||||
add_link_options(-fsanitize=address)
|
||||
else()
|
||||
message(WARNING "ASAN not available for the compiler, disabling.")
|
||||
set(ENABLE_ASAN OFF)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
|
@ -0,0 +1,76 @@
|
|||
if(X86_32 OR X86_64)
|
||||
add_compile_options(-mfpmath=sse -msse2)
|
||||
endif()
|
||||
|
||||
if(UPSTREAM_RELEASE)
|
||||
if(X86_64)
|
||||
# Require and optimize for Core2 level support, tune for generic.
|
||||
add_compile_options(-march=core2 -mtune=generic)
|
||||
elseif(X86_32)
|
||||
# Optimize for pentiumi3 and tune for generic for Windows XP builds.
|
||||
set(WINXP TRUE)
|
||||
add_compile_options(-march=pentium3 -mtune=generic)
|
||||
add_compile_definitions(-DWINXP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Common flags.
|
||||
add_compile_options(
|
||||
-pipe
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-Wno-deprecated-copy>
|
||||
-Wformat
|
||||
-Wformat-security
|
||||
-fdiagnostics-color=always
|
||||
)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
add_compile_options(-Wno-unused-command-line-argument)
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options(-feliminate-unused-debug-types)
|
||||
endif()
|
||||
|
||||
# check if ssp flags are supported.
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
check_cxx_compiler_flag(-fstack-protector-strong STACK_PROTECTOR_SUPPORTED)
|
||||
|
||||
if(STACK_PROTECTOR_SUPPORTED)
|
||||
add_compile_options(-fstack-protector-strong)
|
||||
|
||||
check_cxx_compiler_flag("--param ssp-buffer-size=4" SSP_BUFFER_SIZE_SUPPORTED)
|
||||
if(SSP_BUFFER_SIZE_SUPPORTED)
|
||||
add_compile_options(--param ssp-buffer-size=4)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ENABLE_ASM) # inline asm is not allowed with -fPIC
|
||||
add_compile_options(-fPIC)
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_compile_options(-ggdb3 -fno-omit-frame-pointer -Wall -Wextra)
|
||||
else()
|
||||
add_compile_options(-Ofast -fomit-frame-pointer)
|
||||
endif()
|
||||
|
||||
# for some reason this is necessary
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
include_directories(/usr/local/include)
|
||||
endif()
|
||||
|
||||
if(VBAM_STATIC)
|
||||
if(APPLE)
|
||||
add_link_options(-static-libstdc++)
|
||||
else()
|
||||
add_link_options(-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# To support LTO, this must always fail.
|
||||
add_compile_options(-Werror=odr -Werror=strict-aliasing)
|
||||
add_link_options( -Werror=odr -Werror=strict-aliasing)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options(-Werror=lto-type-mismatch)
|
||||
add_link_options( -Werror=lto-type-mismatch)
|
||||
endif()
|
|
@ -0,0 +1,10 @@
|
|||
if (NOT MINGW)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# this has to run after the toolchain is initialized.
|
||||
include_directories("${CMAKE_SOURCE_DIR}/win32-deps/mingw-include")
|
||||
include_directories("${CMAKE_SOURCE_DIR}/win32-deps/mingw-xaudio/include")
|
||||
|
||||
# Add Winsock as the last library linked because of broken link precedence.
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lws2_32")
|
|
@ -0,0 +1,83 @@
|
|||
# Set the runtime library properly.
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:DEBUG>:Debug>" CACHE INTERNAL "")
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# MSVC-specific flags (not supported by clang-cl).
|
||||
add_compile_options(/nologo)
|
||||
if (NOT CMAKE_GENERATOR MATCHES "Ninja")
|
||||
# Multi-processor compilation does not work well with Ninja.
|
||||
add_compile_options(/MP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories("${CMAKE_SOURCE_DIR}/win32-deps/msvc")
|
||||
|
||||
add_compile_definitions(
|
||||
_FORCENAMELESSUNION
|
||||
WIN32_LEAN_AND_MEAN
|
||||
WIN32
|
||||
_WINDOWS
|
||||
__STDC_LIMIT_MACROS
|
||||
__STDC_CONSTANT_MACROS
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
_UNICODE
|
||||
UNICODE
|
||||
WINVER=0x0A00
|
||||
NTDDI_VERSION=0x0A000007
|
||||
NOMINMAX
|
||||
)
|
||||
add_compile_options(
|
||||
/W4
|
||||
/GR
|
||||
/EHsc
|
||||
)
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_compile_definitions(_DEBUG)
|
||||
add_compile_options(/Ob0 /Od /RTC1)
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND NOT ENABLE_ASAN)
|
||||
# Use Edit and Continue with MSVC.
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "EditAndContinue" CACHE STRING "" FORCE)
|
||||
else()
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
else()
|
||||
add_compile_options(/MT /Oi /Gy)
|
||||
add_link_options(/OPT:REF /OPT:ICF)
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "" FORCE)
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
|
||||
add_compile_options(/O1 /Ob1)
|
||||
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
add_compile_options(/O2 /Ob1)
|
||||
else()
|
||||
add_compile_options(/O2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS "3.25")
|
||||
# Backwards-compatible way of setting the /Z option.
|
||||
if(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT STREQUAL "EditAndContinue")
|
||||
add_compile_options(/ZI)
|
||||
elseif(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT STREQUAL "ProgramDatabase")
|
||||
add_compile_options(/Zi)
|
||||
elseif(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT STREQUAL "Embedded")
|
||||
add_compile_options(/Z7)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown value for CMAKE_MSVC_DEBUG_INFORMATION_FORMAT: ${CMAKE_MSVC_DEBUG_INFORMATION_FORMAT}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_RC_FLAGS "-c65001 /DWIN32" CACHE STRING "" FORCE)
|
||||
|
||||
# We need to explicitly set all of these to override the CMake defaults.
|
||||
set(CMAKE_CXX_FLAGS "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_DEBUG "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELEASE "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "" CACHE STRING "" FORCE)
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "" CACHE STRING "" FORCE)
|
|
@ -0,0 +1,126 @@
|
|||
if(TRANSLATIONS_ONLY)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Compiler stuff
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
include(ProcessorCount)
|
||||
ProcessorCount(num_cpus)
|
||||
|
||||
if(ENABLE_LTO)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT LTO_SUPPORTED)
|
||||
|
||||
# MINGW64 does not support LTO
|
||||
if(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(LTO_SUPPORTED FALSE)
|
||||
endif()
|
||||
|
||||
if(LTO_SUPPORTED)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(WARNING "LTO is not supported by the compiler, diasabling LTO")
|
||||
set(ENABLE_LTO OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Output all binaries at top level
|
||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
|
||||
|
||||
if(NOT HTTPS)
|
||||
add_compile_definitions(NO_HTTPS)
|
||||
endif()
|
||||
|
||||
if(ENABLE_GBA_LOGGING)
|
||||
add_compile_definitions(GBA_LOGGING )
|
||||
endif()
|
||||
|
||||
if(ENABLE_MMX)
|
||||
add_compile_definitions(MMX)
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT ENABLE_ONLINEUPDATES)
|
||||
add_compile_definitions(NO_ONLINEUPDATES)
|
||||
endif()
|
||||
|
||||
# The debugger is enabled by default
|
||||
if(ENABLE_DEBUGGER)
|
||||
add_compile_definitions(VBAM_ENABLE_DEBUGGER)
|
||||
endif()
|
||||
|
||||
# The ASM core is disabled by default because we don't know on which platform we are
|
||||
if(NOT ENABLE_ASM_CORE)
|
||||
add_compile_definitions(C_CORE)
|
||||
endif()
|
||||
|
||||
# Set up "src" and generated directory as a global include directory.
|
||||
set(VBAM_GENERATED_DIR ${CMAKE_BINARY_DIR}/generated)
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${VBAM_GENERATED_DIR}
|
||||
)
|
||||
|
||||
# C defines
|
||||
add_compile_definitions(HAVE_NETINET_IN_H HAVE_ARPA_INET_H HAVE_ZLIB_H FINAL_VERSION SDL USE_OPENGL SYSCONF_INSTALL_DIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
|
||||
add_compile_definitions(PKGDATADIR="${CMAKE_INSTALL_FULL_DATADIR}/vbam")
|
||||
add_compile_definitions(__STDC_FORMAT_MACROS)
|
||||
add_compile_definitions(LOCALEDIR="${LOCALEDIR}")
|
||||
|
||||
# Common compiler settings.
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_compile_definitions(DEBUG)
|
||||
else()
|
||||
add_compile_definitions(NDEBUG)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
add_compile_definitions(MACHO)
|
||||
elseif("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
add_compile_definitions(ELF)
|
||||
endif()
|
||||
|
||||
if(X86_64)
|
||||
add_compile_definitions(__AMD64__ __X86_64__)
|
||||
endif()
|
||||
|
||||
# Enable ASAN if requested and supported.
|
||||
include(Toolchain-asan)
|
||||
|
||||
# MINGW/MSYS-specific settings.
|
||||
include(Toolchain-mingw)
|
||||
|
||||
# Toolchain-specific settings.
|
||||
if(MSVC)
|
||||
# This also includes clang-cl.
|
||||
include(Toolchain-msvc)
|
||||
else()
|
||||
include(Toolchain-gcc-clang)
|
||||
endif()
|
||||
|
||||
# Assembler flags.
|
||||
if(ENABLE_ASM_CORE OR ENABLE_ASM_SCALERS)
|
||||
if(MSVC)
|
||||
if(NOT EXISTS ${CMAKE_BINARY_DIR}/nuget.exe)
|
||||
file(DOWNLOAD "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" ${CMAKE_BINARY_DIR}/nuget.exe)
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND nuget.exe install nasm2 -OutputDirectory ${CMAKE_BINARY_DIR}/nuget
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
file(GLOB pkg ${CMAKE_BINARY_DIR}/nuget/nasm2*)
|
||||
|
||||
list(APPEND CMAKE_PROGRAM_PATH ${pkg}/tools)
|
||||
endif()
|
||||
|
||||
enable_language(ASM_NASM)
|
||||
|
||||
set(ASM_ENABLED ON)
|
||||
endif()
|
||||
|
||||
if(ASM_ENABLED)
|
||||
string(REGEX REPLACE "<FLAGS>" "-I${CMAKE_SOURCE_DIR}/src/filters/hq/asm/ -O1 -w-orphan-labels" CMAKE_ASM_NASM_COMPILE_OBJECT ${CMAKE_ASM_NASM_COMPILE_OBJECT})
|
||||
endif()
|
|
@ -2,12 +2,6 @@
|
|||
# Update version in appcast.xml to latest tag.
|
||||
# Commit web-data.
|
||||
|
||||
find_package(Git)
|
||||
|
||||
if(NOT GIT_FOUND)
|
||||
message(FATAL_ERROR "git is required to update the appcast")
|
||||
endif()
|
||||
|
||||
function(update_appcast)
|
||||
if(UPDATE_APPCAST STREQUAL UNDO)
|
||||
file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/web-data)
|
||||
|
@ -22,7 +16,7 @@ Ignore the following cmake error.
|
|||
# Get last tag.
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} tag --sort=-v:refname
|
||||
COMMAND git tag --sort=-v:refname
|
||||
OUTPUT_VARIABLE git_tags
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
|
@ -49,7 +43,7 @@ Ignore the following cmake error.
|
|||
# Clone repo.
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} clone git@github.com:visualboyadvance-m/visualboyadvance-m.github.io web-data
|
||||
COMMAND git clone git@github.com:visualboyadvance-m/visualboyadvance-m.github.io web-data
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
|
@ -81,10 +75,12 @@ Ignore the following cmake error.
|
|||
endwhile()
|
||||
|
||||
# Convert to UNIX line endings on Windows, just copy the file otherwise.
|
||||
|
||||
if(CMAKE_HOST_SYSTEM MATCHES Windows OR ((NOT DEFINED CMAKE_HOST_SYSTEM) AND WIN32))
|
||||
if(NOT DEFINED POWERSHELL)
|
||||
message(FATAL_ERROR "Powershell is required to convert line endings on Windows.")
|
||||
endif()
|
||||
execute_process(
|
||||
COMMAND powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[
|
||||
COMMAND ${POWERSHELL} -NoLogo -NoProfile -ExecutionPolicy Bypass -Command [=[
|
||||
$text = [IO.File]::ReadAllText("appcast.xml.work") -replace "`r`n", "`n"
|
||||
[IO.File]::WriteAllText("appcast.xml", $text)
|
||||
]=]
|
||||
|
@ -107,21 +103,21 @@ Ignore the following cmake error.
|
|||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} add appcast.xml
|
||||
COMMAND git add appcast.xml
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/web-data
|
||||
)
|
||||
|
||||
# Commit the change.
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} commit -m "release ${new_tag}" --signoff -S
|
||||
COMMAND git commit -m "release ${new_tag}" --signoff -S
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/web-data
|
||||
)
|
||||
|
||||
# Make release tag.
|
||||
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} tag -s -m${new_tag} ${new_tag}
|
||||
COMMAND git tag -s -m${new_tag} ${new_tag}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/web-data
|
||||
)
|
||||
|
||||
|
|
|
@ -1,103 +0,0 @@
|
|||
# UseGCCBinUtilsWrappers.cmake
|
||||
#
|
||||
# Use gcc binutils wrappers such as gcc-ar, this may be necessary for LTO.
|
||||
#
|
||||
# To use:
|
||||
#
|
||||
# put a copy into your <project_root>/CMakeScripts/
|
||||
#
|
||||
# In your main CMakeLists.txt add the command:
|
||||
#
|
||||
# INCLUDE(UseGCCBinUtilsWrappers)
|
||||
#
|
||||
# BSD 2-Clause License
|
||||
#
|
||||
# Copyright (c) 2016, Rafael Kitover
|
||||
# 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.
|
||||
#
|
||||
# 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.
|
||||
|
||||
# only do this when compiling with gcc/g++
|
||||
IF(NOT (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUC))
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
# first try appending -util to basename of compiler
|
||||
STRING(REGEX MATCH "\\.(exe|EXE)$" GCC_EXE_SUFFIX ${CMAKE_C_COMPILER})
|
||||
STRING(REGEX REPLACE "\\.(exe|EXE)$" "" GCC_BASENAME ${CMAKE_C_COMPILER})
|
||||
|
||||
SET(GCC_AR "${GCC_BASENAME}-ar${GCC_EXE_SUFFIX}")
|
||||
SET(GCC_NM "${GCC_BASENAME}-nm${GCC_EXE_SUFFIX}")
|
||||
SET(GCC_RANLIB "${GCC_BASENAME}-ranlib${GCC_EXE_SUFFIX}")
|
||||
|
||||
# if that does not work, try looking for gcc-util in the compiler directory,
|
||||
# and failing that in the PATH
|
||||
|
||||
GET_FILENAME_COMPONENT(GCC_DIRNAME ${CMAKE_C_COMPILER} DIRECTORY)
|
||||
|
||||
IF(NOT EXISTS ${GCC_AR})
|
||||
UNSET(GCC_AR)
|
||||
|
||||
FIND_PROGRAM(GCC_AR NAMES gcc-ar gcc-ar.exe GCC-AR.EXE HINTS ${GCC_DIRNAME})
|
||||
ENDIF()
|
||||
|
||||
IF(NOT EXISTS ${GCC_NM})
|
||||
UNSET(GCC_NM)
|
||||
|
||||
FIND_PROGRAM(GCC_NM NAMES gcc-nm gcc-nm.exe GCC-NM.EXE HINTS ${GCC_DIRNAME})
|
||||
ENDIF()
|
||||
|
||||
IF(NOT EXISTS ${GCC_RANLIB})
|
||||
UNSET(GCC_RANLIB)
|
||||
|
||||
FIND_PROGRAM(GCC_RANLIB NAMES gcc-ranlib gcc-ranlib.exe GCC-RANLIB.EXE HINTS ${GCC_DIRNAME})
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(PathRun)
|
||||
|
||||
IF(EXISTS ${GCC_AR})
|
||||
MESSAGE("-- Found gcc-ar: ${GCC_AR}")
|
||||
|
||||
SET(target "${CMAKE_BINARY_DIR}/gcc-ar-wrap")
|
||||
MAKE_PATH_RUN_WRAPPER("${GCC_AR}" "${target}")
|
||||
SET(CMAKE_AR "${target}")
|
||||
ENDIF()
|
||||
|
||||
IF(EXISTS ${GCC_NM})
|
||||
MESSAGE("-- Found gcc-nm: ${GCC_NM}")
|
||||
|
||||
SET(target "${CMAKE_BINARY_DIR}/gcc-nm-wrap")
|
||||
MAKE_PATH_RUN_WRAPPER("${GCC_NM}" "${target}")
|
||||
SET(CMAKE_NM "${target}")
|
||||
ENDIF()
|
||||
|
||||
IF(EXISTS ${GCC_RANLIB})
|
||||
MESSAGE("-- Found gcc-ranlib: ${GCC_RANLIB}")
|
||||
|
||||
SET(target "${CMAKE_BINARY_DIR}/gcc-ranlib-wrap")
|
||||
MAKE_PATH_RUN_WRAPPER("${GCC_RANLIB}" "${target}")
|
||||
SET(CMAKE_RANLIB "${target}")
|
||||
ENDIF()
|
||||
|
||||
FOREACH(VAR "GCC_AR" "GCC_NM" "GCC_RANLIB" "GCC_DIRNAME" "GCC_BASENAME" "GCC_EXE_SUFFIX" "target")
|
||||
UNSET(${VAR})
|
||||
ENDFOREACH()
|
|
@ -1,48 +1,3 @@
|
|||
# From: https://stackoverflow.com/a/41416298/262458
|
||||
function(REMOVE_DUPES ARG_STR OUTPUT)
|
||||
set(ARG_LIST ${ARG_STR})
|
||||
separate_arguments(ARG_LIST)
|
||||
list(REMOVE_DUPLICATES ARG_LIST)
|
||||
string (REGEX REPLACE "([^\\]|^);" "\\1 " _TMP_STR "${ARG_LIST}")
|
||||
string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping
|
||||
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# From: https://stackoverflow.com/a/7216542
|
||||
function(JOIN VALUES GLUE OUTPUT)
|
||||
string (REGEX REPLACE "([^\\]|^);" "\\1${GLUE}" _TMP_STR "${VALUES}")
|
||||
string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping
|
||||
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# On MSYS2 transform wx lib paths to native paths for Ninja.
|
||||
function(normalize_wx_paths)
|
||||
if(MSYS)
|
||||
set(libs "")
|
||||
|
||||
foreach(lib ${wxWidgets_LIBRARIES})
|
||||
if(NOT lib MATCHES "^(-Wl,|-mwindows$|-pipe$)")
|
||||
if(lib MATCHES "^/")
|
||||
cygpath(lib "${lib}")
|
||||
endif()
|
||||
|
||||
if(VBAM_STATIC AND lib MATCHES "^-l(wx.*|jpeg|tiff|jbig|lzma|expat)$")
|
||||
cygpath(lib "$ENV{MSYSTEM_PREFIX}/lib/lib${CMAKE_MATCH_1}.a")
|
||||
endif()
|
||||
|
||||
list(APPEND libs "${lib}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(wxWidgets_LIBRARIES "${libs}" PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(cleanup_wx_vars)
|
||||
if(wxWidgets_CXX_FLAGS)
|
||||
list(REMOVE_ITEM wxWidgets_CXX_FLAGS -fpermissive)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function(cygpath var path)
|
||||
execute_process(
|
||||
|
@ -157,5 +112,3 @@ function(find_wx_util var util)
|
|||
set(${var} ${util} PARENT_SCOPE)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# vim:sw=4 sts et:
|
||||
|
|
|
@ -1,175 +0,0 @@
|
|||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
doctest
|
||||
-----
|
||||
|
||||
This module defines a function to help use the doctest test framework.
|
||||
|
||||
The :command:`doctest_discover_tests` discovers tests by asking the compiled test
|
||||
executable to enumerate its tests. This does not require CMake to be re-run
|
||||
when tests change. However, it may not work in a cross-compiling environment,
|
||||
and setting test properties is less convenient.
|
||||
|
||||
This command is intended to replace use of :command:`add_test` to register
|
||||
tests, and will create a separate CTest test for each doctest test case. Note
|
||||
that this is in some cases less efficient, as common set-up and tear-down logic
|
||||
cannot be shared by multiple test cases executing in the same instance.
|
||||
However, it provides more fine-grained pass/fail information to CTest, which is
|
||||
usually considered as more beneficial. By default, the CTest test name is the
|
||||
same as the doctest name; see also ``TEST_PREFIX`` and ``TEST_SUFFIX``.
|
||||
|
||||
.. command:: doctest_discover_tests
|
||||
|
||||
Automatically add tests with CTest by querying the compiled test executable
|
||||
for available tests::
|
||||
|
||||
doctest_discover_tests(target
|
||||
[TEST_SPEC arg1...]
|
||||
[EXTRA_ARGS arg1...]
|
||||
[WORKING_DIRECTORY dir]
|
||||
[TEST_PREFIX prefix]
|
||||
[TEST_SUFFIX suffix]
|
||||
[PROPERTIES name1 value1...]
|
||||
[TEST_LIST var]
|
||||
)
|
||||
|
||||
``doctest_discover_tests`` sets up a post-build command on the test executable
|
||||
that generates the list of tests by parsing the output from running the test
|
||||
with the ``--list-test-cases`` argument. This ensures that the full
|
||||
list of tests is obtained. Since test discovery occurs at build time, it is
|
||||
not necessary to re-run CMake when the list of tests changes.
|
||||
However, it requires that :prop_tgt:`CROSSCOMPILING_EMULATOR` is properly set
|
||||
in order to function in a cross-compiling environment.
|
||||
|
||||
Additionally, setting properties on tests is somewhat less convenient, since
|
||||
the tests are not available at CMake time. Additional test properties may be
|
||||
assigned to the set of tests as a whole using the ``PROPERTIES`` option. If
|
||||
more fine-grained test control is needed, custom content may be provided
|
||||
through an external CTest script using the :prop_dir:`TEST_INCLUDE_FILES`
|
||||
directory property. The set of discovered tests is made accessible to such a
|
||||
script via the ``<target>_TESTS`` variable.
|
||||
|
||||
The options are:
|
||||
|
||||
``target``
|
||||
Specifies the doctest executable, which must be a known CMake executable
|
||||
target. CMake will substitute the location of the built executable when
|
||||
running the test.
|
||||
|
||||
``TEST_SPEC arg1...``
|
||||
Specifies test cases, wildcarded test cases, tags and tag expressions to
|
||||
pass to the doctest executable with the ``--list-test-cases`` argument.
|
||||
|
||||
``EXTRA_ARGS arg1...``
|
||||
Any extra arguments to pass on the command line to each test case.
|
||||
|
||||
``WORKING_DIRECTORY dir``
|
||||
Specifies the directory in which to run the discovered test cases. If this
|
||||
option is not provided, the current binary directory is used.
|
||||
|
||||
``TEST_PREFIX prefix``
|
||||
Specifies a ``prefix`` to be prepended to the name of each discovered test
|
||||
case. This can be useful when the same test executable is being used in
|
||||
multiple calls to ``doctest_discover_tests()`` but with different
|
||||
``TEST_SPEC`` or ``EXTRA_ARGS``.
|
||||
|
||||
``TEST_SUFFIX suffix``
|
||||
Similar to ``TEST_PREFIX`` except the ``suffix`` is appended to the name of
|
||||
every discovered test case. Both ``TEST_PREFIX`` and ``TEST_SUFFIX`` may
|
||||
be specified.
|
||||
|
||||
``PROPERTIES name1 value1...``
|
||||
Specifies additional properties to be set on all tests discovered by this
|
||||
invocation of ``doctest_discover_tests``.
|
||||
|
||||
``TEST_LIST var``
|
||||
Make the list of tests available in the variable ``var``, rather than the
|
||||
default ``<target>_TESTS``. This can be useful when the same test
|
||||
executable is being used in multiple calls to ``doctest_discover_tests()``.
|
||||
Note that this variable is only available in CTest.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
function(doctest_discover_tests TARGET)
|
||||
cmake_parse_arguments(
|
||||
""
|
||||
""
|
||||
"TEST_PREFIX;TEST_SUFFIX;WORKING_DIRECTORY;TEST_LIST"
|
||||
"TEST_SPEC;EXTRA_ARGS;PROPERTIES"
|
||||
${ARGN}
|
||||
)
|
||||
|
||||
if(NOT _WORKING_DIRECTORY)
|
||||
set(_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
endif()
|
||||
if(NOT _TEST_LIST)
|
||||
set(_TEST_LIST ${TARGET}_TESTS)
|
||||
endif()
|
||||
|
||||
## Generate a unique name based on the extra arguments
|
||||
string(SHA1 args_hash "${_TEST_SPEC} ${_EXTRA_ARGS}")
|
||||
string(SUBSTRING ${args_hash} 0 7 args_hash)
|
||||
|
||||
# Define rule to generate test list for aforementioned test executable
|
||||
set(ctest_include_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_include-${args_hash}.cmake")
|
||||
set(ctest_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_tests-${args_hash}.cmake")
|
||||
get_property(crosscompiling_emulator
|
||||
TARGET ${TARGET}
|
||||
PROPERTY CROSSCOMPILING_EMULATOR
|
||||
)
|
||||
add_custom_command(
|
||||
TARGET ${TARGET} POST_BUILD
|
||||
BYPRODUCTS "${ctest_tests_file}"
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_TARGET=${TARGET}"
|
||||
-D "TEST_EXECUTABLE=$<TARGET_FILE:${TARGET}>"
|
||||
-D "TEST_EXECUTOR=${crosscompiling_emulator}"
|
||||
-D "TEST_WORKING_DIR=${_WORKING_DIRECTORY}"
|
||||
-D "TEST_SPEC=${_TEST_SPEC}"
|
||||
-D "TEST_EXTRA_ARGS=${_EXTRA_ARGS}"
|
||||
-D "TEST_PROPERTIES=${_PROPERTIES}"
|
||||
-D "TEST_PREFIX=${_TEST_PREFIX}"
|
||||
-D "TEST_SUFFIX=${_TEST_SUFFIX}"
|
||||
-D "TEST_LIST=${_TEST_LIST}"
|
||||
-D "CTEST_FILE=${ctest_tests_file}"
|
||||
-P "${_DOCTEST_DISCOVER_TESTS_SCRIPT}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
file(WRITE "${ctest_include_file}"
|
||||
"if(EXISTS \"${ctest_tests_file}\")\n"
|
||||
" include(\"${ctest_tests_file}\")\n"
|
||||
"else()\n"
|
||||
" add_test(${TARGET}_NOT_BUILT-${args_hash} ${TARGET}_NOT_BUILT-${args_hash})\n"
|
||||
"endif()\n"
|
||||
)
|
||||
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.10)
|
||||
# Add discovered tests to directory TEST_INCLUDE_FILES
|
||||
set_property(DIRECTORY
|
||||
APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}"
|
||||
)
|
||||
else()
|
||||
# Add discovered tests as directory TEST_INCLUDE_FILE if possible
|
||||
get_property(test_include_file_set DIRECTORY PROPERTY TEST_INCLUDE_FILE SET)
|
||||
if(NOT ${test_include_file_set})
|
||||
set_property(DIRECTORY
|
||||
PROPERTY TEST_INCLUDE_FILE "${ctest_include_file}"
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR
|
||||
"Cannot set more than one TEST_INCLUDE_FILE"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endfunction()
|
||||
|
||||
###############################################################################
|
||||
|
||||
set(_DOCTEST_DISCOVER_TESTS_SCRIPT
|
||||
${CMAKE_CURRENT_LIST_DIR}/doctestAddTests.cmake
|
||||
)
|
|
@ -1,81 +0,0 @@
|
|||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
set(prefix "${TEST_PREFIX}")
|
||||
set(suffix "${TEST_SUFFIX}")
|
||||
set(spec ${TEST_SPEC})
|
||||
set(extra_args ${TEST_EXTRA_ARGS})
|
||||
set(properties ${TEST_PROPERTIES})
|
||||
set(script)
|
||||
set(suite)
|
||||
set(tests)
|
||||
|
||||
function(add_command NAME)
|
||||
set(_args "")
|
||||
foreach(_arg ${ARGN})
|
||||
if(_arg MATCHES "[^-./:a-zA-Z0-9_]")
|
||||
set(_args "${_args} [==[${_arg}]==]") # form a bracket_argument
|
||||
else()
|
||||
set(_args "${_args} ${_arg}")
|
||||
endif()
|
||||
endforeach()
|
||||
set(script "${script}${NAME}(${_args})\n" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Run test executable to get list of available tests
|
||||
if(NOT EXISTS "${TEST_EXECUTABLE}")
|
||||
message(FATAL_ERROR
|
||||
"Specified test executable '${TEST_EXECUTABLE}' does not exist"
|
||||
)
|
||||
endif()
|
||||
|
||||
if("${spec}" MATCHES .)
|
||||
set(spec "--test-case=${spec}")
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-test-cases
|
||||
OUTPUT_VARIABLE output
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
if(NOT ${result} EQUAL 0)
|
||||
message(FATAL_ERROR
|
||||
"Error running test executable '${TEST_EXECUTABLE}':\n"
|
||||
" Result: ${result}\n"
|
||||
" Output: ${output}\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
string(REPLACE "\n" ";" output "${output}")
|
||||
|
||||
# Parse output
|
||||
foreach(line ${output})
|
||||
if("${line}" STREQUAL "===============================================================================" OR "${line}" MATCHES [==[^\[doctest\] ]==])
|
||||
continue()
|
||||
endif()
|
||||
set(test ${line})
|
||||
# use escape commas to handle properly test cases with commas inside the name
|
||||
string(REPLACE "," "\\," test_name ${test})
|
||||
# ...and add to script
|
||||
add_command(add_test
|
||||
"${prefix}${test}${suffix}"
|
||||
${TEST_EXECUTOR}
|
||||
"${TEST_EXECUTABLE}"
|
||||
"--test-case=${test_name}"
|
||||
${extra_args}
|
||||
)
|
||||
add_command(set_tests_properties
|
||||
"${prefix}${test}${suffix}"
|
||||
PROPERTIES
|
||||
WORKING_DIRECTORY "${TEST_WORKING_DIR}"
|
||||
${properties}
|
||||
)
|
||||
list(APPEND tests "${prefix}${test}${suffix}")
|
||||
endforeach()
|
||||
|
||||
# Create a list of all discovered tests, which users may use to e.g. set
|
||||
# properties on the tests
|
||||
add_command(set ${TEST_LIST} ${tests})
|
||||
|
||||
# Write CTest script
|
||||
file(WRITE "${CTEST_FILE}" "${script}")
|
|
@ -2,7 +2,7 @@ with import <nixpkgs> {};
|
|||
stdenv.mkDerivation {
|
||||
name = "visualboyadvance-m";
|
||||
buildInputs = if stdenv.isDarwin then
|
||||
[ ninja cmake gcc nasm gettext pkg-config zip sfml zlib ffmpeg wxGTK32 SDL2 pcre ]
|
||||
[ ninja cmake nasm faudio gettext libintl pkg-config zip zlib openal ffmpeg wxGTK32 SDL2 pcre pcre2 darwin.apple_sdk.frameworks.System darwin.apple_sdk.frameworks.IOKit darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.QuartzCore darwin.apple_sdk.frameworks.AudioToolbox darwin.apple_sdk.frameworks.OpenGL darwin.apple_sdk.frameworks.OpenAL llvmPackages_latest.clang llvmPackages_latest.bintools ]
|
||||
else
|
||||
[ ninja cmake gcc nasm gettext pkg-config zip sfml zlib ffmpeg wxGTK32 mesa glfw SDL2 gtk3-x11 pcre util-linuxMinimal libselinux libsepol libthai libdatrie xorg.libXdmcp xorg.libXtst libxkbcommon epoxy dbus at-spi2-core ];
|
||||
[ ninja cmake gcc clang llvm llvmPackages.libcxx nasm faudio gettext libintl pkg-config zip zlib openal ffmpeg wxGTK32 libGL libGLU glfw SDL2 gtk3-x11 pcre pcre2 util-linuxMinimal libselinux libsepol libthai libdatrie xorg.libXdmcp xorg.libXtst libxkbcommon libepoxy dbus at-spi2-core ];
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit e8ce758a98161d47559aa294d3298425ec75e28e
|
|
@ -2,59 +2,27 @@
|
|||
Developer Information File
|
||||
==========================
|
||||
|
||||
|
||||
|
||||
Known preprocessor switches:
|
||||
- SDL: Defined for the SDL version
|
||||
- GBA_LOGGING: Enables logging for the GBA core
|
||||
- FINAL_VERSION: Defined for release versions, disables additional GBA logging and completely disables GB logging. Increases the amount of CPU cycles being emulated in one go.
|
||||
- BKPT_SUPPORT
|
||||
- VBAM_ENABLE_DEBUGGER: Enable remote debugging support
|
||||
- MMX: Enable MMX instruction set
|
||||
- NO_ASM: Use C++ version of hq3x/4x filters
|
||||
- RGB555: Use 16bit colors with 5bit green instead of 6bit green in hq3x/4x filters (C++ version)
|
||||
- NO_OGL: Exclude OpenGL code
|
||||
- NO_D3D: Exclude Direct3D code
|
||||
- NO_OAL: Exclude OpenAL code
|
||||
- NO_XAUDIO2: Exclude XAudio2 code (the XAudio2 interface is DirectSound's successor)
|
||||
- VBAM_ENABLE_XAUDIO2: Enable XAudio2 code (the XAudio2 interface is DirectSound's successor)
|
||||
- VBAM_ENABLE_FAUDIO: Enable FAudio code (the FAudio interface is an open source multiplatform re-implementation of XAudio2)
|
||||
- NO_LINK: Exclude linking code (joybus, multilink, ...)
|
||||
- WIN64: This macro is only defined for 64 bit builds
|
||||
|
||||
|
||||
|
||||
Download locations:
|
||||
NASM: http://nasm.us/
|
||||
DirectX SDK: http://msdn.microsoft.com/en-us/xna/aa937788.aspx
|
||||
OpenAL SDK: http://connect.creativelabs.com/openal/default.aspx
|
||||
OpenGL files: http://www.opengl.org/registry/
|
||||
zlib: http://zlib.net/
|
||||
libpng: http://libpng.org/pub/png/libpng.html
|
||||
|
||||
You can find pre-built versions of zlib & libpng at:
|
||||
http://spacy51.sp.funpic.de/VBA-M/libs/
|
||||
Just extract them somewhere and point Visual C++ 2008 to the include & lib folders.
|
||||
They are built with the static C runtime (this is what the release builds use).
|
||||
|
||||
|
||||
|
||||
###########################
|
||||
# --- Build Systems --- #
|
||||
###########################
|
||||
|
||||
===Win32/MFC===
|
||||
This is the full-featured Windows build using the MFC GUI.
|
||||
The project files are located in /project/vc2008_mfc (VBA2008.sln) and /project/vs2010_mfc (VBA2010.sln).
|
||||
Anyone distributing builds should be using MSVC 2010 SP1, the unpatched release has a bug where it applies SSE2 updates to mov and other instructions resulting in illegal instruction errors on cpu's only supporting SSE.
|
||||
You also have to install Microsoft's DirectX SDK for Direct3D, DirectInput & XAudio2.
|
||||
If you want to enable OpenAL sound output, install the OpenAL SDK. If you do not want it, add NO_OAL to the VBA-M project's preprocessor definitions.
|
||||
SubWCRev.exe is used to append the svn versioning to the output executable, this as of TortoiseSVN 1.7, is only available by installing TortoiseSVN.
|
||||
All other dependencies for MSVC builds may be found in the ../dependencies directory (above /trunk).
|
||||
Normally, Windows users will want to checkout the root of the repository instead of just the trunk directory. Afterwards, simply opening the .sln of choice, setting preprocessor definitions, and hitting build is all that's required.
|
||||
|
||||
===*nix/GTK===
|
||||
===src/sdl===
|
||||
This is the standard build configuration on non-Windows.
|
||||
Running cmake will inform you of any packages you need to install.
|
||||
|
||||
===*/wxw===
|
||||
The wxWidgets interface is an in-development frontend meant to be more cross-platform friendly than MFC and GTK.
|
||||
===src/wx===
|
||||
The wxWidgets interface is an in-development frontend meant to be more cross-platform friendly than MFC and SDL.
|
||||
Running cmake will inform you of any packages you need to install.
|
||||
NOTE: In addition to what cmake currently checks for, you will also need the wxrc tool and libgdiplus.
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
VisualBoyAdvance-M
|
||||
Nintendo Game Boy & Game Boy Advance Emulator
|
||||
Project Homepage: http://vba-m.com
|
||||
Project Homepage: http://visualboyadvance-m.org
|
||||
|
||||
This program is distributed under the GNU General Public License
|
||||
http://www.gnu.org/licenses/gpl.html
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
#Do not use this file directly. Always use the top level CMakeLists.txt file
|
||||
#File extractors so the user doesn't have to extract the rom before playing it
|
||||
|
||||
# Source files definition
|
||||
SET(SRC_FEX
|
||||
7z_C/7zAlloc.c
|
||||
7z_C/7zBuf.c
|
||||
7z_C/7zCrc.c
|
||||
7z_C/7zCrcOpt.c
|
||||
7z_C/7zDec.c
|
||||
7z_C/7zIn.c
|
||||
7z_C/7zStream.c
|
||||
7z_C/Bcj2.c
|
||||
7z_C/Bra86.c
|
||||
7z_C/Bra.c
|
||||
7z_C/CpuArch.c
|
||||
7z_C/Lzma2Dec.c
|
||||
7z_C/LzmaDec.c
|
||||
7z_C/Ppmd7.c
|
||||
7z_C/Ppmd7Dec.c
|
||||
fex/Binary_Extractor.cpp
|
||||
fex/blargg_common.cpp
|
||||
fex/blargg_errors.cpp
|
||||
fex/Data_Reader.cpp
|
||||
fex/fex.cpp
|
||||
fex/File_Extractor.cpp
|
||||
fex/Gzip_Extractor.cpp
|
||||
fex/Gzip_Reader.cpp
|
||||
fex/Rar_Extractor.cpp
|
||||
fex/Zip7_Extractor.cpp
|
||||
fex/Zip_Extractor.cpp
|
||||
fex/Zlib_Inflater.cpp
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
.
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
ADD_LIBRARY(
|
||||
fex
|
||||
STATIC
|
||||
${SRC_FEX}
|
||||
)
|
||||
|
||||
add_dependencies(fex generate)
|
101
installdeps
101
installdeps
|
@ -1,7 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
CMAKE=cmake
|
||||
ENABLE_OPENAL=1
|
||||
ENABLE_FFMPEG=1
|
||||
|
||||
main() {
|
||||
|
@ -25,10 +24,6 @@ check_command_line_args() {
|
|||
usage
|
||||
quit 0
|
||||
;;
|
||||
--no-openal)
|
||||
ENABLE_OPENAL=
|
||||
shift
|
||||
;;
|
||||
--no-ffmpeg)
|
||||
ENABLE_FFMPEG=
|
||||
shift
|
||||
|
@ -179,6 +174,9 @@ linux_installdeps() {
|
|||
nixos)
|
||||
nixos_installdeps
|
||||
;;
|
||||
alpine)
|
||||
alpine_installdeps
|
||||
;;
|
||||
*)
|
||||
error "Don't know how to install deps on your version of Linux"
|
||||
;;
|
||||
|
@ -352,9 +350,8 @@ debian_installdeps() {
|
|||
;;
|
||||
esac
|
||||
|
||||
pkgs="build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libgettextpo-dev libsdl2-dev $sdl_lib libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib $wx_libs libgtk2.0-dev libgtk-3-dev ccache zip ninja-build"
|
||||
pkgs="build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libgettextpo-dev libsdl2-dev $sdl_lib libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib $wx_libs libgtk2.0-dev libgtk-3-dev ccache zip ninja-build libopenal-dev"
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && pkgs="$pkgs libopenal-dev"
|
||||
[ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs libavcodec-dev libavformat-dev libswscale-dev libavutil-dev $libswresample_dev"
|
||||
|
||||
check sudo apt-get -qy install $pkgs
|
||||
|
@ -404,8 +401,7 @@ debian_installdeps() {
|
|||
fi
|
||||
fi
|
||||
|
||||
deps="gcc zlib ffmpeg gettext sdl2 sfml openal wxwidgets"
|
||||
[ -n "$ENABLE_OPENAL" ] && deps="$deps openal"
|
||||
deps="gcc zlib ffmpeg gettext sdl2 sfml openal wxwidgets openal"
|
||||
[ -n "$ENABLE_FFMPEG" ] && deps="$deps ffmpeg"
|
||||
|
||||
set --
|
||||
|
@ -507,9 +503,6 @@ fedora_installdeps() {
|
|||
*ffmpeg*)
|
||||
[ -z "$ENABLE_FFMPEG" ] && continue
|
||||
;;
|
||||
*openal*)
|
||||
[ -z "$ENABLE_OPENAL" ] && continue
|
||||
;;
|
||||
esac
|
||||
|
||||
pkg_arch=
|
||||
|
@ -598,15 +591,9 @@ fedora_installdeps() {
|
|||
;;
|
||||
esac
|
||||
# install static deps
|
||||
for pkg in zlib gettext SDL2 wxWidgets3; do
|
||||
for pkg in zlib gettext SDL2 wxWidgets3 openal-soft; do
|
||||
set -- "$@" "${target}-${pkg}-static"
|
||||
done
|
||||
# install deps that are not available as static
|
||||
if [ -n "$ENABLE_OPENAL" ]; then
|
||||
for pkg in openal-soft; do
|
||||
set -- "$@" "${target}-${pkg}"
|
||||
done
|
||||
fi
|
||||
|
||||
# get the necessary win32 headers
|
||||
git submodule update --init --remote --recursive
|
||||
|
@ -704,9 +691,6 @@ rhel_installdeps() {
|
|||
*ffmpeg*)
|
||||
[ -z "$ENABLE_FFMPEG" ] && continue
|
||||
;;
|
||||
*openal*)
|
||||
[ -z "$ENABLE_OPENAL" ] && continue
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$amd64" ]; then
|
||||
|
@ -787,15 +771,9 @@ rhel_installdeps() {
|
|||
;;
|
||||
esac
|
||||
# install static deps
|
||||
for pkg in zlib gettext SDL2 wxWidgets; do
|
||||
for pkg in zlib gettext SDL2 wxWidgets openal-soft; do
|
||||
set -- "$@" "${target}-${pkg}-static"
|
||||
done
|
||||
# install deps that are not available as static
|
||||
if [ -n "$ENABLE_OPENAL" ]; then
|
||||
for pkg in openal-soft; do
|
||||
set -- "$@" "${target}-${pkg}"
|
||||
done
|
||||
fi
|
||||
|
||||
# get the necessary win32 headers
|
||||
git submodule update --init --remote --recursive
|
||||
|
@ -821,13 +799,10 @@ suse_installdeps() {
|
|||
|
||||
tools="make cmake ccache nasm gettext-tools pkg-config ccache zip sfml2-devel ninja"
|
||||
|
||||
libs="gcc gcc-c++ libSDL2-devel wxWidgets-3_0-devel" # ffmpeg-devel
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && libs="$libs openal-soft-devel"
|
||||
# ffmpeg requires packman repos
|
||||
libs="gcc gcc-c++ libSDL2-devel wxGTK3-3_2-devel openal-soft-devel ffmpeg-7-libavcodec-devel ffmpeg-7-libavdevice-devel ffmpeg-7-libavfilter-devel ffmpeg-7-libavformat-devel ffmpeg-7-libavutil-devel ffmpeg-7-libpostproc-devel ffmpeg-7-libswresample-devel ffmpeg-7-libswscale-devel"
|
||||
|
||||
if [ "$target" = m32 ]; then
|
||||
libs=$(echo "$libs" | sed -E 's/([^ ]) ([^ ])/\1-32bit \2/g; s/$/-32bit/;')
|
||||
error '32 bit cross builds are no longer supported on OpenSUSE'
|
||||
fi
|
||||
|
||||
check sudo zypper in -y $tools $libs
|
||||
|
@ -891,9 +866,8 @@ archlinux_installdeps() {
|
|||
|
||||
$pacman -Q gtk3-classic >/dev/null 2>&1 && gtk=gtk3-classic
|
||||
|
||||
libs="zlib mesa gettext sdl2 wxgtk3 $gtk sfml"
|
||||
libs="zlib mesa gettext sdl2 wxgtk3 $gtk sfml openal"
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && libs="$libs openal"
|
||||
[ -n "$ENABLE_FFMPEG" ] && libs="$libs ffmpeg"
|
||||
|
||||
if [ -z "$target" -o "$target" = m32 ]; then
|
||||
|
@ -988,9 +962,7 @@ EOF
|
|||
fi
|
||||
done
|
||||
|
||||
deps="zlib gettext pkg-config sdl2 wxmsw"
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && deps="$deps openal"
|
||||
deps="zlib gettext pkg-config sdl2 wxmsw openal"
|
||||
|
||||
# and the actual deps
|
||||
for p in $deps; do
|
||||
|
@ -1021,9 +993,7 @@ solus_installdeps() {
|
|||
check sudo eopkg -y install -c system.devel
|
||||
check sudo eopkg -y install git ccache ninja
|
||||
|
||||
set -- sdl2-devel wxwidgets-devel libgtk-2-devel libgtk-3-devel
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && set -- "$@" openal-soft-devel
|
||||
set -- sdl2-devel wxwidgets-devel libgtk-2-devel libgtk-3-devel libglu-devel openal-soft-devel
|
||||
|
||||
if [ -n "$amd64" -a "$target" = m32 ]; then
|
||||
info_msg 'Calculating dependencies, this will take a while..'
|
||||
|
@ -1092,19 +1062,36 @@ gentoo_installdeps() {
|
|||
wx_slot=$(equery -qC list -p -F '$slot' x11-libs/wxGTK | grep gtk3 | sort -rV | head -1)
|
||||
|
||||
ebuilds="\
|
||||
sys-devel/gcc sys-devel/make dev-util/cmake dev-util/ccache sys-devel/binutils \
|
||||
media-libs/libsdl2 media-libs/libsfml x11-libs/wxGTK:$wx_slot sys-libs/zlib dev-util/pkgconf \
|
||||
dev-lang/nasm dev-util/ninja"
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && ebuilds="$ebuilds media-libs/openal"
|
||||
sys-devel/gcc \
|
||||
dev-build/make \
|
||||
dev-build/cmake \
|
||||
dev-util/ccache \
|
||||
sys-devel/binutils \
|
||||
media-libs/libsdl2 \
|
||||
media-libs/libsfml \
|
||||
media-libs/openal \
|
||||
x11-libs/wxGTK:$wx_slot \
|
||||
sys-libs/zlib \
|
||||
dev-util/pkgconf \
|
||||
dev-lang/nasm \
|
||||
dev-build/ninja"
|
||||
|
||||
[ -n "$ENABLE_FFMPEG" ] && ebuilds="$ebuilds media-video/ffmpeg"
|
||||
|
||||
check sudo emerge -vn $ebuilds
|
||||
check sudo emerge -vna $ebuilds
|
||||
|
||||
build_instructions
|
||||
}
|
||||
|
||||
alpine_installdeps() {
|
||||
installing
|
||||
|
||||
check sudo apk add cmake ninja g++ ccache nasm gettext-dev zlib-dev mesa-dev sdl2-dev glu-dev sfml-dev wxwidgets-dev gtk+3.0-dev zip
|
||||
|
||||
build_instructions
|
||||
}
|
||||
|
||||
|
||||
windows_installdeps() {
|
||||
msys2=1
|
||||
|
||||
|
@ -1118,10 +1105,10 @@ windows_installdeps() {
|
|||
|
||||
case "$target" in
|
||||
*clang*)
|
||||
pkgs="lldb"
|
||||
pkgs="lldb clang"
|
||||
;;
|
||||
*)
|
||||
pkgs="$pkgs gcc gcc-libs gcc-libgfortran"
|
||||
pkgs="gcc gcc-libs gcc-libgfortran"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -1129,11 +1116,19 @@ windows_installdeps() {
|
|||
*i686*)
|
||||
pkgs="$pkgs nasm"
|
||||
;;
|
||||
*)
|
||||
pkgs="$pkgs FAudio"
|
||||
;;
|
||||
esac
|
||||
|
||||
pkgs="$pkgs SDL2 sfml wxWidgets3.2 zlib binutils cmake crt-git extra-cmake-modules headers-git make pkgconf tools-git windows-default-manifest libmangle-git ninja gdb ccache"
|
||||
pkgs="$pkgs SDL2 sfml wxWidgets3.2 zlib binutils cmake crt-git headers-git make pkgconf tools-git windows-default-manifest libmangle-git ninja gdb ccache openal"
|
||||
|
||||
case "$target" in
|
||||
*x86_64)
|
||||
pkgs="$pkgs extra-cmake-modules"
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$ENABLE_OPENAL" ] && pkgs="$pkgs openal"
|
||||
[ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs ffmpeg"
|
||||
|
||||
set --
|
||||
|
@ -1198,7 +1193,7 @@ brew_installdeps() {
|
|||
|
||||
check brew -v update
|
||||
|
||||
brews="nasm cmake ccache gettext pkg-config sdl2 wxwidgets ccache ninja"
|
||||
brews="nasm cmake ccache gettext pkg-config sdl2 wxwidgets faudio ccache ninja zlib"
|
||||
|
||||
[ -n "$ENABLE_FFMPEG" ] && brews="$brews ffmpeg"
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
IF(ENABLE_WX)
|
||||
add_subdirectory(wxvbam)
|
||||
ENDIF(ENABLE_WX)
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
if(NOT TRANSLATIONS_ONLY AND NOT ENABLE_WX)
|
||||
return()
|
||||
endif()
|
||||
|
||||
file(GLOB po_files "${CMAKE_CURRENT_SOURCE_DIR}/*.po")
|
||||
|
||||
gettext_create_translations(
|
||||
wxvbam.pot
|
||||
${po_files}
|
||||
)
|
||||
|
||||
add_dependencies(visualboyadvance-m translations)
|
||||
gettext_create_translations(wxvbam.pot ${po_files})
|
||||
|
|
4323
po/wxvbam/aa_DJ.po
4323
po/wxvbam/aa_DJ.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/ab.po
4323
po/wxvbam/ab.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/ace.po
4323
po/wxvbam/ace.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/af.po
4323
po/wxvbam/af.po
File diff suppressed because it is too large
Load Diff
4326
po/wxvbam/ar.po
4326
po/wxvbam/ar.po
File diff suppressed because it is too large
Load Diff
4011
po/wxvbam/bg.po
4011
po/wxvbam/bg.po
File diff suppressed because it is too large
Load Diff
3993
po/wxvbam/br.po
3993
po/wxvbam/br.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/bs.po
4323
po/wxvbam/bs.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/ca.po
4323
po/wxvbam/ca.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/ca_ES.po
4323
po/wxvbam/ca_ES.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/cmn.po
4323
po/wxvbam/cmn.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/co.po
4323
po/wxvbam/co.po
File diff suppressed because it is too large
Load Diff
3993
po/wxvbam/cs.po
3993
po/wxvbam/cs.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/cs_CZ.po
4323
po/wxvbam/cs_CZ.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/da.po
4323
po/wxvbam/da.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/da_DK.po
4323
po/wxvbam/da_DK.po
File diff suppressed because it is too large
Load Diff
3290
po/wxvbam/de.po
3290
po/wxvbam/de.po
File diff suppressed because it is too large
Load Diff
4326
po/wxvbam/de_DE.po
4326
po/wxvbam/de_DE.po
File diff suppressed because it is too large
Load Diff
4036
po/wxvbam/el.po
4036
po/wxvbam/el.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/en_AU.po
4323
po/wxvbam/en_AU.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/en_BR.po
4323
po/wxvbam/en_BR.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/en_ES.po
4323
po/wxvbam/en_ES.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/en_FR.po
4323
po/wxvbam/en_FR.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/en_GB.po
4323
po/wxvbam/en_GB.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/en_JP.po
4323
po/wxvbam/en_JP.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/en_MX.po
4323
po/wxvbam/en_MX.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/en_PL.po
4323
po/wxvbam/en_PL.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/en_SI.po
4323
po/wxvbam/en_SI.po
File diff suppressed because it is too large
Load Diff
1280
po/wxvbam/en_US.po
1280
po/wxvbam/en_US.po
File diff suppressed because it is too large
Load Diff
4324
po/wxvbam/eo.po
4324
po/wxvbam/eo.po
File diff suppressed because it is too large
Load Diff
3107
po/wxvbam/es.po
3107
po/wxvbam/es.po
File diff suppressed because it is too large
Load Diff
3165
po/wxvbam/es_419.po
3165
po/wxvbam/es_419.po
File diff suppressed because it is too large
Load Diff
4326
po/wxvbam/es_AR.po
4326
po/wxvbam/es_AR.po
File diff suppressed because it is too large
Load Diff
4327
po/wxvbam/es_CL.po
4327
po/wxvbam/es_CL.po
File diff suppressed because it is too large
Load Diff
1280
po/wxvbam/es_CO.po
1280
po/wxvbam/es_CO.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/es_CR.po
4323
po/wxvbam/es_CR.po
File diff suppressed because it is too large
Load Diff
4324
po/wxvbam/es_CU.po
4324
po/wxvbam/es_CU.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/es_EC.po
4323
po/wxvbam/es_EC.po
File diff suppressed because it is too large
Load Diff
4329
po/wxvbam/es_ES.po
4329
po/wxvbam/es_ES.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/es_HN.po
4323
po/wxvbam/es_HN.po
File diff suppressed because it is too large
Load Diff
4331
po/wxvbam/es_MX.po
4331
po/wxvbam/es_MX.po
File diff suppressed because it is too large
Load Diff
1280
po/wxvbam/es_PE.po
1280
po/wxvbam/es_PE.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/es_PR.po
4323
po/wxvbam/es_PR.po
File diff suppressed because it is too large
Load Diff
1280
po/wxvbam/es_US.po
1280
po/wxvbam/es_US.po
File diff suppressed because it is too large
Load Diff
4323
po/wxvbam/es_UY.po
4323
po/wxvbam/es_UY.po
File diff suppressed because it is too large
Load Diff
4325
po/wxvbam/es_VE.po
4325
po/wxvbam/es_VE.po
File diff suppressed because it is too large
Load Diff
4325
po/wxvbam/fa.po
4325
po/wxvbam/fa.po
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue