diff --git a/CMakeLists.txt b/CMakeLists.txt index 04ebc16335..ab20dc1095 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,4 +211,4 @@ configure_file( add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake" -) \ No newline at end of file +) diff --git a/cmake/install-package-config-files.cmake b/cmake/install-package-config-files.cmake index 926f7fe049..01c9e2805e 100644 --- a/cmake/install-package-config-files.cmake +++ b/cmake/install-package-config-files.cmake @@ -2,31 +2,31 @@ function(osgearth_install_package_config_files TARGET TARGET_VERSION INCLUDE_INS include(CMakePackageConfigHelpers) - set(PACKAGE_INSTALL_DIR share) + set(PACKAGE_INSTALL_DIR share/osgearth) #set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}) #set(LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}) configure_package_config_file( - "${TARGET}Config.cmake.in" - "${TARGET}Config.cmake" + "${TARGET}-config.cmake.in" + "${TARGET}-config.cmake" INSTALL_DESTINATION ${PACKAGE_INSTALL_DIR} PATH_VARS INCLUDE_INSTALL_DIR LIBRARY_INSTALL_DIR) write_basic_package_version_file( - "${TARGET}ConfigVersion.cmake" + "${TARGET}-configVersion.cmake" VERSION ${TARGET_VERSION} COMPATIBILITY AnyNewerVersion) install( EXPORT ${TARGET}Targets - FILE ${TARGET}Targets.cmake + FILE ${TARGET}-targets.cmake NAMESPACE ${TARGET}:: DESTINATION ${PACKAGE_INSTALL_DIR} ) install( FILES - "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}Config.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}ConfigVersion.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}-configVersion.cmake" DESTINATION ${PACKAGE_INSTALL_DIR} ) diff --git a/cmake/osgearth-macros.cmake b/cmake/osgearth-macros.cmake index 173abd2fde..c548142211 100644 --- a/cmake/osgearth-macros.cmake +++ b/cmake/osgearth-macros.cmake @@ -446,4 +446,4 @@ macro(configure_shaders templateFile autoGenCppFile) "${TEMPLATE_FILE}" "${PROJECT_SOURCE_DIR}/cmake/ConfigureShaders.cmake.in" ) -endmacro(configure_shaders) \ No newline at end of file +endmacro(configure_shaders) diff --git a/osgEarthConfig.cmake.in b/osgEarth-config.cmake.in similarity index 100% rename from osgEarthConfig.cmake.in rename to osgEarth-config.cmake.in diff --git a/src/osgEarth/CMakeLists.txt b/src/osgEarth/CMakeLists.txt index 7a1f6a5530..f0f05ee73d 100644 --- a/src/osgEarth/CMakeLists.txt +++ b/src/osgEarth/CMakeLists.txt @@ -873,7 +873,8 @@ if(blosc_FOUND) message(STATUS "Found blosc") set(OSGEARTH_HAVE_BLOSC ON) include_directories(${BLOSC_INCLUDE_DIR}) - target_link_libraries(${LIB_NAME} PRIVATE blosc_shared) + string (TOLOWER ${OSGEARTH_DYNAMIC_OR_STATIC} shared_or_static) + target_link_libraries(${LIB_NAME} PRIVATE blosc_${shared_or_static}) endif() # GEOS support?