Fix issue where the CEF libraries would not be copied to the bin folder

This commit is contained in:
Alexander Bock
2021-01-12 11:26:00 +01:00
parent cdbc1c2695
commit 595d23ec75
2 changed files with 10 additions and 7 deletions

View File

@@ -154,12 +154,6 @@ if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT)
set_cef_targets("${CEF_ROOT}" OpenSpace)
run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}")
# @TODO (abock, 2020-12-12) This should be handled more gracefully. Right now we *have*
# to build OpenSpace or otherwise the necessary files will not be copied over
# Copy binary and resource files to the target output directory.
copy_files("${CEF_TARGET}" "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "$<TARGET_FILE_DIR:${CEF_TARGET}>")
copy_files("${CEF_TARGET}" "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "$<TARGET_FILE_DIR:${CEF_TARGET}>")
elseif ()
message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.")
endif ()

View File

@@ -236,6 +236,15 @@ set_folder_location(openspace_web_helper "Helper")
# Display CEF configuration settings.
PRINT_CEF_CONFIG()
# PRINT_CEF_CONFIG()
target_include_directories(${webbrowser_module} SYSTEM PUBLIC ${CEF_ROOT})
set(deps "")
foreach (i ${CEF_BINARY_FILES})
list(APPEND deps "${CEF_BINARY_DIR}/${i}")
endforeach()
foreach (j ${CEF_RESOURCE_FILES})
list(APPEND deps "${CEF_RESOURCE_DIR}/${j}")
endforeach()
add_external_library_dependencies("${deps}")