Closed humbertodias closed 11 months ago
Including allegro 4 statically into a project without any external dependency Such as was made on https://github.com/connorjclark/allegro-project for allegro 5
Tested on mac OS 14.0
# Allegro 4 include(FetchContent) FetchContent_Declare( allegro4 GIT_REPOSITORY https://github.com/humbertodias/Allegro-Legacy GIT_BRANCH master ) FetchContent_GetProperties(allegro4) if(NOT allegro4_POPULATED) FetchContent_Populate(allegro4) if (MSVC) set(SHARED ON) else() set(SHARED OFF) endif() add_subdirectory(${allegro4_SOURCE_DIR} ${allegro4_BINARY_DIR} EXCLUDE_FROM_ALL) endif()
cmake -DSHARED=OFF -S . -B build cmake --build build
[ 98%] Building C object CMakeFiles/allegro.dir/src/a5/midia5/midia5.c.o [ 99%] Building C object CMakeFiles/allegro.dir/src/a5/midia5/macos/coremidi.m.o [100%] Linking C static library lib/liballeg.dylib [100%] Built target allegro
Looks good. Thanks!
Feature
Including allegro 4 statically into a project without any external dependency Such as was made on https://github.com/connorjclark/allegro-project for allegro 5
Environment
Tested on mac OS 14.0
How to test