Skip to content

Commit 79deca7

Browse files
authored
Merge pull request #1166 from CesiumGS/optional-exports
Don't install exports unless libs and headers are also installed.
2 parents f390dc7 + 25fa20e commit 79deca7

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
##### Breaking Changes :mega:
66

7+
- Deprecated the `ViewState::create` methods. Use a constructor overload instead.
78
- Removed `addCreditToFrame`, `startNextFrame`, `getCreditsToShowThisFrame`, and `getCreditsToNoLongerShowThisFrame` from `CreditSystem`. `CreditSystem` no longer has a notion of a "frame". Instead, credits are included and excluded by calling `addCreditReference` and `removeCreditReference`. A snaphot of the current state can be obtained by calling `getSnapshot`, and it includes both the current set of active credits as well as the credits that were removed since the last snapshot.
89
- Removed the following from `Cesium3DTilesSelection::Tile`:
910
- `getLastSelectionState` and `setLastSelectionState`. Use `TilesetViewGroup::getTraversalState` instead.

CMakeLists.txt

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -345,18 +345,20 @@ add_subdirectory(doc)
345345

346346
include(CMakePackageConfigHelpers)
347347

348-
install(EXPORT CesiumExports
349-
FILE cesium-nativeTargets.cmake
350-
DESTINATION ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake)
351-
352-
install(FILES
353-
"${CMAKE_CURRENT_LIST_DIR}/cmake/modules/Findzlib-ng.cmake"
354-
"${CMAKE_CURRENT_LIST_DIR}/cmake/modules/Findmodp_b64.cmake"
355-
DESTINATION ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake)
356-
357-
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/Config.cmake.in
358-
"${CMAKE_CURRENT_BINARY_DIR}/cesium-nativeConfig.cmake"
359-
INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake)
360-
361-
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cesium-nativeConfig.cmake
362-
DESTINATION ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake)
348+
if(CESIUM_INSTALL_STATIC_LIBS AND CESIUM_INSTALL_HEADERS)
349+
install(EXPORT CesiumExports
350+
FILE cesium-nativeTargets.cmake
351+
DESTINATION ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake)
352+
353+
install(FILES
354+
"${CMAKE_CURRENT_LIST_DIR}/cmake/modules/Findzlib-ng.cmake"
355+
"${CMAKE_CURRENT_LIST_DIR}/cmake/modules/Findmodp_b64.cmake"
356+
DESTINATION ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake)
357+
358+
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config/Config.cmake.in
359+
"${CMAKE_CURRENT_BINARY_DIR}/cesium-nativeConfig.cmake"
360+
INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake)
361+
362+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cesium-nativeConfig.cmake
363+
DESTINATION ${CMAKE_INSTALL_DATADIR}/cesium-native/cmake)
364+
endif()

cmake/macros/configure_cesium_library.cmake

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ function(configure_cesium_library targetName)
5454
${capitalizedTargetName}_BUILDING
5555
)
5656

57-
install(TARGETS ${targetName}
58-
EXPORT CesiumExports
59-
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
60-
)
57+
if(CESIUM_INSTALL_STATIC_LIBS AND CESIUM_INSTALL_HEADERS)
58+
install(TARGETS ${targetName}
59+
EXPORT CesiumExports
60+
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
61+
)
62+
endif()
6163

6264
if(CESIUM_INSTALL_HEADERS)
6365
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include

0 commit comments

Comments
 (0)