mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-05-04 03:23:56 +00:00
Some checks are pending
CI / clang-format (push) Waiting to run
CI / ${{ matrix.name }} (false, --toolchain $GITHUB_WORKSPACE/CMake/i586-pc-msdosdjgpp.cmake, false, true, false, Ninja, DOS, ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, --toolchain /usr/local/vitasdk/share/vita.toolchain.cmake, false, false, Ninja, Vita, ubuntu-latest, true, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.26100.0, false, false, Visual Studio 17 2022, true, Xbox One, windows-latest, amd64, false, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake, false, devkitpro/devkitarm:latest, false, Ninja, true, Nintendo 3DS, ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake, false, devkitpro/devkita64:latest, false, Ninja, Nintendo Switch, true, ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, emcmake, false, false, true, Ninja, Emscripten, ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (false, false, false, Ninja, true, MSVC (arm64), windows-latest, amd64_arm64, false) (push) Waiting to run
CI / ${{ matrix.name }} (false, false, true, Ninja, true, MSVC (x86), windows-latest, amd64_x86, false) (push) Waiting to run
CI / ${{ matrix.name }} (false, true, false, Ninja, true, MSVC (x64), windows-latest, amd64, false) (push) Waiting to run
CI / ${{ matrix.name }} (false, true, true, false, Ninja, true, MSVC (x64 Debug), windows-latest, amd64, false) (push) Waiting to run
CI / ${{ matrix.name }} (true, false, -DCMAKE_SYSTEM_NAME=iOS, false, false, Xcode, true, iOS, macos-15, true) (push) Waiting to run
CI / ${{ matrix.name }} (true, false, false, false, Ninja, Android, ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (true, false, true, false, Ninja, macOS, macos-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (true, true, false, Ninja, true, mingw-w64-x86_64, mingw64, msys2 mingw64, windows-latest, msys2 {0}, true) (push) Waiting to run
CI / ${{ matrix.name }} (true, true, true, false, Ninja, true, Linux (Debug), ubuntu-latest, true) (push) Waiting to run
CI / ${{ matrix.name }} (true, true, true, false, Ninja, true, Linux, ubuntu-latest, true) (push) Waiting to run
CI / FreeBSD (push) Waiting to run
CI / Flatpak (${{ matrix.arch }}) (aarch64, ubuntu-22.04-arm) (push) Waiting to run
CI / Flatpak (${{ matrix.arch }}) (x86_64, ubuntu-latest) (push) Waiting to run
CI / C++ (push) Waiting to run
CI / Release (push) Blocked by required conditions
Docker / Publish web port (push) Waiting to run
Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
82 lines
3.1 KiB
CMake
82 lines
3.1 KiB
CMake
set(CMAKE_SYSTEM_NAME DOS)
|
|
|
|
set(DJGPP TRUE)
|
|
|
|
# CMake's Platform/DOS.cmake assumes OpenWatcom naming conventions (no prefix,
|
|
# .lib suffix). DJGPP uses standard Unix/GCC conventions for its system
|
|
# libraries (lib prefix, .a suffix — e.g. libm.a), so we override the platform
|
|
# defaults via CMAKE_USER_MAKE_RULES_OVERRIDE, which runs *after* the platform
|
|
# module has set its defaults, giving us the final say on these variables.
|
|
# The path must be cached because CMake re-parses the toolchain file during
|
|
# try_compile, where CMAKE_CURRENT_LIST_DIR may point elsewhere.
|
|
set(DJGPP_PLATFORM_OVERRIDES "${CMAKE_CURRENT_LIST_DIR}/djgpp-platform-overrides.cmake" CACHE FILEPATH "" FORCE)
|
|
set(CMAKE_USER_MAKE_RULES_OVERRIDE "${DJGPP_PLATFORM_OVERRIDES}")
|
|
|
|
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
|
|
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
|
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
|
set(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
|
|
set(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
|
|
set(CMAKE_IMPORT_LIBRARY_SUFFIX ".a")
|
|
set(CMAKE_EXECUTABLE_SUFFIX ".exe")
|
|
set(CMAKE_LINK_LIBRARY_SUFFIX "")
|
|
set(CMAKE_DL_LIBS "")
|
|
|
|
set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
|
|
|
#
|
|
# CMake toolchain file for DJGPP. Usage:
|
|
#
|
|
# 1. Download and extract DGJPP
|
|
# 2. Add directory containing i586-pc-msdosdjgpp-gcc to PATH environment variable
|
|
# 3. When configuring your CMake project, specify the toolchain file like this:
|
|
#
|
|
# cmake -DCMAKE_TOOLCHAIN_FILE=path/to/i586-pc-msdosdjgpp.cmake ...
|
|
#
|
|
|
|
# specify the cross compiler
|
|
find_program(CMAKE_C_COMPILER NAMES "i586-pc-msdosdjgpp-gcc" "i386-pc-msdosdjgpp-gcc" REQUIRED)
|
|
find_program(CMAKE_CXX_COMPILER NAMES "i586-pc-msdosdjgpp-g++" "i386-pc-msdosdjgpp-g++" REQUIRED)
|
|
|
|
execute_process(COMMAND "${CMAKE_C_COMPILER}" -print-search-dirs
|
|
RESULT_VARIABLE CC_SEARCH_DIRS_RESULT
|
|
OUTPUT_VARIABLE CC_SEARCH_DIRS_OUTPUT)
|
|
|
|
if(CC_SEARCH_DIRS_RESULT)
|
|
message(FATAL_ERROR "Could not determine search dirs")
|
|
endif()
|
|
|
|
string(REGEX MATCH ".*libraries: (.*).*" CC_SD_LIBS "${CC_SEARCH_DIRS_OUTPUT}")
|
|
string(STRIP "${CMAKE_MATCH_1}" CC_SEARCH_DIRS)
|
|
string(REPLACE ":" ";" CC_SEARCH_DIRS "${CC_SEARCH_DIRS}")
|
|
|
|
foreach(CC_SEARCH_DIR ${CC_SEARCH_DIRS})
|
|
if(CC_SEARCH_DIR MATCHES "=.*")
|
|
string(REGEX MATCH "=(.*)" CC_LIB "${CC_SEARCH_DIR}")
|
|
set(CC_SEARCH_DIR "${CMAKE_MATCH_1}")
|
|
endif()
|
|
if(IS_DIRECTORY "${CC_SEARCH_DIR}")
|
|
if(IS_DIRECTORY "${CC_SEARCH_DIR}/../include" OR IS_DIRECTORY "${CC_SEARCH_DIR}/../lib" OR IS_DIRECTORY "${CC_SEARCH_DIR}/../bin")
|
|
list(APPEND CC_ROOTS "${CC_SEARCH_DIR}/..")
|
|
else()
|
|
list(APPEND CC_ROOTS "${CC_SEARCH_DIR}")
|
|
endif()
|
|
endif()
|
|
endforeach()
|
|
|
|
list(APPEND CMAKE_FIND_ROOT_PATH ${CC_ROOTS})
|
|
|
|
# search for programs in the host directories
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
|
|
# for libraries, headers and packages in the target directories
|
|
if(NOT DEFINED CACHE{CMAKE_FIND_ROOT_PATH_MODE_LIBRARY})
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
endif()
|
|
if(NOT DEFINED CACHE{CMAKE_FIND_ROOT_PATH_MODE_INCLUDE})
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
endif()
|
|
if(NOT DEFINED CACHE{CMAKE_FIND_ROOT_PATH_MODE_PACKAGE})
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
endif() |