set(target_name OpenStudioApp) include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${QT_INCLUDES}) # source files set(${target_name}_SRC main.cpp OpenStudioApp.cpp OpenStudioApp.hpp StartupView.hpp StartupView.cpp StartupMenu.hpp StartupMenu.cpp LibraryDialog.hpp LibraryDialog.cpp ExternalToolsDialog.hpp ExternalToolsDialog.cpp ../shared_gui_components/BusyWidget.cpp ../shared_gui_components/BusyWidget.hpp ../shared_gui_components/OSDialog.cpp ../shared_gui_components/OSDialog.hpp ../shared_gui_components/WaitDialog.cpp ../shared_gui_components/WaitDialog.hpp ) # moc files set(${target_name}_moc OpenStudioApp.hpp StartupView.hpp StartupMenu.hpp LibraryDialog.hpp ExternalToolsDialog.hpp ../shared_gui_components/BusyWidget.hpp ../shared_gui_components/OSDialog.hpp ../shared_gui_components/WaitDialog.hpp ) ## Qt UI generation qt6_wrap_cpp(${target_name}_moc_src ${${target_name}_moc}) # configure the AboutBox.hpp file # this needs to be configured to embed the build number CONFIGURE_FILE_WITH_CHECKSUM(AboutBox.hpp.in "${CMAKE_CURRENT_BINARY_DIR}/AboutBox.hpp") set(OPENSTUDIOAPPLICATION_ICON_FOLDER "${PROJECT_SOURCE_DIR}/icons") if(WIN32) remove_definitions(/bigobj) CONFIGURE_FILE_WITH_CHECKSUM(OpenStudioApp.rc.in "${CMAKE_CURRENT_BINARY_DIR}/OpenStudioApp.rc") set(ICON_SRC "${CMAKE_CURRENT_BINARY_DIR}/OpenStudioApp.rc") elseif(APPLE) # For Apple set the icns file containing icons # set the name of the bundle icon set(MACOSX_BUNDLE_ICON_FILE os.icns) # set all icons set(ICON_SRC ${OPENSTUDIOAPPLICATION_ICON_FOLDER}/os.icns ${OPENSTUDIOAPPLICATION_ICON_FOLDER}/osm.icns ${OPENSTUDIOAPPLICATION_ICON_FOLDER}/osc.icns ) set_source_files_properties(${ICON_SRC} PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${OPENSTUDIOAPPLICATION_VERSION}") set(MACOSX_BUNDLE_BUNDLE_VERSION "${OPENSTUDIOAPPLICATION_LONG_VERSION}") set(MACOSX_BUNDLE_COPYRIGHT "Copyright © 2020-2022, OpenStudio Coalition and other contributors. All rights reserved.") set(MACOSX_BUNDLE_EXECUTABLE_NAME ${target_name}) # PROJECT_VERSION_BUILD = Git SHA. This makes it globally unique, and is what we want to avoid CFBUndleIdenfitied collision set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.openstudiocoalition.${PROJECT_VERSION_BUILD}.openstudioapplication") set(MACOSX_BUNDLE_BUNDLE_NAME "OpenStudioApplication") CONFIGURE_FILE_WITH_CHECKSUM(${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) elseif(UNIX) # Install the icons # Cf. http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#directory_layout # NOTE: Instead, to avoid dpkg issuing conflicts when installing several different versions, we use a post-installation script # So install them to a temp directory that we'll remove later install(DIRECTORY ${OPENSTUDIOAPPLICATION_ICON_FOLDER} DESTINATION Temp FILES_MATCHING PATTERN "*.png") #foreach(_size 16 32 48 64 128 256) ## Copy OS App icons: #install( #FILES "${OPENSTUDIOAPPLICATION_ICON_FOLDER}/os_${_size}.png" #DESTINATION "/usr/share/icons/hicolor/${_size}x${_size}/apps" #RENAME openstudioapp.png #) ## Install OSM mimetypes icons #install( #FILES "${OPENSTUDIOCORE_ICON_FOLDER}/osm_${_size}.png" #DESTINATION "/usr/share/icons/hicolor/${_size}x${_size}/mimetypes" #RENAME application-x-openstudio.png #) ## Install OSC #install( #FILES "${OPENSTUDIOCORE_ICON_FOLDER}/osc_${_size}.png" #DESTINATION "/usr/share/icons/hicolor/${_size}x${_size}/mimetypes" #RENAME application-x-openstudio-component.png #) #endforeach() ## OS App has a 512 and 1024 too #foreach(_size 512 1024) ## Copy OS App icons #install( #FILES "${OPENSTUDIOAPPLICATION_ICON_FOLDER}/os_${_size}.png" #DESTINATION "/usr/share/icons/hicolor/${_size}x${_size}/apps" #RENAME openstudioapp.png #) #endforeach() endif() add_executable(${target_name} WIN32 MACOSX_BUNDLE ${${target_name}_SRC} ${${target_name}_moc_src} ${${target_name}_moc} ${ICON_SRC} ) if (NINJA) target_compile_definitions(${target_name} PRIVATE NINJA=1) endif() if(WIN32) # increase stack size target_link_options(${target_name} PRIVATE /STACK:8388608) endif() add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory $/platforms/ ) if(WIN32) add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory $/styles/ ) endif() if(UNIX AND NOT APPLE) add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory $/xcbglintegrations/ ) endif() if( APPLE ) # Note: JM: Qt 6.3.0, I can no longer access $ find_library(QT_QCOCOA NAMES libqcocoa.dylib PATHS "${QT_INSTALL_DIR}/plugins/platforms" NO_DEFAULT_PATH) add_custom_command(TARGET ${target_name} POST_BUILD # COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/platforms/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT_QCOCOA} $/platforms/ VERBATIM ) add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add_rpath "${openstudio_ROOT_DIR}/lib/" $ COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add_rpath "${QT_INSTALL_DIR}/lib/" $ # This is because Apple has app bundles for .apps. # We copy the openstudio cli into the app bundle in an effort # to be self contained. It also makes it easy to find the cli since # it will be sitting next to the app executable. COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/$ # Local dev: find them in the actual OpenStudio root dir COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add_rpath "${openstudio_ROOT_DIR}/lib/" $/$ # Runtime: it's already going to find them in in OpenStudioApp.app/Contents/Frameworks ) #add_custom_command(TARGET ${target_name} # POST_BUILD # COMMAND ${QT_MACDEPLOY_QT} $ -verbose=2 #) elseif( UNIX ) foreach(LIB ${QT_LIBS} ${QT_WEB_LIBS}) get_property(LIB_LOCATION TARGET ${LIB} PROPERTY LOCATION) list(APPEND QT_LIB_LOCATIONS "${LIB_LOCATION}") endforeach() foreach(LIB_LOCATION ${QT_LIB_LOCATIONS} ${QT_EXTRA_LIBS}) # In case we grabed "xx.so", it'll be resolved to "xx.so.X.Y.Z" as we expect get_filename_component(LIB_LOCATION_RESOLVED "${LIB_LOCATION}" REALPATH) get_filename_component(LIB_BASE_NAME ${LIB_LOCATION_RESOLVED} NAME) string(REGEX REPLACE "\\.[^.]*$" "" LIB_MAJOR_MINOR_NAME ${LIB_BASE_NAME}) string(REGEX REPLACE "\\.[^.]*$" "" LIB_MAJOR_NAME ${LIB_MAJOR_MINOR_NAME}) list(APPEND QT_LIB_SYMLINKS "${LIB_MAJOR_MINOR_NAME}" "${LIB_MAJOR_NAME}") add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LIB_LOCATION_RESOLVED} $/ COMMAND ln -sf "${LIB_BASE_NAME}" "$/${LIB_MAJOR_MINOR_NAME}" COMMAND ln -sf "${LIB_BASE_NAME}" "$/${LIB_MAJOR_NAME}" COMMAND patchelf --set-rpath "$ORIGIN/." $/${LIB_BASE_NAME} VERBATIM ) endforeach() add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QtWebEngineProcess} $/ COMMAND chrpath -r "$ORIGIN/." $/QtWebEngineProcess VERBATIM ) add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/qt.conf $ COMMAND ${CMAKE_COMMAND} -E make_directory $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${icudtl} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_devtools} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_100} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_200} $/resources/ #COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_v8_context_snapshot} $/resources/ ) # Note: JM: Qt 6.3.0, I can no longer access $ find_library(QT_QXCB NAMES libqxcb.so PATHS "${QT_INSTALL_DIR}/plugins/platforms" NO_DEFAULT_PATH) add_custom_command(TARGET ${target_name} POST_BUILD # Note: JM: Qt 6.3.0, I can no longer access $ # COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/platforms/ # COMMAND patchelf --set-rpath "$ORIGIN/.." $/platforms/$ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT_QXCB} $/platforms/ COMMAND patchelf --set-rpath "$ORIGIN/.." $/platforms/libqxcb.so VERBATIM ) find_library(QT_QXCB_GLX NAMES libqxcb-glx-integration.so PATHS "${QT_INSTALL_DIR}/plugins/xcbglintegrations" NO_DEFAULT_PATH) add_custom_command(TARGET ${target_name} POST_BUILD # Note: JM: Qt 6.3.0, I can no longer access $ # COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/xcbglintegrations/ # COMMAND chrpath -r "$ORIGIN/." $/xcbglintegrations/$ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT_QXCB_GLX} $/xcbglintegrations/ COMMAND patchelf --set-rpath "$ORIGIN/.." $/xcbglintegrations/libqxcb-glx-integration.so VERBATIM ) elseif( WIN32 ) target_link_libraries(${target_name} optimized ${QT_ENTRYPOINT_LIB} debug ${QT_ENTRYPOINT_LIB_D}) add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${QT_WINDEPLOY_QT} --dir $ $ ) add_custom_command(TARGET ${target_name} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/qt.conf $ COMMAND ${CMAKE_COMMAND} -E make_directory $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${icudtl} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_devtools} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_100} $/resources/ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_200} $/resources/ #COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_v8_context_snapshot} $/resources/ ) # On Windows, we must copy the DLLs inside the build folder or it won't find them # TODO: IMPORTED_SONAME_RELEASE now contains @rpath so it fails # get_target_property(LIBOSLIB openstudio::openstudiolib IMPORTED_LOCATION_RELEASE) # add_custom_command(TARGET ${target_name} # POST_BUILD # COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LIBOSLIB} $/ ) add_custom_command(TARGET ${target_name} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/ COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/ COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/ COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $/ ) endif() set(depends openstudio_lib openstudio_bimserver openstudio_modeleditor openstudioapp_utilities openstudio::openstudiolib ${QT_WEB_LIBS} ) target_link_libraries(${target_name} ${depends}) #AddPCH(${target_name}) #------------------------------------------------------------------------------ # Installation #------------------------------------------------------------------------------ if(APPLE) set_target_properties(${target_name} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) set(plugin_dest_dir OpenStudioApp.app/Contents/MacOS) set(APPS "\${CMAKE_INSTALL_PREFIX}/OpenStudioApp.app") elseif(WIN32) set(plugin_dest_dir bin) set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/OpenStudioApp.exe") else() set_target_properties(${target_name} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../lib/") set(plugin_dest_dir bin) set(APPS "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/OpenStudioApp") endif() if( APPLE ) install(TARGETS ${target_name} DESTINATION . COMPONENT "OpenStudioApp" ) else() install(TARGETS ${target_name} DESTINATION bin COMPONENT "OpenStudioApp" ) endif() # directories to look for dependencies get_target_property(os_lib_location openstudio::openstudiolib LOCATION) get_filename_component(os_lib_dir ${os_lib_location} DIRECTORY) set(DIRS "${QT_INSTALL_DIR}/bin" "${QT_INSTALL_DIR}/lib" "${os_lib_dir}") # install resources directory if( APPLE ) set(RESOURCES_DEST "OpenStudioApp.app/Contents/Resources") else() set(RESOURCES_DEST "Resources") endif() install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/openstudio_app/Resources/ DESTINATION ${RESOURCES_DEST} COMPONENT "Resources" ) # install measures/models from openstudio-coalition-measures install(FILES ${openstudio-coalition-measures_SOURCE_DIR}/models/ShoeboxExample.osm DESTINATION ${RESOURCES_DEST}/ShoeboxModel/ COMPONENT "Resources" ) install(DIRECTORY ${openstudio-coalition-measures_SOURCE_DIR}/models/ShoeboxExample DESTINATION ${RESOURCES_DEST}/ShoeboxModel/ COMPONENT "Resources" ) install(DIRECTORY ${openstudio-coalition-measures_SOURCE_DIR}/models/ShoeboxExample/measures/openstudio_results DESTINATION ${RESOURCES_DEST}/ COMPONENT "Resources" ) # since on apple the whole app bundle is installed (including these webkit components) we can exclude apple if( NOT APPLE ) install(FILES $/qt.conf DESTINATION bin COMPONENT OpenStudioApp) install(DIRECTORY $/platforms/ DESTINATION bin/platforms/ COMPONENT OpenStudioApp) if (WIN32) install(DIRECTORY $/styles/ DESTINATION bin/styles/ COMPONENT OpenStudioApp) endif() install(DIRECTORY $/translations/ DESTINATION bin/translations/ COMPONENT OpenStudioApp) install(DIRECTORY $/resources/ DESTINATION bin/resources/ COMPONENT OpenStudioApp) if(WIN32) install(TARGETS OpenStudioApp DESTINATION bin COMPONENT OpenStudioApp ) # Done at top level CMakeLists.txt # install(PROGRAMS $ DESTINATION bin COMPONENT OpenStudioApp ) install(PROGRAMS ${QtWebEngineProcess} DESTINATION bin COMPONENT OpenStudioApp ) install(PROGRAMS $/D3Dcompiler_47.dll DESTINATION bin/ COMPONENT OpenStudioApp) install(PROGRAMS $/opengl32sw.dll DESTINATION bin/ COMPONENT OpenStudioApp) foreach(LIB ${QT_LIBS} ${QT_WEB_LIBS}) install(PROGRAMS $/$ DESTINATION bin/ COMPONENT OpenStudioApp) endforeach() list(APPEND QT_DIRS iconengines) list(APPEND QT_DIRS imageformats) list(APPEND QT_DIRS networkinformation) list(APPEND QT_DIRS position) list(APPEND QT_DIRS tls) foreach(DIR ${QT_DIRS}) install(DIRECTORY $/${DIR} DESTINATION bin/ COMPONENT OpenStudioApp) endforeach() elseif(UNIX) # Let fixup_bundle do that for us #install(PROGRAMS $ DESTINATION bin COMPONENT OpenStudioApp ) install(PROGRAMS $/QtWebEngineProcess DESTINATION bin/ COMPONENT OpenStudioApp) install(DIRECTORY $/xcbglintegrations/ DESTINATION bin/xcbglintegrations/ COMPONENT OpenStudioApp) # install(PROGRAMS $/xcbglintegrations/$ DESTINATION bin/xcbglintegrations/ COMPONENT OpenStudioApp) foreach(LIB ${QT_LIBS} ${QT_WEB_LIBS}) install(PROGRAMS $/$ DESTINATION bin/ COMPONENT OpenStudioApp) endforeach() foreach(LIB_LOCATION ${QT_EXTRA_LIBS}) get_filename_component(LIB_LOCATION_RESOLVED "${LIB_LOCATION}" REALPATH) get_filename_component(LIB_BASE_NAME ${LIB_LOCATION_RESOLVED} NAME) install(PROGRAMS $/${LIB_BASE_NAME} DESTINATION bin/ COMPONENT OpenStudioApp) endforeach() foreach(LINK ${QT_LIB_SYMLINKS}) install(FILES $/${LINK} DESTINATION bin/ COMPONENT OpenStudioApp) endforeach() endif() endif() if( APPLE ) list(APPEND QTPLUGINS "\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/platforms/libqcocoa.dylib") #list(APPEND QTPLUGINS "\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/sceneparsers/libgltfsceneparser.dylib") #list(APPEND QTPLUGINS "\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/sceneparsers/libassimpsceneparser.dylib") install(DIRECTORY ${QtWebEngineProcess} DESTINATION "OpenStudioApp.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/A/Helpers/" COMPONENT OpenStudioApp USE_SOURCE_PERMISSIONS) # TODO: this is definitely a shot in the dark and is unlikely to work. The WebEngine .paks in particular probably need to live somewhere else install(DIRECTORY $/translations/ DESTINATION "OpenStudioApp.app/Contents/translations/" COMPONENT OpenStudioApp) list(APPEND QTPLUGINS "\${CMAKE_INSTALL_PREFIX}/OpenStudioApp.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/A/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess") # Create a new symlink at OpenStudioApp.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/A/Helpers/QtWebEngineProcess.app/Contents/Frameworks # That point to OpenStudioApp.app/Contents/Frameworks. `cmake -E create_symlink old new - create a symbolic link new -> old` # TODO: Somewhere there is something that copies the openstudio CLI into the OpenStudioApp.app/Contents/MacOS which is useless. # TODO: We can also just symlink libopenstudio.lib into the OpenStudioApp.app/Contents/Frameworks directory instead of copying install(CODE [[ execute_process( COMMAND echo "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}" COMMAND "${CMAKE_COMMAND}" -E create_symlink "../../../../../../../Frameworks" "${CMAKE_INSTALL_PREFIX}/OpenStudioApp.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/A/Helpers/QtWebEngineProcess.app/Contents/Frameworks" COMMAND "${CMAKE_COMMAND}" -E create_symlink "../../EnergyPlus" "${CMAKE_INSTALL_PREFIX}/OpenStudioApp.app/Contents/EnergyPlus" COMMAND "${CMAKE_COMMAND}" -E create_symlink "../../Radiance" "${CMAKE_INSTALL_PREFIX}/OpenStudioApp.app/Contents/Radiance" COMMAND "${CMAKE_COMMAND}" -E create_symlink "../../../lib/$" "${CMAKE_INSTALL_PREFIX}/OpenStudioApp.app/Contents/Frameworks/$" COMMAND "${CMAKE_COMMAND}" -E create_symlink "../../../lib/$" "${CMAKE_INSTALL_PREFIX}/OpenStudioApp.app/Contents/Frameworks/$" COMMAND "${CMAKE_COMMAND}" -E create_symlink "../../../lib/$" "${CMAKE_INSTALL_PREFIX}/OpenStudioApp.app/Contents/Frameworks/$" COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_INSTALL_PREFIX}/bin" COMMAND_ECHO STDOUT COMMAND_ERROR_IS_FATAL ANY ) # We break it into two `execute_process`es so that there is no race condition between the make_directory above and the create_symlink below execute_process( COMMAND "${CMAKE_COMMAND}" -E create_symlink "../OpenStudioApp.app/Contents/MacOS/$" "${CMAKE_INSTALL_PREFIX}/bin/$" COMMAND_ECHO STDOUT COMMAND_ERROR_IS_FATAL ANY ) ]] COMPONENT OpenStudioApp ) endif() # TODO: We used to run fixup_bundle on all plaforms before on 5.15.0... if(UNIX) # This does some "magic" **including on Linux** (cf #345) (On linux it will install in ./bin/ the libicu* stuff) install(CODE " # APPS might be a symbolic link which does not work with fixup_bundle # expand APPS to a real path get_filename_component(APPS_EXPANDED ${APPS} REALPATH) include(BundleUtilities) # This file defines some libs we are excluding. Some like concrt140.dll are installed already via InstallRequiredSystemLibraries include(\"${CMAKE_SOURCE_DIR}/CMake/FixupBundleOverrides.cmake\") fixup_bundle(\"\${APPS_EXPANDED}\" \"${QTPLUGINS}\" \"${DIRS}\") " COMPONENT "OpenStudioApp" ) endif() if(APPLE) # This is kinda gross, but I can't seem to manage to get fixup_bundle to not trash the RPATH of Contents/MacOS/openstudio... But it will copy at Contents/Frameworks/libopenstudiolib.dylib # So here I just override it with a symlink. install(CODE [[ execute_process( COMMAND "${CMAKE_COMMAND}" -E create_symlink "../../../lib/$" "${CMAKE_INSTALL_PREFIX}/OpenStudioApp.app/Contents/Frameworks/$" COMMAND_ECHO STDOUT COMMAND_ERROR_IS_FATAL ANY ) ]] COMPONENT OpenStudioApp ) endif() set(${target_name}_test_src test/OpenStudioAppFixture.hpp test/OpenStudioAppFixture.cpp test/Resources_GTest.cpp test/Units_GTest.cpp ) CREATE_SRC_GROUPS("${${target_name}_test_src}") if(BUILD_TESTING) set(${target_name}_test_depends ${depends} ) CREATE_TEST_TARGETS(${target_name} "${${target_name}_test_src}" "${${target_name}_test_depends}") #add_dependencies("${target_name}_tests" # openstudio_app_resources #) endif() if(APPLE AND CPACK_CODESIGNING_DEVELOPPER_ID_APPLICATION) include("${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/CodeSigning.cmake") register_install_codesign_target(${target_name} "." "OpenStudioApp") install( CODE " include(\"${CMAKE_CURRENT_FUNCTION_LIST_FILE}\") codesign_files_macos( FILES \"\${CMAKE_INSTALL_PREFIX}/$/Contents/Frameworks/QtWebEngineCore.framework/Versions/A/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess\" SIGNING_IDENTITY \"${CPACK_CODESIGNING_DEVELOPPER_ID_APPLICATION}\" IDENTIFIER \"${CPACK_CODESIGNING_MACOS_IDENTIFIER}.QtWebEngineProcess\" ENTITLEMENTS \"${QtWebEngineProcess}/Contents/Resources/QtWebEngineProcess.entitlements\" FORCE VERBOSE ) " COMPONENT OpenStudioApp ) endif()