Skip to content

Commit

Permalink
Merge branch 'b-cmake' of github.com:gwaldron/osgearth into b-cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed May 6, 2024
2 parents 9dd6e8e + f1ed457 commit a8c4675
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions cmake/osgearth-macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ macro(add_osgearth_plugin)
if(OSGEARTH_INSTALL_SHADERS)
install(FILES ${MY_SHADERS} DESTINATION resources/shaders)
endif()

# macos-specific
if(OSG_BUILD_PLATFORM_IPHONE)
set_target_properties(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE ${IPHONE_ENABLE_BITCODE})
endif()

# install the dynamic libraries.
install(TARGETS ${MY_TARGET}
Expand Down Expand Up @@ -184,14 +189,19 @@ macro(add_osgearth_app)
target_link_libraries(${MY_TARGET} PRIVATE osgEarth ${OPENSCENEGRAPH_LIBRARIES} ${MY_LIBRARIES})

set_target_properties(${MY_TARGET} PROPERTIES PROJECT_LABEL "${MY_TARGET}")

# macos-specific
if(OSG_BUILD_PLATFORM_IPHONE)
set_target_properties(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE ${IPHONE_ENABLE_BITCODE})
endif()

install(TARGETS ${MY_TARGET} RUNTIME DESTINATION bin)

if(NOT MY_FOLDER)
set(MY_FOLDER "Ungrouped")
endif()
if(NOT MY_FOLDER)
set(MY_FOLDER "Ungrouped")
endif()

SET_PROPERTY(TARGET ${MY_TARGET} PROPERTY FOLDER "${MY_FOLDER}")
set_property(TARGET ${MY_TARGET} PROPERTY FOLDER "${MY_FOLDER}")
endmacro(add_osgearth_app)


Expand Down Expand Up @@ -360,7 +370,11 @@ macro(add_osgearth_library)
FILES ${MY_PUBLIC_HEADERS}
DESTINATION ${INSTALL_INCDIR})
else()
# MAC OSX stuff.
# macos-specific
if(OSG_BUILD_PLATFORM_IPHONE)
set_target_properties(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE ${IPHONE_ENABLE_BITCODE})
endif()

set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "${OSGEARTH_BUILD_FRAMEWORKS_INSTALL_NAME_DIR}")

Expand Down

0 comments on commit a8c4675

Please sign in to comment.