Skip to content

Commit

Permalink
f:u
Browse files Browse the repository at this point in the history
  • Loading branch information
sangjanai committed May 23, 2024
1 parent d63b20f commit 9db7476
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion third-party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,22 @@ if (UNIX) # APPLE and LINUX
set(PYTHON_INSTALL_CONFIG_BUILD "--build=x86_64-apple-darwin")
endif()
set(PYTHON_INSTALL_CONFIG_SSL "--with-openssl=${THIRD_PARTY_INSTALL_PATH}")
set(CFS "")
set(LDS "")
else()
set(PYTHON_INSTALL_CONFIG_HOST "")
set(PYTHON_INSTALL_CONFIG_BUILD "")
set(PYTHON_INSTALL_CONFIG_SSL "--with-openssl=${THIRD_PARTY_INSTALL_PATH} --with-openssl-rpath=auto")
set(CFS "CFLAGS=-I${THIRD_PARTY_INSTALL_PATH}/include")
set(LDS "LDFLAGS=-L${THIRD_PARTY_INSTALL_PATH}/lib")
endif()

# Download and install Python3 from source
ExternalProject_Add(
Python3
URL https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tgz
PREFIX ${THIRD_PARTY_INSTALL_PATH}
CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR> --enable-optimizations --with-ensurepip=install --enable-shared ${PYTHON_INSTALL_CONFIG_HOST} ${PYTHON_INSTALL_CONFIG_BUILD} ${PYTHON_INSTALL_CONFIG_SSL}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env ${CFS} ${LDS} ./configure --prefix=<INSTALL_DIR> --enable-optimizations --with-ensurepip=install --enable-shared ${PYTHON_INSTALL_CONFIG_HOST} ${PYTHON_INSTALL_CONFIG_BUILD} ${PYTHON_INSTALL_CONFIG_SSL}
BUILD_COMMAND make -j12
INSTALL_COMMAND make install
BUILD_IN_SOURCE 1
Expand Down

0 comments on commit 9db7476

Please sign in to comment.