import os Import("globalEnv") env = globalEnv.Clone() env["QBSCXX_SRC"] = os.path.join(env["QBSCXXPATH"], "qbscxx") cmake_build_path = os.path.join(env["QBSCXX_LIB_PATH"], "cmake_build") if not os.path.exists(cmake_build_path): os.makedirs(cmake_build_path) if not os.path.exists(env["QBSCXX_LIB_PATH"]): os.makedirs(env["QBSCXX_LIB_PATH"]) cwd = os.getcwd() os.chdir(cmake_build_path) cmakeCall = "cmake -DCMAKE_BUILD_TYPE={} ".format(env["BUILD_TYPE"]) #cmakeCall += "-DCMAKE_INSTALL_PREFIX=" + env["QBSCXX_LIB_PATH"] + " " cmakeCall += env["QBSCXX_SRC"] os.system(cmakeCall) os.system("make") #os.system("make install") env.Install(env["QBSCXX_LIB_PATH"], [os.path.join("cmake_build", "libqbsolv.a")]) os.chdir(cwd)