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

  1. import os
  2. import subprocess
  3. Import('globalEnv')
  4. env = globalEnv.Clone()
  5. env['MONGOC_1_13_1_PATH'] = os.path.join(env['MONGOCPATH'], 'mongo-c-driver-1.13.1')
  6. cmake_build_path = os.path.join(env['MONGOC_LIB_PATH'], 'cmake_build')
  7. if not os.path.exists(cmake_build_path):
  8. os.makedirs(cmake_build_path)
  9. if not os.path.exists(env["MONGOC_LIB_PATH"]):
  10. os.makedirs(env["MONGOC_LIB_PATH"])
  11. cwd = os.getcwd()
  12. os.chdir(cmake_build_path)
  13. cmakeCall = "cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF "
  14. cmakeCall += "-DCMAKE_INSTALL_PREFIX=" + env["MONGOC_LIB_PATH"] + " "
  15. cmakeCall += env["MONGOC_1_13_1_PATH"]
  16. print(cmakeCall)
  17. os.system(cmakeCall)
  18. os.system("make")
  19. os.system("make install")
  20. os.chdir(cwd)