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.

35 lines
737 B

5 years ago
  1. import os
  2. Import("globalEnv")
  3. env = globalEnv.Clone()
  4. env["QBSCXX_SRC"] = os.path.join(env["QBSCXXPATH"], "qbscxx")
  5. cmake_build_path = os.path.join(env["QBSCXX_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["QBSCXX_LIB_PATH"]):
  9. os.makedirs(env["QBSCXX_LIB_PATH"])
  10. cwd = os.getcwd()
  11. os.chdir(cmake_build_path)
  12. cmakeCall = "cmake -DCMAKE_BUILD_TYPE={} ".format(env["BUILD_TYPE"])
  13. #cmakeCall += "-DCMAKE_INSTALL_PREFIX=" + env["QBSCXX_LIB_PATH"] + " "
  14. cmakeCall += env["QBSCXX_SRC"]
  15. os.system(cmakeCall)
  16. os.system("make")
  17. #os.system("make install")
  18. env.Install(env["QBSCXX_LIB_PATH"], [os.path.join("cmake_build", "libqbsolv.a")])
  19. os.chdir(cwd)