mirror of https://github.com/raysan5/raylib
CMake: accept standard -DBUILD_SHARED_LIBS as well
-DBUILD_SHARED_LIBS=OFF == -DSHARED=OFF -DSTATIC=ON -DBUILD_SHARED_LIBS=ON == -DSHARED=ON -DSTATIC=OFF Fixes #626.
This commit is contained in:
parent
93f68fa612
commit
2981713e4f
|
@ -84,6 +84,14 @@ if(NOT (STATIC OR SHARED))
|
|||
message(FATAL_ERROR "Nothing to do if both -DSHARED=OFF and -DSTATIC=OFF...")
|
||||
endif()
|
||||
|
||||
if (DEFINED BUILD_SHARED_LIBS)
|
||||
set(SHARED ${BUILD_SHARED_LIBS})
|
||||
if (${BUILD_SHARED_LIBS})
|
||||
set(STATIC OFF)
|
||||
else()
|
||||
set(STATIC ON)
|
||||
endif()
|
||||
endif()
|
||||
if(DEFINED SHARED_RAYLIB)
|
||||
set(SHARED ${SHARED_RAYLIB})
|
||||
message(DEPRECATION "-DSHARED_RAYLIB is deprecated. Please use -DSHARED instead.")
|
||||
|
|
Loading…
Reference in New Issue