full update of the cmake configuration files

This commit is contained in:
Sylvain PILLOT 2022-08-30 11:42:07 +02:00
parent f8674ae41e
commit 5ecf100c20
10 changed files with 46 additions and 685 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/build-fx
/build-cg

View File

@ -1,16 +1,8 @@
# libSDL_prizm: build system
# libSDL: build system
cmake_minimum_required(VERSION 3.16)
project(LibSDL_prizm VERSION 1.2.15 LANGUAGES C)
# Libraries that libexample depends on
project(cSDL VERSION 1.2.15 LANGUAGES C)
find_package(Gint 2.9.0 REQUIRED)
# Turn include/config.h.in into a proper config.h where the @VAR@ have
# been replaced; this is how version numbers are maintained. libexample_VERSION
# is set to "1.0" by the project() command.
# Note that the input (config.h.in) is relative to the source dir, but the
# output (config.h) is in the build dir, so it doesn't pollute the Git repo.
configure_file(./include/SDL_config.h.in include/SDL/SDL_config.h)
set(SOURCES
@ -72,17 +64,14 @@ set(SOURCES
include_directories(
"${PROJECT_SOURCE_DIR}/include"
"${PROJECT_SOURCE_DIR}/include/SDL"
"${PROJECT_BINARY_DIR}/include"
"${FXSDK_INCLUDE}/SDL"
"${FXSDK_INCLUDE}")
add_compile_options(-Os -lm -m4-nofpu -mb -std=c11 -ffreestanding -nostdlib -Wa,--dsp)
"${PROJECT_SOURCE_DIR}/include/SDL")
# Target name is "SDL_prizm", output file is "libSDL_prizm.a" (by default)
add_library(SDL_prizm STATIC ${SOURCES})
# Target name is "cSDL", output file is "libcSDL.a" (by default)
add_library(cSDL STATIC ${SOURCES})
target_compile_options(cSDL PRIVATE -Os -std=c11)
# After building, install the target (that is, libSDL_prizm.a) in the compiler
install(TARGETS SDL_prizm
install(TARGETS cSDL
DESTINATION "${FXSDK_LIB}")
# Also install the headers (our include folder gets merged with the existing
@ -97,7 +86,7 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/SDL"
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/SDL/SDL_config.h"
DESTINATION "${FXSDK_INCLUDE}/SDL")
# Install FindSDL_prizm.cmake so that users can do find_package(LibSDL_prizm)
install(FILES cmake/FindSDL_prizm.cmake
# Install FindcSDL.cmake so that users can do find_package(LibcSDL)
install(FILES cmake/FindcSDL.cmake
DESTINATION "${FXSDK_CMAKE_MODULE_PATH}")

View File

@ -1,82 +0,0 @@
# Makefile to build the SDL library
INCLUDE = -I./include -I/home/sylvain/.local/share/giteapc/Lephenixnoir/sh-elf-gcc/lib/gcc/sh3eb-elf/11.1.0/include/openlibm/
CFLAGS = -O2 $(INCLUDE) -lm -m4-nofpu -mb -ffreestanding -nostdlib -Wa,--dsp
AR = sh-elf-gcc-ar
RANLIB = sh-elf-gcc-ranlib
CC = sh-elf-gcc
CONFIG_H = include/SDL_config.h
TARGET = libSDL_prizm.a
SOURCES = \
src/SDL.c \
src/SDL_error.c \
src/SDL_fatal.c \
src/audio/SDL_audio.c \
src/audio/SDL_audiocvt.c \
src/cpuinfo/SDL_cpuinfo.c \
src/events/SDL_active.c \
src/events/SDL_events.c \
src/events/SDL_expose.c \
src/events/SDL_keyboard.c \
src/events/SDL_mouse.c \
src/events/SDL_quit.c \
src/events/SDL_resize.c \
src/file/SDL_rwops.c \
src/joystick/SDL_joystick.c \
src/stdlib/SDL_getenv.c \
src/stdlib/SDL_iconv.c \
src/stdlib/SDL_malloc.c \
src/stdlib/SDL_qsort.c \
src/stdlib/SDL_stdlib.c \
src/stdlib/SDL_string.c \
src/thread/SDL_thread.c \
src/thread/generic/SDL_syscond.c \
src/thread/generic/SDL_sysmutex.c \
src/thread/generic/SDL_syssem.c \
src/thread/generic/SDL_systhread.c \
src/timer/SDL_timer.c \
src/timer/prizm/SDL_systimer.c \
src/video/SDL_blit.c \
src/video/SDL_blit_0.c \
src/video/SDL_blit_1.c \
src/video/SDL_blit_A.c \
src/video/SDL_blit_N.c \
src/video/SDL_bmp.c \
src/video/SDL_cursor.c \
src/video/SDL_gamma.c \
src/video/SDL_pixels.c \
src/video/SDL_RLEaccel.c \
src/video/SDL_stretch.c \
src/video/SDL_surface.c \
src/video/SDL_video.c \
src/video/SDL_yuv.c \
src/video/SDL_yuv_mmx.c \
src/video/SDL_yuv_sw.c \
src/video/prizm/SDL_prizmevents.c \
src/video/prizm/SDL_prizmfonts.c \
src/video/prizm/SDL_prizmnti.c \
src/video/prizm/SDL_prizmutils.c \
src/video/prizm/SDL_prizmvideo.c \
src/gfx/SDL_framerate.c \
src/gfx/SDL_gfxBlitFunc.c \
src/gfx/SDL_gfxPrimitives.c \
src/gfx/SDL_imageFilter.c \
src/gfx/SDL_rotozoom.c \
OBJECTS = $(SOURCES:.c=.o)
all: $(TARGET)
$(TARGET): $(OBJECTS)
#cp $(CONFIG_H).default $(CONFIG_H)
$(AR) cr $@ $^
$(RANLIB) $@
#$(STRIP) --strip-unneeded $@
.c.o:
$(CC) $(INCLUDE) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS) $(TARGET)

View File

@ -2,18 +2,24 @@
Need to have a fully working gcc toolchain for SH3/SH4 architecture.
Compilation is done by using the adhoc Makefile :
`make -f Makefile.prizm` in the main directory
You can use the `giteapc install Slyvtt/cSDL` command to get an automatic install
It should produce the library libSDL_prizm.a
The following steps are not automatically done, so please proceed with the following manipulations :
* copy the library libSDL_prizm.a into your SH3/SH4 compiler lib folder
* copy all header files contained in the include/SDL folder into the include folder of the SH3/SH4 compiler
## Using in a program
You can also use the `gitea install Slyvtt/cSDL1_2_15` command to get an automatic install
With CMake
when you compile a program for use with SDL, do not forget to add a `-lSDL_prizm` option in your compilator command line.
```cmake
find_package(cSDL 1.2.15 REQUIRED)
target_link_libraries(<TARGET> PRIVATE cSDL::cSDL)
```
and then a `#include <SDL/SDL.h>` in your C/C++ sources
With make, the following steps are not automatically done, so please proceed with the following manipulations :
* copy the library `libcSDL.a` into your SH3/SH4 compiler lib folder
* copy all header files `*.h` in the include folder `include/SDL` of the SH3/SH4 compiler
* link with `-lcSDL`
In the C/C++ sources `#include <SDL/SDL.h>`

4
build
View File

@ -1,4 +0,0 @@
make -f Makefile.prizm clean
make -f Makefile.prizm
cp libSDL_prizm.a ~/.local/share/giteapc/Lephenixnoir/sh-elf-gcc/lib/gcc/sh3eb-elf/11.1.0/
cp ./include/* ~/.local/share/giteapc/Lephenixnoir/sh-elf-gcc/lib/gcc/sh3eb-elf/11.1.0/include/SDL/

View File

@ -1,248 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="cSDL1_2_15" />
<Option pch_mode="2" />
<Option compiler="null" />
<Build>
<Target title="Release">
<Option output="bin/Release/cSDL1_2_15" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="null" />
</Target>
</Build>
<Unit filename="Makefile.prizm" />
<Unit filename="README.md" />
<Unit filename="TODO.txt" />
<Unit filename="cSDL1_2_15.layout" />
<Unit filename="include/SDL/SDL.h" />
<Unit filename="include/SDL/SDL_active.h" />
<Unit filename="include/SDL/SDL_audio.h" />
<Unit filename="include/SDL/SDL_byteorder.h" />
<Unit filename="include/SDL/SDL_cdrom.h" />
<Unit filename="include/SDL/SDL_config_minimal.h" />
<Unit filename="include/SDL/SDL_config_prizm.h" />
<Unit filename="include/SDL/SDL_copying.h" />
<Unit filename="include/SDL/SDL_cpuinfo.h" />
<Unit filename="include/SDL/SDL_endian.h" />
<Unit filename="include/SDL/SDL_error.h" />
<Unit filename="include/SDL/SDL_events.h" />
<Unit filename="include/SDL/SDL_framerate.h" />
<Unit filename="include/SDL/SDL_getenv.h" />
<Unit filename="include/SDL/SDL_gfxBlitFunc.h" />
<Unit filename="include/SDL/SDL_gfxPrimitives.h" />
<Unit filename="include/SDL/SDL_gfxPrimitives_font.h" />
<Unit filename="include/SDL/SDL_imageFilter.h" />
<Unit filename="include/SDL/SDL_joystick.h" />
<Unit filename="include/SDL/SDL_keyboard.h" />
<Unit filename="include/SDL/SDL_keysym.h" />
<Unit filename="include/SDL/SDL_loadso.h" />
<Unit filename="include/SDL/SDL_main.h" />
<Unit filename="include/SDL/SDL_mouse.h" />
<Unit filename="include/SDL/SDL_mutex.h" />
<Unit filename="include/SDL/SDL_name.h" />
<Unit filename="include/SDL/SDL_opengl.h" />
<Unit filename="include/SDL/SDL_platform.h" />
<Unit filename="include/SDL/SDL_quit.h" />
<Unit filename="include/SDL/SDL_rotozoom.h" />
<Unit filename="include/SDL/SDL_rwops.h" />
<Unit filename="include/SDL/SDL_stdinc.h" />
<Unit filename="include/SDL/SDL_syswm.h" />
<Unit filename="include/SDL/SDL_thread.h" />
<Unit filename="include/SDL/SDL_timer.h" />
<Unit filename="include/SDL/SDL_types.h" />
<Unit filename="include/SDL/SDL_version.h" />
<Unit filename="include/SDL/SDL_video.h" />
<Unit filename="include/SDL/begin_code.h" />
<Unit filename="include/SDL/close_code.h" />
<Unit filename="include/doxyfile" />
<Unit filename="src/SDL.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/SDL_error.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/SDL_error_c.h" />
<Unit filename="src/SDL_fatal.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/SDL_fatal.h" />
<Unit filename="src/audio/SDL_audio.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/audio/SDL_audio_c.h" />
<Unit filename="src/audio/SDL_audiocvt.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/audio/SDL_audiomem.h" />
<Unit filename="src/audio/SDL_sysaudio.h" />
<Unit filename="src/cpuinfo/SDL_cpuinfo.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/events/SDL_active.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/events/SDL_events.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/events/SDL_events_c.h" />
<Unit filename="src/events/SDL_expose.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/events/SDL_keyboard.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/events/SDL_mouse.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/events/SDL_quit.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/events/SDL_resize.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/events/SDL_sysevents.h" />
<Unit filename="src/file/SDL_rwops.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/joystick/SDL_joystick.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/joystick/SDL_joystick_c.h" />
<Unit filename="src/joystick/SDL_sysjoystick.h" />
<Unit filename="src/stdlib/SDL_getenv.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/stdlib/SDL_iconv.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/stdlib/SDL_malloc.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/stdlib/SDL_qsort.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/stdlib/SDL_stdlib.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/stdlib/SDL_string.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/thread/SDL_systhread.h" />
<Unit filename="src/thread/SDL_thread.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/thread/SDL_thread_c.h" />
<Unit filename="src/thread/generic/SDL_syscond.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/thread/generic/SDL_sysmutex.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/thread/generic/SDL_sysmutex_c.h" />
<Unit filename="src/thread/generic/SDL_syssem.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/thread/generic/SDL_systhread.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/thread/generic/SDL_systhread_c.h" />
<Unit filename="src/timer/SDL_systimer.h" />
<Unit filename="src/timer/SDL_timer.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/timer/SDL_timer_c.h" />
<Unit filename="src/timer/prizm/SDL_systimer.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_RLEaccel.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_RLEaccel_c.h" />
<Unit filename="src/video/SDL_blit.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_blit.h" />
<Unit filename="src/video/SDL_blit_0.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_blit_1.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_blit_A.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_blit_N.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_bmp.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_cursor.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_cursor_c.h" />
<Unit filename="src/video/SDL_gamma.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_glfuncs.h" />
<Unit filename="src/video/SDL_leaks.h" />
<Unit filename="src/video/SDL_pixels.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_pixels_c.h" />
<Unit filename="src/video/SDL_stretch.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_stretch_c.h" />
<Unit filename="src/video/SDL_surface.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_sysvideo.h" />
<Unit filename="src/video/SDL_video.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_yuv.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_yuv_mmx.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_yuv_sw.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/SDL_yuv_sw_c.h" />
<Unit filename="src/video/SDL_yuvfuncs.h" />
<Unit filename="src/video/blank_cursor.h" />
<Unit filename="src/video/default_cursor.h" />
<Unit filename="src/video/e_log.h" />
<Unit filename="src/video/e_pow.h" />
<Unit filename="src/video/e_sqrt.h" />
<Unit filename="src/video/math_private.h" />
<Unit filename="src/video/mmx.h" />
<Unit filename="src/video/prizm/SDL_prizmevents.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/prizm/SDL_prizmevents_c.h" />
<Unit filename="src/video/prizm/SDL_prizmfonts.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/prizm/SDL_prizmfonts.h" />
<Unit filename="src/video/prizm/SDL_prizmnti.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/prizm/SDL_prizmnti.h" />
<Unit filename="src/video/prizm/SDL_prizmutils.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/prizm/SDL_prizmvideo.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="src/video/prizm/SDL_prizmvideo.h" />
<Extensions>
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>

View File

@ -1,267 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Release" />
<File name="src/events/SDL_keyboard.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14509" topLine="194" />
</Cursor>
<Folding>
<Collapse line="58" />
<Collapse line="337" />
<Collapse line="342" />
<Collapse line="357" />
<Collapse line="368" />
<Collapse line="374" />
<Collapse line="378" />
<Collapse line="383" />
<Collapse line="573" />
<Collapse line="596" />
<Collapse line="609" />
</Folding>
</File>
<File name="src/video/prizm/SDL_prizmnti.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="988" topLine="0" />
</Cursor>
<Folding>
<Collapse line="5" />
</Folding>
</File>
<File name="src/file/SDL_rwops.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11060" topLine="43" />
</Cursor>
<Folding>
<Collapse line="48" />
<Collapse line="186" />
<Collapse line="222" />
<Collapse line="269" />
<Collapse line="301" />
<Collapse line="323" />
<Collapse line="334" />
<Collapse line="379" />
<Collapse line="406" />
<Collapse line="426" />
<Collapse line="435" />
<Collapse line="440" />
<Collapse line="451" />
<Collapse line="456" />
<Collapse line="495" />
<Collapse line="544" />
<Collapse line="561" />
<Collapse line="578" />
<Collapse line="595" />
<Collapse line="606" />
<Collapse line="613" />
<Collapse line="620" />
<Collapse line="627" />
<Collapse line="634" />
<Collapse line="641" />
<Collapse line="648" />
<Collapse line="656" />
<Collapse line="661" />
<Collapse line="666" />
<Collapse line="671" />
<Collapse line="676" />
<Collapse line="681" />
</Folding>
</File>
<File name="src/video/prizm/SDL_prizmevents.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6421" topLine="150" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmevents_c.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1473" topLine="13" />
</Cursor>
<Folding>
<Collapse line="41" />
</Folding>
</File>
<File name="src/timer/SDL_timer_c.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="9" />
</Cursor>
</File>
<File name="src/video/SDL_video.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="29549" topLine="860" />
</Cursor>
<Folding>
<Collapse line="156" />
<Collapse line="1047" />
<Collapse line="1051" />
<Collapse line="1113" />
</Folding>
</File>
<File name="src/events/SDL_sysevents.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="src/video/SDL_sysvideo.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="12039" topLine="392" />
</Cursor>
</File>
<File name="src/video/SDL_surface.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14589" topLine="710" />
</Cursor>
</File>
<File name="src/events/SDL_events.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2769" topLine="6" />
</Cursor>
</File>
<File name="src/events/SDL_events_c.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="55" />
</Cursor>
</File>
<File name="src/stdlib/SDL_string.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7025" topLine="273" />
</Cursor>
</File>
<File name="Makefile.prizm" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="694" topLine="22" />
</Cursor>
</File>
<File name="include/SDL/begin_code.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1813" topLine="57" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmutils.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="307" topLine="0" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmvideo.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="11" />
</Cursor>
</File>
<File name="src/SDL.c" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1251" topLine="33" />
</Cursor>
</File>
<File name="src/video/SDL_blit_N.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="153" />
</Cursor>
</File>
<File name="src/video/SDL_blit.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1552" topLine="468" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmfonts.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="86166" topLine="0" />
</Cursor>
<Folding>
<Collapse line="8" />
<Collapse line="268" />
<Collapse line="528" />
<Collapse line="788" />
<Collapse line="1048" />
</Folding>
</File>
<File name="src/timer/SDL_systimer.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1134" topLine="3" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmvideo.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6352" topLine="195" />
</Cursor>
</File>
<File name="src/video/SDL_pixels.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8603" topLine="83" />
</Cursor>
<Folding>
<Collapse line="36" />
<Collapse line="38" />
<Collapse line="225" />
<Collapse line="238" />
<Collapse line="251" />
<Collapse line="266" />
<Collapse line="291" />
<Collapse line="313" />
<Collapse line="340" />
<Collapse line="342" />
<Collapse line="355" />
<Collapse line="357" />
<Collapse line="370" />
<Collapse line="404" />
<Collapse line="424" />
<Collapse line="436" />
<Collapse line="464" />
<Collapse line="489" />
<Collapse line="506" />
<Collapse line="530" />
<Collapse line="531" />
<Collapse line="542" />
<Collapse line="617" />
</Folding>
</File>
<File name="src/video/SDL_bmp.c" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2950" topLine="72" />
</Cursor>
<Folding>
<Collapse line="415" />
</Folding>
</File>
<File name="include/SDL/SDL_rwops.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3257" topLine="102" />
</Cursor>
</File>
<File name="src/video/SDL_blit_0.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="39" />
</Cursor>
<Folding>
<Collapse line="29" />
<Collapse line="82" />
<Collapse line="117" />
<Collapse line="154" />
<Collapse line="190" />
<Collapse line="242" />
<Collapse line="276" />
<Collapse line="309" />
<Collapse line="343" />
<Collapse line="388" />
<Collapse line="438" />
<Collapse line="443" />
</Folding>
</File>
<File name="src/SDL_error.c" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1176" topLine="0" />
</Cursor>
<Folding>
<Collapse line="50" />
<Collapse line="118" />
</Folding>
</File>
<File name="src/timer/prizm/SDL_systimer.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="4" zoom_2="0">
<Cursor>
<Cursor1 position="1839" topLine="63" />
</Cursor>
</File>
<File name="src/video/prizm/SDL_prizmfonts.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="113" topLine="2" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -1,49 +0,0 @@
find_package(Gint 2.7 REQUIRED)
# Find libexample.a; if we had platform-specific versions we could look for
# libexample-${FXSDK_PLATFORM}.a instead.
execute_process(
COMMAND ${CMAKE_C_COMPILER} -print-file-name=libSDL_prizm.a
OUTPUT_VARIABLE EX_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
# EX_PATH is now the full path if libustl.a exists, "libustl.a" otherwise
if(NOT "${EX_PATH}" STREQUAL "libSDL_prizm.a")
# Find the version.h header
execute_process(
COMMAND ${CMAKE_C_COMPILER} -print-file-name=include/ustl/config.h
OUTPUT_VARIABLE EX_CONFIG OUTPUT_STRIP_TRAILING_WHITESPACE)
# Extract version information from the config.h header. This command prints
# the version on the line matching the regex and deletes every other line.
execute_process(
COMMAND sed -E "s/#define.*EX_VERSION\\s+\"(\\S+)\"$/\\1/p; d" ${EX_CONFIG}
OUTPUT_VARIABLE EX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
# The commands above seem common for gint libraries, so the fxSDK provides a
# helper function to get that directly. We simply provide the archive name,
# header file name, macro name, and names for output variables.
# include(FindSimpleLibrary)
# find_simple_library(libexample.a include/example/config.h "EX_VERSION"
# PATH_VAR EX_PATH VERSION_VAR EX_VERSION)
# This CMake utility will handle the version comparisons and other checks. We
# just specify:
# -> Some variables that are defined only if the library is found (so if
# they're undefined, CMake will conclude libexample was not found)
# -> The version, so CMake can compare with the user's requested one
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibSDL_prizm
REQUIRED_VARS EX_CONFIG EX_VERSION
VERSION_VAR EX_VERSION)
# We now have a LibExample_FOUND variable, let's create the target that users
# can link against with target_link_libraries()
if(LibUstl_FOUND)
# This is an imported target, we don't build it, we just claim it's here
add_library(LibSDL_prizm::LibSDL_prizm UNKNOWN IMPORTED)
# Here we declare the compiler and linker flags that every user of LibExample
# needs to use.
set_target_properties(LibSDL_prizm::LibSDL_prizm PROPERTIES
# If we specify where the library comes from, CMake will watch that file
# and relink any user application when the library is updated!
IMPORTED_LOCATION "${EX_PATH}"
# Linking options
INTERFACE_LINK_OPTIONS -lSDL_prizm
# Dependencies (for order on the command-line)
IMPORTED_LINK_INTERFACE_LIBRARIES Gint::Gint)
endif()

19
cmake/FindcSDL.cmake Normal file
View File

@ -0,0 +1,19 @@
include(FindSimpleLibrary)
include(FindPackageHandleStandardArgs)
find_simple_library(libcSDL.a SDL_version.h _
PATH_VAR CSDL_PATH
OTHER_MACROS SDL_MAJOR_VERSION SDL_MINOR_VERSION SDL_PATCHLEVEL)
set(CSDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_PATCHLEVEL}")
find_package_handle_standard_args(cSDL
REQUIRED_VARS CSDL_PATH
VERSION_VAR CSDL_VERSION)
if(cSDL_FOUND)
add_library(cSDL::cSDL UNKNOWN IMPORTED)
set_target_properties(cSDL::cSDL PROPERTIES
IMPORTED_LOCATION "${CSDL_PATH}"
INTERFACE_LINK_OPTIONS -lcSDL)
endif()

View File

@ -3,24 +3,18 @@
configure:
@ fxsdk build-fx -c
@ fxsdk build-cg -c
build:
@ fxsdk build-fx
@ fxsdk build-cg
install:
@ fxsdk build-fx install
@ fxsdk build-cg install
uninstall:
@ if [ -e build-fx/install_manifest.txt ]; then \
xargs rm -f < build-fx/install_manifest.txt; \
fi
@ if [ -e build-cg/install_manifest.txt ]; then \
xargs rm -f < build-cg/install_manifest.txt; \
fi
.PHONY: configure build install uninstall