implemented basics
This commit is contained in:
36
contrib/mongoc/SConscript
Normal file
36
contrib/mongoc/SConscript
Normal file
@@ -0,0 +1,36 @@
|
||||
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)
|
||||
|
||||
|
Reference in New Issue
Block a user