You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

36 lines
711 B

import os
import subprocess
Import('globalEnv')
env = globalEnv.Clone()
env['MONGOC_1_13_1_PATH'] = os.path.join(env['MONGOCPATH'], 'mongo-c-driver-1.13.1')
cmake_build_path = os.path.join(env['MONGOC_LIB_PATH'], 'cmake_build')
if not os.path.exists(cmake_build_path):
os.makedirs(cmake_build_path)
if not os.path.exists(env["MONGOC_LIB_PATH"]):
os.makedirs(env["MONGOC_LIB_PATH"])
cwd = os.getcwd()
os.chdir(cmake_build_path)
cmakeCall = "cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF "
cmakeCall += "-DCMAKE_INSTALL_PREFIX=" + env["MONGOC_LIB_PATH"] + " "
cmakeCall += env["MONGOC_1_13_1_PATH"]
print(cmakeCall)
os.system(cmakeCall)
os.system("make")
os.system("make install")
os.chdir(cwd)