Skip to content

Commit

Permalink
Rename YarpOSXUtilities -> YarpMacOSUtilities
Browse files Browse the repository at this point in the history
  • Loading branch information
drdanz committed Aug 16, 2019
1 parent ccdd246 commit defbe32
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 44 deletions.
11 changes: 7 additions & 4 deletions cmake/YarpOSXUtilities.cmake → cmake/YarpMacOSUtilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ if(POLICY CMP0054)
endif()

if(APPLE)
option(YARP_DISABLE_OSX_BUNDLES "Disable macOS bundles" OFF)
mark_as_advanced(YARP_DISABLE_OSX_BUNDLES)
option(YARP_DISABLE_MACOS_BUNDLES "Disable macOS bundles" OFF)
mark_as_advanced(YARP_DISABLE_MACOS_BUNDLES)

include(YarpRenamedOption)
yarp_renamed_option(YARP_DISABLE_OSX_BUNDLES YARP_DISABLE_MACOS_BUNDLES)
endif()

function(YARP_OSX_DUPLICATE_AND_ADD_BUNDLE)
function(YARP_MACOS_DUPLICATE_AND_ADD_BUNDLE)

if(APPLE AND NOT YARP_DISABLE_OSX_BUNDLES)
if(APPLE AND NOT YARP_DISABLE_MACOS_BUNDLES)
set(_options )
set(_oneValueArgs TARGET
APP_ICON
Expand Down
8 changes: 4 additions & 4 deletions src/yarpbatterygui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if(YARP_COMPILE_yarpbatterygui)

include(YarpUseQt5)
include(YarpOSXUtilities)
include(YarpMacOSUtilities)

set(CMAKE_INCLUDE_CURRENT_DIR TRUE)

Expand Down Expand Up @@ -52,8 +52,8 @@ if(YARP_COMPILE_yarpbatterygui)

set_property(TARGET yarpbatterygui PROPERTY FOLDER "Graphical User Interfaces")

yarp_osx_duplicate_and_add_bundle(TARGET yarpbatterygui
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
yarp_macos_duplicate_and_add_bundle(TARGET yarpbatterygui
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")

endif()
8 changes: 4 additions & 4 deletions src/yarpdataplayer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if(YARP_COMPILE_yarpdataplayer)

include(YarpUseQt5)
include(YarpOSXUtilities)
include(YarpMacOSUtilities)

set(CMAKE_INCLUDE_CURRENT_DIR TRUE)

Expand Down Expand Up @@ -101,8 +101,8 @@ if(YARP_COMPILE_yarpdataplayer)

set_property(TARGET yarpdataplayer PROPERTY FOLDER "Graphical User Interfaces")

yarp_osx_duplicate_and_add_bundle(TARGET yarpdataplayer
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
yarp_macos_duplicate_and_add_bundle(TARGET yarpdataplayer
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")

endif()
8 changes: 4 additions & 4 deletions src/yarplaserscannergui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if(YARP_COMPILE_yarplaserscannergui)

include(YarpUseQt5)
include(YarpOSXUtilities)
include(YarpMacOSUtilities)

include_directories(${OpenCV_INCLUDE_DIRS})

Expand Down Expand Up @@ -54,8 +54,8 @@ if(YARP_COMPILE_yarplaserscannergui)

set_property(TARGET yarplaserscannergui PROPERTY FOLDER "Graphical User Interfaces")

yarp_osx_duplicate_and_add_bundle(TARGET yarplaserscannergui
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
yarp_macos_duplicate_and_add_bundle(TARGET yarplaserscannergui
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")

endif()
8 changes: 4 additions & 4 deletions src/yarplogger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if(YARP_COMPILE_yarplogger)
project(yarplogger)

include(YarpUseQt5)
include(YarpOSXUtilities)
include(YarpMacOSUtilities)

set(CMAKE_INCLUDE_CURRENT_DIR TRUE)

Expand Down Expand Up @@ -51,8 +51,8 @@ if(YARP_COMPILE_yarplogger)

set_property(TARGET yarplogger PROPERTY FOLDER "Graphical User Interfaces")

yarp_osx_duplicate_and_add_bundle(TARGET yarplogger
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
yarp_macos_duplicate_and_add_bundle(TARGET yarplogger
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")

endif()
10 changes: 5 additions & 5 deletions src/yarpmanager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if(YARP_COMPILE_yarpmanager)

include(YarpUseQt5)
include(YarpOSXUtilities)
include(YarpMacOSUtilities)

include_directories("${CMAKE_CURRENT_LIST_DIR}/src-builder"
"${CMAKE_CURRENT_LIST_DIR}/src-manager")
Expand Down Expand Up @@ -147,9 +147,9 @@ if(YARP_COMPILE_yarpmanager)

set_property(TARGET yarpmanager PROPERTY FOLDER "Graphical User Interfaces")

yarp_osx_duplicate_and_add_bundle(TARGET yarpmanager
APP_ICON Resources/AppIcon.icns
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
yarp_macos_duplicate_and_add_bundle(TARGET yarpmanager
APP_ICON Resources/AppIcon.icns
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")

endif()
8 changes: 4 additions & 4 deletions src/yarpmotorgui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if(YARP_COMPILE_yarpmotorgui)

include(YarpUseQt5)
include(YarpOSXUtilities)
include(YarpMacOSUtilities)

set(CMAKE_INCLUDE_CURRENT_DIR TRUE)

Expand Down Expand Up @@ -72,9 +72,9 @@ if(YARP_COMPILE_yarpmotorgui)

set_property(TARGET yarpmotorgui PROPERTY FOLDER "Graphical User Interfaces")

yarp_osx_duplicate_and_add_bundle(TARGET yarpmotorgui
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
yarp_macos_duplicate_and_add_bundle(TARGET yarpmotorgui
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")

yarp_install(FILES yarpmotorgui.xml
DESTINATION ${YARP_MODULES_INSTALL_DIR})
Expand Down
10 changes: 5 additions & 5 deletions src/yarpscope/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This software may be modified and distributed under the terms of the
# BSD-3-Clause license. See the accompanying LICENSE file for details.

include(YarpOSXUtilities)
include(YarpMacOSUtilities)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/qtquick2applicationviewer)

Expand Down Expand Up @@ -44,11 +44,11 @@ install(TARGETS yarpscope

set_property(TARGET yarpscope PROPERTY FOLDER "Graphical User Interfaces")

yarp_osx_duplicate_and_add_bundle(TARGET yarpscope
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
yarp_macos_duplicate_and_add_bundle(TARGET yarpscope
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")

if(APPLE AND NOT YARP_DISABLE_OSX_BUNDLES)
if(APPLE AND NOT YARP_DISABLE_MACOS_BUNDLES)
add_dependencies(yarpscope.app QtYARPScopePlugin)
add_custom_command(TARGET yarpscope.app POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:QtYARPScopePlugin>"
Expand Down
12 changes: 6 additions & 6 deletions src/yarpview/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This software may be modified and distributed under the terms of the
# BSD-3-Clause license. See the accompanying LICENSE file for details.

include(YarpOSXUtilities)
include(YarpMacOSUtilities)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/qtquick2applicationviewer)

Expand Down Expand Up @@ -44,12 +44,12 @@ install(TARGETS yarpview

set_property(TARGET yarpview PROPERTY FOLDER "Graphical User Interfaces")

yarp_osx_duplicate_and_add_bundle(TARGET yarpview
APP_ICON icons/AppIcon.icns
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
yarp_macos_duplicate_and_add_bundle(TARGET yarpview
APP_ICON icons/AppIcon.icns
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")

if(APPLE AND NOT YARP_DISABLE_OSX_BUNDLES)
if(APPLE AND NOT YARP_DISABLE_MACOS_BUNDLES)
add_dependencies(yarpview.app QtYARPViewPlugin)
add_custom_command(TARGET yarpview.app POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:QtYARPViewPlugin>"
Expand Down
2 changes: 1 addition & 1 deletion src/yarpviz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if(YARP_COMPILE_yarpviz)
project(yarpviz)

include(YarpUseQt5)
include(YarpOSXUtilities)
include(YarpMacOSUtilities)

add_subdirectory(src)
add_subdirectory(app)
Expand Down
6 changes: 3 additions & 3 deletions src/yarpviz/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ install(TARGETS yarpviz

set_property(TARGET yarpviz PROPERTY FOLDER "Graphical User Interfaces")

yarp_osx_duplicate_and_add_bundle(TARGET yarpviz
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
yarp_macos_duplicate_and_add_bundle(TARGET yarpviz
INSTALL_COMPONENT utilities
INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")

0 comments on commit defbe32

Please sign in to comment.