diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e778a5c99..a7c070c905 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,9 +51,9 @@ endif(VISIBILITY_HIDDEN) add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE) if(NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE "Release" CACHE STRING + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (Release/Debug/RelWithDebInfo/MinSizeRe)" FORCE) -endif (NOT CMAKE_BUILD_TYPE) +endif(NOT CMAKE_BUILD_TYPE) if(CMAKE_BUILD_TYPE STREQUAL Debug) add_definitions(-D_DEBUG -ggdb) diff --git a/Externals/SOIL/CMakeLists.txt b/Externals/SOIL/CMakeLists.txt index 9657ba60f0..6291f9a0a4 100644 --- a/Externals/SOIL/CMakeLists.txt +++ b/Externals/SOIL/CMakeLists.txt @@ -4,3 +4,6 @@ set(SRCS image_DXT.c stb_image_aug.c) add_library(SOIL STATIC ${SRCS}) +if(UNIX) + add_definitions(-fPIC) +endif(UNIX)