From b8ca51fd01a68b9b6040f8c3c631eedefd7d7735 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Thu, 10 May 2018 21:03:43 +0200 Subject: CMake: Don't create symlinks on unsupporting file systems (#539) Panders to the idiosyncrasies of my work flow: I have my raylib build directory mounted as a VirtualBox vboxfs for use with my Linux VM, but vboxfs doesn't support symlinks, while raylib shared library versioning on Unix expects symlinks to work. If this happens, library versioning is now disabled on Unix with an error message instead of just failing the build. --- src/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 64d7f1fd..f04e88f3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -101,9 +101,15 @@ if(${PLATFORM} MATCHES "PLATFORM_DESKTOP") set(CMAKE_MACOSX_RPATH ON) target_link_libraries(${RAYLIB}_shared ${LIBS_PRIVATE}) + if (UNIX AND ${FILESYSTEM_LACKS_SYMLINKS}) + MESSAGE(WARNING "Can't version UNIX shared library on file system without symlink support") + else() + set_target_properties(${RAYLIB}_shared PROPERTIES + VERSION ${PROJECT_VERSION} + SOVERSION ${API_VERSION} + ) + endif() set_target_properties(${RAYLIB}_shared PROPERTIES - VERSION ${PROJECT_VERSION} - SOVERSION ${API_VERSION} PUBLIC_HEADER "raylib.h" ) if(WIN32) -- cgit v1.2.3