On Wed, Sep 9, 2015 at 12:48 PM, Agustin Lobo <[email protected]> wrote:
> Thanks but this does not solve my main question, just the example.
> What I want to know
> is hot to compile any cxx with the otb library, not just the ones of
> the examples.
> So, assuming the cmake option you mention would not exsit, how would I
> compile that cxx?
>
given you have an application code similar as existing. write a
simpleCMakeLists.txt
find_package(OTB)
include_directories(${OTB_INCLUDE_DIRS})
add_executable(yourapp <sources>
target_link_libraries(yourapp ${OTB_LIBRARIES} )
OTB_INCLUDE_DIRS contains list of all installed header files path in your
OTB installation.
OTB_LIBRARIES contains list of all installed libraries in your OTB
installation
Now when you call cmake you need to pass
OTB_DIR=</path/to/otb-install-prefix/lib/cmake/OTB-5.0> as a cmake define
cmake -DOTB_DIR=</path/to/otb-install-prefix/lib/cmake/OTB-5.0>
Have a look at the CMakeLists.txt in Examples directory and see the
find_package part I was talking about.
https://git.orfeo-toolbox.org/otb.git/blob/refs/heads/develop:/Examples/CMakeLists.txt
> Agus
>
> On Wed, Sep 9, 2015 at 9:54 AM, Rashad M <[email protected]>
> wrote:
> > Hi Agustin,
> >
> > On Wed, Sep 9, 2015 at 9:33 AM, Agustin Lobo <[email protected]>
> wrote:
> >>
> >> How can I make my own otbcli application
> >> for, i.e.,
> >>
> >>
> >>
> https://github.com/inglada/OTB/blob/master/Examples/Patented/EstimateAffineTransformationExample.cxx
> >> ?
> >> In other words, how do I compile that example?
> >
> >
> > you can build examples by setting cmake variable BUILD_EXAMPLES=ON during
> > configure. This set to OFF by default.
> >
> >>
> >>
> >> Agus
> >>
> >> --
> >> --
> >> Check the OTB FAQ at
> >> http://www.orfeo-toolbox.org/FAQ.html
> >>
> >> You received this message because you are subscribed to the Google
> >> Groups "otb-users" group.
> >> To post to this group, send email to [email protected]
> >> To unsubscribe from this group, send email to
> >> [email protected]
> >> For more options, visit this group at
> >> http://groups.google.com/group/otb-users?hl=en
> >> ---
> >> You received this message because you are subscribed to the Google
> Groups
> >> "otb-users" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to [email protected].
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
> >
> >
> > --
> > Regards,
> > Rashad
> >
> > --
> > --
> > Check the OTB FAQ at
> > http://www.orfeo-toolbox.org/FAQ.html
> >
> > You received this message because you are subscribed to the Google
> > Groups "otb-users" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/otb-users?hl=en
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "otb-users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> --
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
>
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
Regards,
Rashad
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.