diff options
| author | hristo <[email protected]> | 2021-01-14 00:10:02 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-01-13 23:10:02 +0100 |
| commit | 9821725c6bafeaf4153ab8604e692dfe13cbff09 (patch) | |
| tree | 5dc264f722473f8f5f6c48dcfb4d1ada5761f501 /cmake/BuildType.cmake | |
| parent | 3d22709808fd9ba2843e6cad5e106bcd90eecaca (diff) | |
| download | raylib-9821725c6bafeaf4153ab8604e692dfe13cbff09.tar.gz raylib-9821725c6bafeaf4153ab8604e692dfe13cbff09.zip | |
Big cmake changes (#1514)
* Delete emscripten.cmake
This file is not needed at this point. EMSDK provides a toolchain file that has a lot more things in it and is better supported. Project currently works fine with the documentation provided in Emscripten SDK on how to build projects.
* First pass file separation.
The main two files are cleaner now. Only important things can be seen. Major changes include:
- raylib_static is now the alias instead of raylib
- Repeating segments are removed and pulled into separate files into <root>/cmake
- File is reordered to make more sense
- Installs are better structured
- Library is build into an output directory "raylib" instead of "src"
- All public header files are now set as a public header file
- Source files need to be listed (it is a bad practice to capture them using wildcards and file globs)
- CMakeLists are better commented
* Second pass on the example dirs.
They are quite complex so I'm more hesitant to do major changes. Also it works pretty well. Noticed that I forgot one of the seperated files and added it into src/CMakeLists.txt.
* Returned the header copy as it was convenient to have the public headers copied.
* A better description to the variable RAYLIB_IS_MAIN
Co-authored-by: Rob Loach <[email protected]>
* Remove debug message
Co-authored-by: Rob Loach <[email protected]>
* Improvements based on review.
* Simplify the install condition to not be platform specific as it was before.
Co-authored-by: Alexander Neumann <[email protected]>
* Remove some CMAKE variables as they don't affect the build in any way
Co-authored-by: Alexander Neumann <[email protected]>
Co-authored-by: Rob Loach <[email protected]>
Co-authored-by: Alexander Neumann <[email protected]>
Diffstat (limited to 'cmake/BuildType.cmake')
| -rw-r--r-- | cmake/BuildType.cmake | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/cmake/BuildType.cmake b/cmake/BuildType.cmake deleted file mode 100644 index 80ccdee2..00000000 --- a/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. |
