mirror of
https://github.com/glest/glest-source.git
synced 2025-08-23 16:32:53 +02:00
cure for errors like 'relocation R_X86_64_32 against '...' can not be used when making a shared object; recompile with -fPIC'
This commit is contained in:
@@ -75,6 +75,12 @@ FOREACH(ver_var VER_MAJOR;VER_MINOR;VER_PATCH;MEGAGLEST_VERSION)
|
|||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
MESSAGE(STATUS "Detected MegaGlest Version is [v${MEGAGLEST_VERSION}] ")
|
MESSAGE(STATUS "Detected MegaGlest Version is [v${MEGAGLEST_VERSION}] ")
|
||||||
|
|
||||||
|
SET(PIC_FLAG "${PIC_FLAG} -fPIC")
|
||||||
|
IF(WANT_STATIC_LIBS AND "${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||||
|
# CMAKE_SIZEOF_VOID_P=8 => 64bit
|
||||||
|
ADD_DEFINITIONS("${PIC_FLAG}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
## Compiler flags, CPACK configuration and other Apple specific code.
|
## Compiler flags, CPACK configuration and other Apple specific code.
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
|
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
|
||||||
|
Reference in New Issue
Block a user