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
15 lines
418 B
CMake
15 lines
418 B
CMake
include(CheckCCompilerFlag)
|
|
|
|
MESSAGE(STATUS "Pass")
|
|
|
|
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()
|