mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-06 19:12:30 +01:00
Add index.html copy step to macos version
This commit is contained in:
parent
83d4f425c4
commit
c0cfef1536
@ -71,6 +71,12 @@ target_link_libraries(
|
||||
if(APPLE)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE "-framework Cocoa")
|
||||
add_custom_command(
|
||||
TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/index.html
|
||||
${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME}.app/Contents/MacOS/)
|
||||
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
|
@ -41,7 +41,7 @@ Item {
|
||||
WebEngineView {
|
||||
id: webView
|
||||
anchors.fill: parent
|
||||
url: Wallpaper.getApplicationPath() + "/index.html"
|
||||
url: Qt.resolvedUrl("file://"+ Wallpaper.getApplicationPath() + "/index.html")
|
||||
onJavaScriptConsoleMessage: (lineNumber, message) => print(lineNumber,
|
||||
message)
|
||||
onLoadProgressChanged: {
|
||||
|
Loading…
Reference in New Issue
Block a user