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.

34 lines
755 B

  1. import os
  2. Import("globalEnv")
  3. env = globalEnv.Clone()
  4. env["MONGOCXX_SRC"] = os.path.join(env["MONGOCXXPATH"], "mongo-cxx-driver")
  5. cmake_build_path = os.path.join(env["MONGOCXX_LIB_PATH"], "cmake_build")
  6. if not os.path.exists(cmake_build_path):
  7. os.makedirs(cmake_build_path)
  8. if not os.path.exists(env["MONGOCXX_LIB_PATH"]):
  9. os.makedirs(env["MONGOCXX_LIB_PATH"])
  10. cwd = os.getcwd()
  11. os.chdir(cmake_build_path)
  12. cmakeCall = "cmake -DCMAKE_BUILD_TYPE=Release "
  13. cmakeCall += "-DCMAKE_INSTALL_PREFIX=" + env["MONGOCXX_LIB_PATH"] + " "
  14. cmakeCall += "-DCMAKE_PREFIX_PATH=" + env["MONGOC_LIB_PATH"] + " "
  15. cmakeCall += env["MONGOCXX_SRC"]
  16. os.system(cmakeCall)
  17. os.system("make EP_mnmlstc_core")
  18. os.system("make")
  19. os.system("make install")
  20. os.chdir(cwd)