Build libsodium with ccache and fPIC

fPIC is needed in case we are building a shared liblokinet (within which
we want the static libsodium).
pull/1273/head
Jason Rhinelander 4 years ago
parent c5faa86926
commit fa794e64cd

@ -13,10 +13,13 @@ file(MAKE_DIRECTORY ${LIBSODIUM_PREFIX}/include)
include(ExternalProject)
include(ProcessorCount)
set(sodium_cc ${CMAKE_C_COMPILER})
if(CCACHE_PROGRAM)
set(sodium_cc "${CCACHE_PROGRAM} ${sodium_cc}")
endif()
set(SODIUM_CONFIGURE ./configure --prefix=${LIBSODIUM_PREFIX} --enable-static --disable-shared --with-pic --quiet CC=${sodium_cc})
if (CMAKE_C_COMPILER_ARG1)
set(SODIUM_CONFIGURE ./configure --prefix=${LIBSODIUM_PREFIX} --enable-static --disable-shared CC=${CMAKE_C_COMPILER} CPPFLAGS=${CMAKE_C_COMPILER_ARG1})
else()
set(SODIUM_CONFIGURE ./configure --prefix=${LIBSODIUM_PREFIX} --enable-static --disable-shared CC=${CMAKE_C_COMPILER})
set(SODIUM_CONFIGURE ${SODIUM_CONFIGURE} CPPFLAGS=${CMAKE_C_COMPILER_ARG1})
endif()
if (CROSS_TARGET)

Loading…
Cancel
Save