Skip to content

Commit

Permalink
changes for vcpkg (#2597)
Browse files Browse the repository at this point in the history
Updates to help osgEarth build and install properly with vcpkg
  • Loading branch information
plevy authored Jul 24, 2024
1 parent b994103 commit 0f0ecc7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,4 @@ configure_file(

add_custom_target(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake"
)
)
14 changes: 7 additions & 7 deletions cmake/install-package-config-files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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} )

Expand Down
2 changes: 1 addition & 1 deletion cmake/osgearth-macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,4 @@ macro(configure_shaders templateFile autoGenCppFile)
"${TEMPLATE_FILE}"
"${PROJECT_SOURCE_DIR}/cmake/ConfigureShaders.cmake.in" )

endmacro(configure_shaders)
endmacro(configure_shaders)
File renamed without changes.
3 changes: 2 additions & 1 deletion src/osgEarth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 0f0ecc7

Please sign in to comment.