03e7cebafc
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5792 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 727eabf7470ccdc1e3f63a4d228a3ed34abea68a Former-commit-id: 0dd11ac623a694b9362634be6f932dda1ef48e25
20 lines
772 B
Diff
20 lines
772 B
Diff
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt
|
|
index 576c304..725f164 100644
|
|
--- a/src/main/CMakeLists.txt
|
|
+++ b/src/main/CMakeLists.txt
|
|
@@ -30,6 +30,15 @@ ENDIF(MSVC)
|
|
|
|
SD_ADD_EXECUTABLE(${_TARGET_NAME} ${_SOURCES})
|
|
|
|
+# Force RPATH to use relative paths on Linux
|
|
+IF(UNIX)
|
|
+ IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,$ORIGIN/../lib64/games/speed-dreams-2/lib")
|
|
+ ELSE()
|
|
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,$ORIGIN/../lib/games/speed-dreams-2/lib")
|
|
+ ENDIF()
|
|
+ENDIF()
|
|
+
|
|
ADD_SDLIB_LIBRARY(${_TARGET_NAME} portability tgf tgfclient tgfdata)
|
|
|
|
# Needed when using the "MinGW Makefiles" CMake generator (but not with the "MSYS Makefiles" one !)
|