1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

Build libsodium with ccache and fPIC

fPIC is needed in case we are building a shared liblokinet (within which
we want the static libsodium).
This commit is contained in:
Jason Rhinelander 2020-05-17 17:06:45 -03:00
parent c5faa86926
commit fa794e64cd

View file

@ -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)