Fix Out Of Tree error for Linux builds

This should also fix Travis
This commit is contained in:
Foereaper 2015-03-29 22:06:53 +02:00
parent a46150be98
commit 83ed9c72eb

View File

@ -89,12 +89,12 @@ if(WIN32)
elseif(UNIX) elseif(UNIX)
set(BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin) set(BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
set(LIBS_DIR ${CMAKE_INSTALL_PREFIX}/lib) set(LIBS_DIR ${CMAKE_INSTALL_PREFIX}/lib)
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
if (NOT NOJEM) # For Unix systems set the rpath so that libraries are found
set(JEMALLOC_LIBRARY "jemalloc") set(CMAKE_INSTALL_RPATH "${LIBS_DIR}")
message(STATUS "UNIX: Using jemalloc") set(CMAKE_INSTALL_NAME_DIR "${LIBS_DIR}")
endif() # Run out of build tree
endif() set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF)
# Add uninstall script and target # Add uninstall script and target
configure_file( configure_file(
@ -108,7 +108,6 @@ elseif(UNIX)
) )
if(CMAKE_C_COMPILER MATCHES "gcc" OR CMAKE_C_COMPILER_ID STREQUAL "GNU") if(CMAKE_C_COMPILER MATCHES "gcc" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
if(PLATFORM EQUAL 32) if(PLATFORM EQUAL 32)