From 0cd8169125b260cd13bdd1d4b8feca3d54d9246f Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 3 Jan 2018 15:03:15 -0500 Subject: [PATCH] macOS: cmake: Don't create target name with spaces (issue #2342) --- tests/cefclient/CMakeLists.txt.in | 8 +++++--- tests/cefsimple/CMakeLists.txt.in | 8 +++++--- tests/ceftests/CMakeLists.txt.in | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/cefclient/CMakeLists.txt.in b/tests/cefclient/CMakeLists.txt.in index d9c3c2051..d23d6438e 100644 --- a/tests/cefclient/CMakeLists.txt.in +++ b/tests/cefclient/CMakeLists.txt.in @@ -95,7 +95,8 @@ # Target executable names. set(CEF_TARGET "cefclient") if(OS_MACOSX) - set(CEF_HELPER_TARGET "cefclient Helper") + set(CEF_HELPER_TARGET "cefclient_Helper") + set(CEF_HELPER_OUTPUT_NAME "cefclient Helper") endif() # Logical target used to link the libcef library. @@ -170,7 +171,7 @@ if(OS_MACOSX) # Output paths for the app bundles. set(CEF_APP "${CEF_TARGET_OUT_DIR}/${CEF_TARGET}.app") - set(CEF_HELPER_APP "${CEF_TARGET_OUT_DIR}/${CEF_HELPER_TARGET}.app") + set(CEF_HELPER_APP "${CEF_TARGET_OUT_DIR}/${CEF_HELPER_OUTPUT_NAME}.app") # Variable referenced from Info.plist files. set(PRODUCT_NAME "${CEF_TARGET}") @@ -182,6 +183,7 @@ if(OS_MACOSX) target_link_libraries(${CEF_HELPER_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS}) set_target_properties(${CEF_HELPER_TARGET} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/resources/mac/helper-Info.plist + OUTPUT_NAME ${CEF_HELPER_OUTPUT_NAME} ) # Fix the framework rpath in the helper executable. @@ -203,7 +205,7 @@ if(OS_MACOSX) # Copy the helper app bundle into the Frameworks directory. COMMAND ${CMAKE_COMMAND} -E copy_directory "${CEF_HELPER_APP}" - "${CEF_APP}/Contents/Frameworks/${CEF_HELPER_TARGET}.app" + "${CEF_APP}/Contents/Frameworks/${CEF_HELPER_OUTPUT_NAME}.app" # Copy the CEF framework into the Frameworks directory. COMMAND ${CMAKE_COMMAND} -E copy_directory "${CEF_BINARY_DIR}/Chromium Embedded Framework.framework" diff --git a/tests/cefsimple/CMakeLists.txt.in b/tests/cefsimple/CMakeLists.txt.in index 9c825330e..77692369d 100644 --- a/tests/cefsimple/CMakeLists.txt.in +++ b/tests/cefsimple/CMakeLists.txt.in @@ -43,7 +43,8 @@ # Target executable names. set(CEF_TARGET "cefsimple") if(OS_MACOSX) - set(CEF_HELPER_TARGET "cefsimple Helper") + set(CEF_HELPER_TARGET "cefsimple_Helper") + set(CEF_HELPER_OUTPUT_NAME "cefsimple Helper") endif() # Logical target used to link the libcef library. @@ -85,7 +86,7 @@ endif() if(OS_MACOSX) # Output paths for the app bundles. set(CEF_APP "${CEF_TARGET_OUT_DIR}/${CEF_TARGET}.app") - set(CEF_HELPER_APP "${CEF_TARGET_OUT_DIR}/${CEF_HELPER_TARGET}.app") + set(CEF_HELPER_APP "${CEF_TARGET_OUT_DIR}/${CEF_HELPER_OUTPUT_NAME}.app") # Variable referenced from Info.plist files. set(PRODUCT_NAME "${CEF_TARGET}") @@ -97,6 +98,7 @@ if(OS_MACOSX) target_link_libraries(${CEF_HELPER_TARGET} libcef_lib libcef_dll_wrapper ${CEF_STANDARD_LIBS}) set_target_properties(${CEF_HELPER_TARGET} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/mac/helper-Info.plist + OUTPUT_NAME ${CEF_HELPER_OUTPUT_NAME} ) # Fix the framework rpath in the helper executable. @@ -118,7 +120,7 @@ if(OS_MACOSX) # Copy the helper app bundle into the Frameworks directory. COMMAND ${CMAKE_COMMAND} -E copy_directory "${CEF_HELPER_APP}" - "${CEF_APP}/Contents/Frameworks/${CEF_HELPER_TARGET}.app" + "${CEF_APP}/Contents/Frameworks/${CEF_HELPER_OUTPUT_NAME}.app" # Copy the CEF framework into the Frameworks directory. COMMAND ${CMAKE_COMMAND} -E copy_directory "${CEF_BINARY_DIR}/Chromium Embedded Framework.framework" diff --git a/tests/ceftests/CMakeLists.txt.in b/tests/ceftests/CMakeLists.txt.in index f8d719a93..e118af827 100644 --- a/tests/ceftests/CMakeLists.txt.in +++ b/tests/ceftests/CMakeLists.txt.in @@ -57,7 +57,8 @@ # Target executable names. set(CEF_TARGET "ceftests") if(OS_MACOSX) - set(CEF_HELPER_TARGET "ceftests Helper") + set(CEF_HELPER_TARGET "ceftests_Helper") + set(CEF_HELPER_OUTPUT_NAME "ceftests Helper") endif() # Logical target used to link the libcef library. @@ -105,7 +106,7 @@ endif() if(OS_MACOSX) # Output paths for the app bundles. set(CEF_APP "${CEF_TARGET_OUT_DIR}/${CEF_TARGET}.app") - set(CEF_HELPER_APP "${CEF_TARGET_OUT_DIR}/${CEF_HELPER_TARGET}.app") + set(CEF_HELPER_APP "${CEF_TARGET_OUT_DIR}/${CEF_HELPER_OUTPUT_NAME}.app") # Variable referenced from Info.plist files. set(PRODUCT_NAME "${CEF_TARGET}") @@ -117,6 +118,7 @@ if(OS_MACOSX) target_link_libraries(${CEF_HELPER_TARGET} libcef_lib libcef_dll_wrapper cef_gtest ${CEF_STANDARD_LIBS}) set_target_properties(${CEF_HELPER_TARGET} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/resources/mac/helper-Info.plist + OUTPUT_NAME ${CEF_HELPER_OUTPUT_NAME} ) # Fix the framework rpath in the helper executable. @@ -138,7 +140,7 @@ if(OS_MACOSX) # Copy the helper app bundle into the Frameworks directory. COMMAND ${CMAKE_COMMAND} -E copy_directory "${CEF_HELPER_APP}" - "${CEF_APP}/Contents/Frameworks/${CEF_HELPER_TARGET}.app" + "${CEF_APP}/Contents/Frameworks/${CEF_HELPER_OUTPUT_NAME}.app" # Copy the CEF framework into the Frameworks directory. COMMAND ${CMAKE_COMMAND} -E copy_directory "${CEF_BINARY_DIR}/Chromium Embedded Framework.framework"