diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 58783f464..ca54d26ee 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -123,11 +123,12 @@ if(NOT MSVC) if (PROFILER_LIBRARY) # set(PLATFORM_LIBS ${PLATFORM_LIBS} -Wl,--no-as-needed ${PROFILER_LIBRARY} -Wl,--as-needed) + set(PLATFORM_LIBS ${PLATFORM_LIBS} ${PROFILER_LIBRARY}) endif() if (TCMALLOC_LIBRARY) set(PLATFORM_LIBS ${PLATFORM_LIBS} ${TCMALLOC_LIBRARY}) - set(OTHER_FLAGS "${OTHER_FLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -Wl,--as-needed") + set(OTHER_FLAGS "${OTHER_FLAGS} -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free") endif() message(STATUS "Build with tcmalloc ${TCMALLOC_LIBRARY} ${PROFILER_LIBRARY}") @@ -384,6 +385,7 @@ if(ENABLE_LEVELDB) set(SNAPPY_BUILD_TESTS 0 CACHE INTERNAL "") set(SNAPPY_BUILD_BENCHMARKS 0 CACHE INTERNAL "") set(SNAPPY_INSTALL 0 CACHE INTERNAL "") + set(HAVE_TCMALLOC 0 CACHE INTERNAL "") add_subdirectory(${PROJECT_SOURCE_DIR}/external/snappy) set(SNAPPY_LIBRARY snappy) @@ -719,7 +721,8 @@ endif() #add_subdirectory(external/TinyTIFF/src) #set(TINYTIFF_LIRARY TinyTIFF) -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/libtiff/CMakeLists.txt) +option(ENABLE_TIFF "Enable tiff (feotiff for mapgen earth)" 1) +if(ENABLE_TIFF AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/libtiff/CMakeLists.txt) set(tiff-tools 0 CACHE INTERNAL "") set(tiff-tests 0 CACHE INTERNAL "") set(tiff-docs 0 CACHE INTERNAL "")