()
| 160 | |
| 161 | |
| 162 | def build_subprocess_executable(): |
| 163 | print("[buil_cpp_projects.py] Build executable: subprocess") |
| 164 | compiler = get_compiler(static=True) |
| 165 | sources = get_sources(SUBPROCESS_DIR, |
| 166 | exclude_names=["print_handler_gtk.cpp"]) |
| 167 | (changed, objects) = smart_compile(compiler, |
| 168 | macros=subprocess_MACROS, |
| 169 | extra_args=subprocess_COMPILER_ARGS, |
| 170 | sources=sources, |
| 171 | output_dir=BUILD_SUBPROCESS) |
| 172 | executable_path = os.path.join(BUILD_SUBPROCESS, |
| 173 | "subprocess" + EXECUTABLE_EXT) |
| 174 | if changed or not os.path.exists(executable_path): |
| 175 | lib_dir = os.path.join(CEF_BINARIES_LIBRARIES, "lib") |
| 176 | lib_dir_vs = os.path.join(lib_dir, |
| 177 | get_msvs_for_python(vs_prefix=True)) |
| 178 | compiler.link_executable(objects, |
| 179 | output_progname="subprocess", |
| 180 | output_dir=BUILD_SUBPROCESS, |
| 181 | libraries=["libcef", |
| 182 | "libcef_dll_wrapper_MT"], |
| 183 | library_dirs=[lib_dir, lib_dir_vs], |
| 184 | # TODO linker flags for Linux/Mac |
| 185 | extra_preargs=None, |
| 186 | extra_postargs=subprocess_LINKER_ARGS) |
| 187 | else: |
| 188 | print("[build_cpp_projects.py] Executable is up-to-date: subprocess") |
| 189 | |
| 190 | |
| 191 | def get_sources(sources_dir, exclude_names=None): |
no test coverage detected