Skip to content
Snippets Groups Projects
Select Git revision
  • 6d4554c2fd61d8cec15232bd8b508406a09a80e2
  • master default protected
  • ia2
  • adql2.1-ia2
  • private_rows
5 results

buildUWS.xml

Blame
    • Grégory Mantelet's avatar
      a0ec16fc
      [UWS,TAP] Replacement of com.oreilly.servlet by Apache Commons File Upload. · a0ec16fc
      Grégory Mantelet authored
      Thus, the UPLOAD management is much more stable and relies on a well documented
      and maintained library (but at the cost of the additionnal size of the final
      JAR). The most important point is the capability to efficiently limit the size
      of the incoming file and on the disk/memory management when uploading the
      file(s) and in case of error during this process (i.e. files must be deleted).
      a0ec16fc
      History
      [UWS,TAP] Replacement of com.oreilly.servlet by Apache Commons File Upload.
      Grégory Mantelet authored
      Thus, the UPLOAD management is much more stable and relies on a well documented
      and maintained library (but at the cost of the additionnal size of the final
      JAR). The most important point is the capability to efficiently limit the size
      of the incoming file and on the disk/memory management when uploading the
      file(s) and in case of error during this process (i.e. files must be deleted).
    CMakeLists.txt 1.88 KiB
    cmake_minimum_required(VERSION 3.10)
    project(usgscsm VERSION 0.0.1 DESCRIPTION "usgscsm library")
      
    include(GoogleTest)
    include(cmake/gtest.cmake)
    include(GNUInstallDirs)
    
    set(CMAKE_CXX_STANDARD 11)
    
    # Optional build or link against CSM
    option (BUILD_CSM "Build the CSM library" ON)
    if(BUILD_CSM)
      add_subdirectory(csm)
      set(CSM_INCLUDE_DIR /csm)
      set(CSM_LIBRARY csmapi)
    else()
      find_path(CSM_INCLUDE_DIR NAMES "csm.h"
    			    PATH_SUFFIXES "csm"
    			    PATHS $ENV{CONDA_PREFIX}/include/)
      find_library(CSM_LIBRARY csmapi PATHS $ENV{CONDA_PREFIX}/lib)
    
      message("--Found CSM Library: ${CSM_LIBRARY}")
      message("--Found CSM Include Directory: ${CSM_INCLUDE_DIR}")
    endif(BUILD_CSM)
    
    add_library(usgscsm SHARED
                src/UsgsAstroPlugin.cpp
                src/UsgsAstroFrameSensorModel.cpp
                src/UsgsAstroLsSensorModel.cpp
                src/Distortion.cpp
    	    src/Utilities.cpp)
    
    set_target_properties(usgscsm PROPERTIES
        VERSION ${PROJECT_VERSION}
        SOVERSION 1
    )
    
    set(USGSCSM_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include/usgscsm"
                             "${CMAKE_CURRENT_SOURCE_DIR}/include/json")
    
    target_include_directories(usgscsm
                               PUBLIC
                               ${USGSCSM_INCLUDE_DIRS}
                               ${CSM_INCLUDE_DIR}
    )
    
    target_link_libraries(usgscsm
                          ${CSM_LIBRARY})
    
    if(WIN32)
      install(TARGETS usgscsm RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR})
    else()
      install(TARGETS usgscsm LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
    endif()
    install(DIRECTORY ${USGSCSM_INCLUDE_DIRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
    
    
    # Optional build or link against CSM
    option (BUILD_TESTS "Build tests" ON)
    if(BUILD_TESTS)
      
      # Setup for GoogleTest
      find_package (Threads)
    
      target_link_libraries(usgscsm
                            gtest ${CMAKE_THREAD_LIBS_INIT})
      include(CTest)
      enable_testing()
      add_subdirectory(tests)
    endif()