File tree 6 files changed +471
-3
lines changed
6 files changed +471
-3
lines changed Original file line number Diff line number Diff line change
1
+ build
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.20)
2
+
3
+ project (sdl_example)
4
+
5
+ find_package (SDL2 REQUIRED)
6
+ include_directories (${SDL2_INCLUDE_DIRS} )
7
+ find_package (ACCESSKIT REQUIRED)
8
+ include_directories (windows_example ${ACCESSKIT_INCLUDE_DIR} )
9
+
10
+ add_executable (hello_world hello_world.c)
11
+ target_link_libraries (hello_world PUBLIC ${SDL2_LIBRARIES} )
12
+ target_link_libraries (hello_world PUBLIC accesskit)
13
+ target_compile_definitions (hello_world PRIVATE -DUNICODE -D_UNICODE)
Original file line number Diff line number Diff line change
1
+ # AccessKit cross-platform SDL example
2
+
3
+ This example demonstrates how to make use of the C bindings to create cross-platform applications.
4
+
5
+ ## Building
6
+
7
+ The process will vary based on your operating system.
8
+
9
+ ### On Windows:
10
+
11
+ First download a copy of SDL2 and extract it.
12
+
13
+ ``` bash
14
+ cmake -S . -B build -DACCESSKIT_DIR=" ../.." -DSDL2_ROOT=" <PATH_TO_SDL2_INSTALLATION>/cmake"
15
+ cmake --build build --config Release
16
+ ```
17
+
18
+ You will then need to copy ` SDL2.dll ` into the ` build/Release ` folder.
19
+
20
+ ### On Linux
21
+
22
+ Make sure to install SDL2 and its development package.
23
+
24
+ ``` bash
25
+ cmake -S . -B build -DACCESSKIT_DIR=" ../.." -DCMAKE_BUILD_TYPE=Release
26
+ cmake --build build
27
+ ```
You can’t perform that action at this time.
0 commit comments