Skip to content

Commit

Permalink
cmake: skip bin and lib install for macOS framework builds
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Jul 4, 2023
1 parent 92daff3 commit 03f1f78
Showing 1 changed file with 24 additions and 20 deletions.
44 changes: 24 additions & 20 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,11 @@ add_executable(carla-bridge-native)

set_common_target_properties(carla-bridge-native)

install(TARGETS carla-bridge-native
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
if(NOT (APPLE AND ${CARLA_BUILD_FRAMEWORKS}))
install(TARGETS carla-bridge-native
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
endif()

target_compile_definitions(carla-bridge-native
PRIVATE
Expand Down Expand Up @@ -774,9 +776,11 @@ add_executable(carla-discovery-native)

set_common_target_properties(carla-discovery-native)

install(TARGETS carla-discovery-native
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
if(NOT (APPLE AND ${CARLA_BUILD_FRAMEWORKS}))
install(TARGETS carla-discovery-native
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
endif()

target_include_directories(carla-discovery-native
PRIVATE
Expand Down Expand Up @@ -912,18 +916,18 @@ target_sources(carla-standalone
${carla-standalone-public-headers}
)

install(TARGETS carla-standalone
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/carla
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/carla
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

if(APPLE AND ${CARLA_BUILD_FRAMEWORKS})
install(TARGETS
carla-bridge-native
carla-discovery-native
DESTINATION ${CMAKE_INSTALL_LIBDIR}/carla-standalone.framework)
else()
install(TARGETS carla-standalone
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/carla
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/carla
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
endif()

#######################################################################################################################
Expand Down Expand Up @@ -1013,18 +1017,18 @@ target_sources(carla-utils
${carla-utils-public-headers}
)

install(TARGETS carla-utils
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/carla
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/carla
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

if(APPLE AND ${CARLA_BUILD_FRAMEWORKS})
install(TARGETS
carla-bridge-native
carla-discovery-native
DESTINATION ${CMAKE_INSTALL_LIBDIR}/carla-utils.framework)
else()
install(TARGETS carla-utils
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/carla
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/carla
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()

#######################################################################################################################
Expand Down

0 comments on commit 03f1f78

Please sign in to comment.