diff --git a/Modules/Learning/LearningBase/CMakeLists.txt b/Modules/Learning/LearningBase/CMakeLists.txt index b3460da963ae8c229aee0b34e3120fb27d27d6ec..45b573a3dc2006a8f638f7b81a80880adebc334a 100644 --- a/Modules/Learning/LearningBase/CMakeLists.txt +++ b/Modules/Learning/LearningBase/CMakeLists.txt @@ -20,4 +20,6 @@ project(OTBLearningBase) +set(OTBLearningBase_LIBRARIES OTBLearningBase) + otb_module_impl() diff --git a/Modules/Learning/LearningBase/include/otbMachineLearningModelFactoryBase.h b/Modules/Learning/LearningBase/include/otbMachineLearningModelFactoryBase.h index 0ca61f2c37483d0735c146f9355b4a4a8d4c5d35..012e0f1d77935bf1fffaed129bebcf8a8492368f 100644 --- a/Modules/Learning/LearningBase/include/otbMachineLearningModelFactoryBase.h +++ b/Modules/Learning/LearningBase/include/otbMachineLearningModelFactoryBase.h @@ -22,7 +22,7 @@ #define otbMachineLearningModelFactoryBase_h #include "itkMutexLock.h" -#include "OTBSupervisedExport.h" +#include "OTBLearningBaseExport.h" namespace otb { @@ -34,7 +34,7 @@ namespace otb * * \ingroup OTBLearningBase */ -class OTBSupervised_EXPORT MachineLearningModelFactoryBase : public itk::Object +class OTBLearningBase_EXPORT MachineLearningModelFactoryBase : public itk::Object { public: /** Standard class typedefs. */ diff --git a/Modules/Learning/LearningBase/otb-module.cmake b/Modules/Learning/LearningBase/otb-module.cmake index b4fab23bbaec200852575ff64dbb2424475542c6..5d45c1c962f03e95df23409a04e19e6ce69799ea 100644 --- a/Modules/Learning/LearningBase/otb-module.cmake +++ b/Modules/Learning/LearningBase/otb-module.cmake @@ -22,6 +22,7 @@ set(DOCUMENTATION "This module contains OTB generic Machine Learning framework mainly based on OpenCV.") otb_module(OTBLearningBase + ENABLE_SHARED DEPENDS OTBCommon OTBITK diff --git a/Modules/Learning/LearningBase/src/CMakeLists.txt b/Modules/Learning/LearningBase/src/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..9e7a49db7ff7e9ff21dbde70c03592d64fc644f6 --- /dev/null +++ b/Modules/Learning/LearningBase/src/CMakeLists.txt @@ -0,0 +1,31 @@ +# +# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES) +# +# This file is part of Orfeo Toolbox +# +# https://www.orfeo-toolbox.org/ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set(OTBLearningBase_SRC + otbMachineLearningModelFactoryBase.cxx + ) + +add_library(OTBLearningBase ${OTBLearningBase_SRC}) +target_link_libraries(OTBLearningBase + ${OTBCommon_LIBRARIES} + ${OTBITK_LIBRARIES} + ) + +otb_module_target(OTBLearningBase) diff --git a/Modules/Learning/Supervised/src/otbMachineLearningModelFactoryBase.cxx b/Modules/Learning/LearningBase/src/otbMachineLearningModelFactoryBase.cxx similarity index 100% rename from Modules/Learning/Supervised/src/otbMachineLearningModelFactoryBase.cxx rename to Modules/Learning/LearningBase/src/otbMachineLearningModelFactoryBase.cxx diff --git a/Modules/Learning/Supervised/src/CMakeLists.txt b/Modules/Learning/Supervised/src/CMakeLists.txt index 7a3c77b3a7e2992216d16f444178abb697424dc0..45e881904bbbf61bec7bb8a158f8661806d64896 100644 --- a/Modules/Learning/Supervised/src/CMakeLists.txt +++ b/Modules/Learning/Supervised/src/CMakeLists.txt @@ -19,7 +19,6 @@ # set(OTBSupervised_SRC - otbMachineLearningModelFactoryBase.cxx otbExhaustiveExponentialOptimizer.cxx ) @@ -33,6 +32,7 @@ target_link_libraries(OTBSupervised ${OTBLibSVM_LIBRARIES} ${OTBOpenCV_LIBRARIES} ${OTBShark_LIBRARIES} + ${OTBLearningBase_LIBRARIES} ) otb_module_target(OTBSupervised)