diff options
| author | Ahmad Fatoum <[email protected]> | 2018-10-07 19:09:05 +0200 |
|---|---|---|
| committer | Ahmad Fatoum <[email protected]> | 2018-10-07 21:34:18 +0200 |
| commit | 2981713e4f368e1ddaca4340b0e3bafa3b41b604 (patch) | |
| tree | 757131b559f8dc6b06842e1df3730d6e90775cf9 /src/CMakeOptions.txt | |
| parent | 93f68fa61205c2d06ce9006eec0569133cd515ba (diff) | |
| download | raylib-2981713e4f368e1ddaca4340b0e3bafa3b41b604.tar.gz raylib-2981713e4f368e1ddaca4340b0e3bafa3b41b604.zip | |
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.
Diffstat (limited to 'src/CMakeOptions.txt')
| -rw-r--r-- | src/CMakeOptions.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/CMakeOptions.txt b/src/CMakeOptions.txt index 84643b28..d4ecb392 100644 --- a/src/CMakeOptions.txt +++ b/src/CMakeOptions.txt @@ -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.") |
