summaryrefslogtreecommitdiff
path: root/libs/raylib/cmake
diff options
context:
space:
mode:
authorLucaSas <sas.luca.alex@gmail.com>2021-11-04 16:14:58 +0200
committerLucaSas <sas.luca.alex@gmail.com>2021-11-04 16:14:58 +0200
commitd96b4ebce5ee6245fa80d27d41b67aa56555c912 (patch)
treef28cb388a14c4bd9da8f4b57b213eb1539fc5367 /libs/raylib/cmake
parent6bcb1207addb4afe041c94e68e23c77175164956 (diff)
downloadgamejam-slgj-2024-d96b4ebce5ee6245fa80d27d41b67aa56555c912.tar.gz
gamejam-slgj-2024-d96b4ebce5ee6245fa80d27d41b67aa56555c912.tar.bz2
gamejam-slgj-2024-d96b4ebce5ee6245fa80d27d41b67aa56555c912.zip
Changed the template to now download raylib instead of having it in the repo.
Diffstat (limited to 'libs/raylib/cmake')
-rw-r--r--libs/raylib/cmake/AddIfFlagCompiles.cmake12
-rw-r--r--libs/raylib/cmake/BuildType.cmake43
-rw-r--r--libs/raylib/cmake/CheckFileSystemSymlinkSupport.cmake13
-rw-r--r--libs/raylib/cmake/EnumOption.cmake9
-rw-r--r--libs/raylib/cmake/LibraryPathToLinkerFlags.cmake24
-rw-r--r--libs/raylib/cmake/PopulateConfigVariablesLocally.cmake11
-rw-r--r--libs/raylib/cmake/emscripten.cmake15
-rw-r--r--libs/raylib/cmake/raylib-config-version.cmake21
-rw-r--r--libs/raylib/cmake/raylib-config.cmake76
-rw-r--r--libs/raylib/cmake/test-pkgconfig.sh21
10 files changed, 0 insertions, 245 deletions
diff --git a/libs/raylib/cmake/AddIfFlagCompiles.cmake b/libs/raylib/cmake/AddIfFlagCompiles.cmake
deleted file mode 100644
index 403607b..0000000
--- a/libs/raylib/cmake/AddIfFlagCompiles.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-include(CheckCCompilerFlag)
-function(add_if_flag_compiles flag)
- CHECK_C_COMPILER_FLAG("${flag}" COMPILER_HAS_THOSE_TOGGLES)
- set(outcome "Failed")
- if(COMPILER_HAS_THOSE_TOGGLES)
- foreach(var ${ARGN})
- set(${var} "${flag} ${${var}}" PARENT_SCOPE)
- endforeach()
- set(outcome "compiles")
- endif()
- message(STATUS "Testing if ${flag} can be used -- ${outcome}")
-endfunction()
diff --git a/libs/raylib/cmake/BuildType.cmake b/libs/raylib/cmake/BuildType.cmake
deleted file mode 100644
index 80ccdee..0000000
--- a/libs/raylib/cmake/BuildType.cmake
+++ /dev/null
@@ -1,43 +0,0 @@
-# Set a default build type if none was specified
-set(default_build_type "Release")
-if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
- set(default_build_type "Debug")
-endif()
-
-if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
- set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
- STRING "Choose the type of build." FORCE)
- # Set the possible values of build type for cmake-gui
- set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
- "MinSizeRel" "RelWithDebInfo")
-endif()
-
-# Taken from the https://github.com/OpenChemistry/tomviz project
-# Copyright (c) 2014-2017, Kitware, Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright notice, this
-# list of conditions and the following disclaimer.
-#
-# 2. 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.
-#
-# 3. Neither the name of the copyright holder nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# 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.
diff --git a/libs/raylib/cmake/CheckFileSystemSymlinkSupport.cmake b/libs/raylib/cmake/CheckFileSystemSymlinkSupport.cmake
deleted file mode 100644
index 798840e..0000000
--- a/libs/raylib/cmake/CheckFileSystemSymlinkSupport.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-# Populates a ${FILESYSTEM_LACKS_SYMLINKS} variable
-message(STATUS "Testing if file system supports symlinks")
-execute_process(
- COMMAND ${CMAKE_COMMAND} -E create_symlink CMakeLists.txt "${CMAKE_CURRENT_BINARY_DIR}/TestingIfSymlinkWorks"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- RESULT_VARIABLE FILESYSTEM_LACKS_SYMLINKS
-)
-If (FILESYSTEM_LACKS_SYMLINKS)
- message(STATUS "Testing if file system supports symlinks -- unsupported")
-else()
- message(STATUS "Testing if file system supports symlinks -- supported")
-endif()
-
diff --git a/libs/raylib/cmake/EnumOption.cmake b/libs/raylib/cmake/EnumOption.cmake
deleted file mode 100644
index d7d343f..0000000
--- a/libs/raylib/cmake/EnumOption.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-macro(enum_option var values description)
- set(${var}_VALUES ${values})
- list(GET ${var}_VALUES 0 default)
- set(${var} "${default}" CACHE STRING "${description}")
- set_property(CACHE ${var} PROPERTY STRINGS ${${var}_VALUES})
- if (NOT ";${${var}_VALUES};" MATCHES ";${${var}};")
- message(FATAL_ERROR "Unknown value ${${var}}. Only -D${var}=${${var}_VALUES} allowed.")
- endif()
-endmacro()
diff --git a/libs/raylib/cmake/LibraryPathToLinkerFlags.cmake b/libs/raylib/cmake/LibraryPathToLinkerFlags.cmake
deleted file mode 100644
index 05942b7..0000000
--- a/libs/raylib/cmake/LibraryPathToLinkerFlags.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-function(library_path_to_linker_flags LD_FLAGS LIB_PATHS)
- foreach(L ${LIB_PATHS})
- get_filename_component(DIR ${L} PATH)
- get_filename_component(LIBFILE ${L} NAME_WE)
- STRING(REGEX REPLACE "^lib" "" FILE ${LIBFILE})
-
- if (${L} MATCHES "[.]framework$")
- set(FILE_OPT "-framework ${FILE}")
- set(DIR_OPT "-F${DIR}")
- else()
- set(FILE_OPT "-l${FILE}")
- set(DIR_OPT "-L${DIR}")
- endif()
-
- if ("${DIR}" STREQUAL "" OR "${DIR}" STREQUAL "${LASTDIR}")
- set (DIR_OPT "")
- endif()
-
- set(LASTDIR ${DIR})
-
- set(${LD_FLAGS} ${${LD_FLAGS}} ${DIR_OPT} ${FILE_OPT} PARENT_SCOPE)
- string (REPLACE ";" " " ${LD_FLAGS} "${${LD_FLAGS}}")
- endforeach()
-endfunction()
diff --git a/libs/raylib/cmake/PopulateConfigVariablesLocally.cmake b/libs/raylib/cmake/PopulateConfigVariablesLocally.cmake
deleted file mode 100644
index 151070e..0000000
--- a/libs/raylib/cmake/PopulateConfigVariablesLocally.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-macro(populate_config_variables_locally target)
- get_property(raylib_INCLUDE_DIRS TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
- #get_property(raylib_LIBRARIES TARGET ${target} PROPERTY LOCATION) # only works for SHARED
- get_property(raylib_LDFLAGS TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES)
- get_property(raylib_DEFINITIONS TARGET ${target} PROPERTY DEFINITIONS)
-
- set(raylib_INCLUDE_DIRS "${raylib_INCLUDE_DIRS}" PARENT_SCOPE)
- #set(raylib_LIBRARIES "${raylib_INCLUDE_DIRS}" PARENT_SCOPE)
- set(raylib_LDFLAGS "${raylib_LDFLAGS}" PARENT_SCOPE)
- set(raylib_DEFINITIONS "${raylib_DEFINITIONS}" PARENT_SCOPE)
-endmacro()
diff --git a/libs/raylib/cmake/emscripten.cmake b/libs/raylib/cmake/emscripten.cmake
deleted file mode 100644
index 621ae78..0000000
--- a/libs/raylib/cmake/emscripten.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-SET(CMAKE_SYSTEM_NAME Linux)
-
-SET(CMAKE_C_COMPILER emcc)
-SET(CMAKE_CXX_COMPILER em++)
-if(NOT DEFINED CMAKE_AR)
- find_program(CMAKE_AR NAMES emar)
-endif()
-if(NOT DEFINED CMAKE_RANLIB)
- find_program(CMAKE_RANLIB NAMES emranlib)
-endif()
-
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
-set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
diff --git a/libs/raylib/cmake/raylib-config-version.cmake b/libs/raylib/cmake/raylib-config-version.cmake
deleted file mode 100644
index 74fd03c..0000000
--- a/libs/raylib/cmake/raylib-config-version.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-set(PACKAGE_VERSION "@PROJECT_VERSION@")
-
-if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
- set(PACKAGE_VERSION_EXACT TRUE)
-endif()
-if(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
- set(PACKAGE_VERSION_COMPATIBLE TRUE)
-else(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
- set(PACKAGE_VERSION_UNSUITABLE TRUE)
-endif(NOT PACKAGE_FIND_VERSION VERSION_GREATER PACKAGE_VERSION)
-
-# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
- return()
-endif()
-
-if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@")
- math(EXPR installedBits "8 * 8")
- set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
- set(PACKAGE_VERSION_UNSUITABLE TRUE)
-endif()
diff --git a/libs/raylib/cmake/raylib-config.cmake b/libs/raylib/cmake/raylib-config.cmake
deleted file mode 100644
index b535874..0000000
--- a/libs/raylib/cmake/raylib-config.cmake
+++ /dev/null
@@ -1,76 +0,0 @@
-# - Try to find raylib
-# Options:
-# raylib_USE_STATIC_LIBS - OFF by default
-# raylib_VERBOSE - OFF by default
-# Once done, this defines a raylib target that can be passed to
-# target_link_libraries as well as following variables:
-#
-# raylib_FOUND - System has raylib installed
-# raylib_INCLUDE_DIRS - The include directories for the raylib header(s)
-# raylib_LIBRARIES - The libraries needed to use raylib
-# raylib_LDFLAGS - The linker flags needed with raylib
-# raylib_DEFINITIONS - Compiler switches required for using raylib
-
-set(XPREFIX PC_RAYLIB)
-
-find_package(PkgConfig QUIET)
-pkg_check_modules(${XPREFIX} QUIET raylib)
-
-if (raylib_USE_STATIC_LIBS)
- set(XPREFIX ${XPREFIX}_STATIC)
-endif()
-
-set(raylib_DEFINITIONS ${${XPREFIX}_CFLAGS})
-
-find_path(raylib_INCLUDE_DIR
- NAMES raylib.h
- HINTS ${${XPREFIX}_INCLUDE_DIRS}
-)
-
-set(RAYLIB_NAMES raylib)
-
-if (raylib_USE_STATIC_LIBS)
- set(RAYLIB_NAMES libraylib.a raylib.lib ${RAYLIB_NAMES})
-endif()
-
-find_library(raylib_LIBRARY
- NAMES ${RAYLIB_NAMES}
- HINTS ${${XPREFIX}_LIBRARY_DIRS}
-)
-
-set(raylib_LIBRARIES ${raylib_LIBRARY})
-set(raylib_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
-set(raylib_LIBRARY_DIR ${raylib_LIBRARY_DIRS})
-set(raylib_INCLUDE_DIRS ${raylib_INCLUDE_DIR})
-set(raylib_LDFLAGS ${${XPREFIX}_LDFLAGS})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(raylib DEFAULT_MSG
- raylib_LIBRARY
- raylib_INCLUDE_DIR
-)
-
-mark_as_advanced(raylib_LIBRARY raylib_INCLUDE_DIR)
-
-if (raylib_USE_STATIC_LIBS)
- add_library(raylib STATIC IMPORTED GLOBAL)
-else()
- add_library(raylib SHARED IMPORTED GLOBAL)
-endif()
-string (REPLACE ";" " " raylib_LDFLAGS "${raylib_LDFLAGS}")
-
-set_target_properties(raylib
- PROPERTIES
- IMPORTED_LOCATION "${raylib_LIBRARIES}"
- INTERFACE_INCLUDE_DIRECTORIES "${raylib_INCLUDE_DIRS}"
- INTERFACE_LINK_LIBRARIES "${raylib_LDFLAGS}"
- INTERFACE_COMPILE_OPTIONS "${raylib_DEFINITIONS}"
-)
-
-if (raylib_VERBOSE)
- message(STATUS "raylib_FOUND: ${raylib_FOUND}")
- message(STATUS "raylib_INCLUDE_DIRS: ${raylib_INCLUDE_DIRS}")
- message(STATUS "raylib_LIBRARIES: ${raylib_LIBRARIES}")
- message(STATUS "raylib_LDFLAGS: ${raylib_LDFLAGS}")
- message(STATUS "raylib_DEFINITIONS: ${raylib_DEFINITIONS}")
-endif()
diff --git a/libs/raylib/cmake/test-pkgconfig.sh b/libs/raylib/cmake/test-pkgconfig.sh
deleted file mode 100644
index ccbdfb6..0000000
--- a/libs/raylib/cmake/test-pkgconfig.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-# Test if including/linking/running an installed raylib works
-
-set -x
-export LD_RUN_PATH=/usr/local/lib
-
-CFLAGS="-Wall -Wextra -Werror $CFLAGS"
-if [ "$ARCH" = "i386" ]; then
-CFLAGS="-m32 $CLFAGS"
-fi
-
-cat << EOF | ${CC:-cc} -otest -xc - $(pkg-config --libs --cflags $@ raylib.pc) $CFLAGS && exec ./test
-#include <stdlib.h>
-#include <raylib.h>
-
-int main(void)
-{
- int num = GetRandomValue(42, 1337);
- return 42 <= num && num <= 1337 ? EXIT_SUCCESS : EXIT_FAILURE;
-}
-EOF