Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] remove hardcoded installation paths to system path #11

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[ENH] remove hardcoded installation paths to system path
Installation path must be controled by CMAKE_INSTALL_PREFIX
Installation path of OTB applications is controled by OTB_INSTALL_APP_DIR in the cmake macro used to creation application
  • Loading branch information
savmickael committed Nov 21, 2017
commit 95e3d68bcf35c655858d88c7613b944dab13d67e
11 changes: 6 additions & 5 deletions sen2agri-processors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})

add_definitions(-DVCL_CAN_STATIC_CONST_INIT_FLOAT=0)

if(NOT OTB_INSTALL_APP_DIR)
set(OTB_INSTALL_APP_DIR "lib/otb/applications/")
endif()

add_subdirectory(MACCSMetadata)
add_subdirectory(Composite)
add_subdirectory(CropType)
Expand All @@ -26,7 +30,7 @@ add_subdirectory(Common)
add_subdirectory(ContinuousColorMapping)
#add_subdirectory(AppDimensionalityReduction)

install(FILES ../scripts/sen2agri_common.py
install(PROGRAMS ../scripts/sen2agri_common.py
../scripts/split_shapefile.py
DESTINATION usr/lib/python2.7/site-packages/)

Expand All @@ -35,10 +39,7 @@ install(FILES ../scripts/insert_l2a_product_to_db.py
../scripts/job_operations.py
../sen2agri-ctl/sen2agri-ctl.py
../scripts/filter_site_download_tiles.py
DESTINATION usr/bin/
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
DESTINATION bin/)

install(FILES dist/sen2agri-disable-thp.conf
DESTINATION usr/lib/tmpfiles.d)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_ComputeConfusionMatrixMulti DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ include_directories(../Filters)

add_dependencies(otbapp_CropMaskImageClassifier OTBExtensions)

install(TARGETS otbapp_CropMaskImageClassifier DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ include_directories(../OTBExtensions)

add_dependencies(otbapp_CropMaskStatistics OTBExtensions)

install(TARGETS otbapp_CropMaskStatistics DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ include_directories(../../Common/OTBExtensions)

add_dependencies(otbapp_BandsExtractor OTBExtensions)

install(TARGETS otbapp_CropMaskTrainImagesClassifier DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ include_directories(../Filters)

add_dependencies(otbapp_CropTypeImageClassifier OTBExtensions)

install(TARGETS otbapp_CropTypeImageClassifier DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ include_directories(../OTBExtensions)

add_dependencies(otbapp_CropTypeStatistics OTBExtensions)

install(TARGETS otbapp_CropTypeStatistics DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ endif()
include_directories(../../Common/OTBExtensions)

add_dependencies(otbapp_BandsExtractor OTBExtensions)

install(TARGETS otbapp_CropTypeTrainImagesClassifier DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ otb_create_application(
otbMultiModelImageClassificationFilter.txx
LINK_LIBRARIES ${OTB_LIBRARIES})

install(TARGETS otbapp_MultiModelImageClassifier DESTINATION usr/lib/otb/applications/)
1 change: 0 additions & 1 deletion sen2agri-processors/Common/NDVISeries/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ include_directories(../OTBExtensions)

add_dependencies(otbapp_NDVISeries OTBExtensions)

install(TARGETS otbapp_NDVISeries DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_TrainImagesClassifierNew DESTINATION usr/lib/otb/applications/)
2 changes: 0 additions & 2 deletions sen2agri-processors/Common/XMLStatistics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_XMLStatistics DESTINATION usr/lib/otb/applications/)
13 changes: 6 additions & 7 deletions sen2agri-processors/Composite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ add_subdirectory(DirectionalCorrection)
add_subdirectory(CompositePreprocessing)
add_subdirectory(QuantifyImage)

install(FILES TestScripts/composite_processing.py
TestScripts/composite_processing_CS.py
DESTINATION usr/bin/
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
install(PROGRAMS TestScripts/composite_processing.py
TestScripts/composite_processing_CS.py
DESTINATION bin/)
# DESTINATION bin/python)

install(FILES TestScripts/bands_mapping_s2.txt
TestScripts/bands_mapping_s2_L8.txt
Expand All @@ -29,4 +27,5 @@ install(FILES TestScripts/bands_mapping_s2.txt
TestScripts/scattering_coeffs_droy_10m.txt
TestScripts/scattering_coeffs_droy_20m.txt
composite.map
DESTINATION usr/share/sen2agri/)
DESTINATION share/sen2agri/)

2 changes: 1 addition & 1 deletion sen2agri-processors/Composite/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ target_link_libraries(MetadataHelper

target_include_directories(MetadataHelper PUBLIC .)

install(TARGETS MetadataHelper DESTINATION usr/lib/)
install(TARGETS MetadataHelper DESTINATION lib/)
1 change: 0 additions & 1 deletion sen2agri-processors/Composite/MaskHandler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_MaskHandler DESTINATION usr/lib/otb/applications/)
2 changes: 0 additions & 2 deletions sen2agri-processors/Composite/QuantifyImage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_QuantifyImage DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_TotalWeight DESTINATION usr/lib/otb/applications/)
2 changes: 0 additions & 2 deletions sen2agri-processors/ContinuousColorMapping/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_ContinuousColorMapping DESTINATION usr/lib/otb/applications/)
2 changes: 0 additions & 2 deletions sen2agri-processors/CreateFootprint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_CreateFootprint DESTINATION usr/lib/otb/applications/)
9 changes: 3 additions & 6 deletions sen2agri-processors/CropMask/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ add_subdirectory(FeaturesWithInsitu)
add_subdirectory(FeaturesWithoutInsitu)
add_subdirectory(SpectralFeaturesExtraction)

install(FILES ../../scripts/CropMask.py ../../scripts/CropMaskFused.py
DESTINATION usr/bin/
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
install(PROGRAMS ../../scripts/CropMask.py ../../scripts/CropMaskFused.py
DESTINATION bin/)

install(FILES crop-mask.lut
DESTINATION usr/share/sen2agri)
DESTINATION share/sen2agri)
2 changes: 0 additions & 2 deletions sen2agri-processors/CropMask/DataSmoothing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_DataSmoothing DESTINATION usr/lib/otb/applications/)
2 changes: 0 additions & 2 deletions sen2agri-processors/CropMask/Erosion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_Erosion DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_FeaturesWithInsitu DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_FeaturesWithoutInsitu DESTINATION usr/lib/otb/applications/)
1 change: 0 additions & 1 deletion sen2agri-processors/CropMask/FillNoData/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ otb_create_application(

include_directories(../../Common/Filters)

install(TARGETS otbapp_FillNoData DESTINATION usr/lib/otb/applications/)
1 change: 0 additions & 1 deletion sen2agri-processors/CropMask/MajorityVoting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_MajorityVoting DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_MeanShiftSegmentation DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_RandomForestTraining DESTINATION usr/lib/otb/applications/)
2 changes: 0 additions & 2 deletions sen2agri-processors/CropMask/RandomSelection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_RandomSelection DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ endif()

add_dependencies(otbapp_SpectralFeaturesExtraction OTBExtensions)

install(TARGETS otbapp_SpectralFeaturesExtraction DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_TemporalFeaturesNoInsitu DESTINATION usr/lib/otb/applications/)
2 changes: 0 additions & 2 deletions sen2agri-processors/CropMask/Trimming/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_Trimming DESTINATION usr/lib/otb/applications/)
1 change: 0 additions & 1 deletion sen2agri-processors/CropType/BandsExtractor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_BandsExtractor DESTINATION usr/lib/otb/applications/)
10 changes: 4 additions & 6 deletions sen2agri-processors/CropType/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ add_subdirectory(FeatureExtraction)
add_subdirectory(TemporalResampling)
add_subdirectory(QualityFlagsExtractor)

install(FILES ../../scripts/CropType.py ../../scripts/CropTypeFused.py
DESTINATION usr/bin/
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)
install(PROGRAMS ../../scripts/CropType.py ../../scripts/CropTypeFused.py
DESTINATION bin/)
# DESTINATION bin/python/)

install(FILES crop-type.lut
DESTINATION usr/share/sen2agri)
DESTINATION share/sen2agri)
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_FeatureExtraction DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_FeatureExtraction DESTINATION lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_FeatureExtractionOld DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_QualityFlagsExtractor DESTINATION usr/lib/otb/applications/)
2 changes: 0 additions & 2 deletions sen2agri-processors/CropType/SampleSelection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ otb_create_application(
if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_SampleSelection DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ if(BUILD_TESTING)
add_subdirectory(test)
endif()

install(TARGETS otbapp_TemporalResampling DESTINATION usr/lib/otb/applications/)
2 changes: 0 additions & 2 deletions sen2agri-processors/DEM-WB/DownloadSWBD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ find_package(Boost REQUIRED COMPONENTS filesystem)
otb_create_application(NAME DownloadSWBDTiles
SOURCES otbDownloadSWBDTiles.cxx
LINK_LIBRARIES OTBCommon OTBCurlAdapters "${Boost_LIBRARIES}")

install(TARGETS otbapp_DownloadSWBDTiles DESTINATION usr/lib/otb/applications/)
3 changes: 1 addition & 2 deletions sen2agri-processors/MACCSMetadata/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@ otb_create_application(

target_include_directories(MACCSMetadata PUBLIC ../include)

install(TARGETS MACCSMetadata DESTINATION usr/lib/)
install(TARGETS MACCSMetadata DESTINATION lib/)

install(TARGETS otbapp_ProductFormatter DESTINATION usr/lib/otb/applications/)
11 changes: 5 additions & 6 deletions sen2agri-processors/VegetationStatus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ add_subdirectory(otb-bv/src)
add_subdirectory(phenotb/src)
add_subdirectory(temporalgapfilling/src)

install(FILES TestScripts/lai_retrieve_processing.py
TestScripts/pheno_processing.py
DESTINATION usr/bin/
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE)

install(PROGRAMS TestScripts/lai_retrieve_processing.py
TestScripts/lai_retrieve_processing_CS.py
TestScripts/pheno_processing.py
DESTINATION bin/)
# DESTINATION bin/python)
install(FILES lai.map
LaiCommonBVDistributionSamples.txt
DESTINATION usr/share/sen2agri)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,3 @@ otb_create_application(
add_executable(testSimus testSimus.cxx)
target_link_libraries(testSimus ${OTB_LIBRARIES} OTBBVUtil gsl gslcblas)

install(TARGETS otbapp_BVInputVariableGeneration DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_ProSailSimulator DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_ProSailSimulatorNew DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_InverseModelLearning DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_BVInversion DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_BVImageInversion DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_ProfileReprocessing DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_TrainingDataGenerator DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_TrainingDataGeneratorNew DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_NdviRviExtraction2 DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_NdviRviExtractionNew DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_TimeSeriesBuilder DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_GetLaiRetrievalModel DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_ReprocessedProfileSplitter2 DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_GenerateLaiMonoDateMaskFlags DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

add_library(OTBBVUtil otbBVUtil.cxx)

install(TARGETS OTBBVUtil DESTINATION usr/lib/)
install(TARGETS OTBBVUtil DESTINATION lib/)
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,3 @@ target_link_libraries(pheno-metrics-simulator ${OTB_LIBRARIES} OTBPheno)
add_executable(pheno-metrics-estimator pheno-metrics-estimator.cxx)
target_link_libraries(pheno-metrics-estimator ${OTB_LIBRARIES} OTBPheno)

install(TARGETS otbapp_PhenologicalNDVIMetrics DESTINATION usr/lib/otb/applications/)
install(TARGETS otbapp_PhenoMetricsSplitter DESTINATION usr/lib/otb/applications/)
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
add_library(OTBPheno dateUtils.cxx phenoFunctions.cxx miscUtils.cxx)
target_link_libraries(OTBPheno ITKOptimizers boost_regex)

install(TARGETS OTBPheno DESTINATION usr/lib/)
install(TARGETS OTBPheno DESTINATION lib/)