<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10053</bug_id>
          
          <creation_ts>2016-07-29 19:52:10 +0000</creation_ts>
          <short_desc>cmake projects will not build as CMAKE_MODULE_PATH is set to wrong location</short_desc>
          <delta_ts>2016-10-28 13:15:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>eSDK</product>
          <component>eSDK</component>
          <version>2.1.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry Bruce">henry.bruce</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Francisco Pedraza">francisco.j.pedraza.gonzalez</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64676</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2016-07-29 19:52:10 +0000</bug_when>
    <thetext>Observed behavior
-----------------
When building a cmake application within eSDK, CMAKE_MODULE_PATH is set to /path/to/esdk/tmp/sysroots/$MACHINE/usr/share/cmake/Modules, but nativesdk-cmake installs files to /path/to/esdk/tmp/sysroots/x86_64-linux/usr/share/cmake-${PN}/Modules.

As a result all cmake package detection calls will fail with errors such as
|   By not providing &quot;FindOpenCV.cmake&quot; in CMAKE_MODULE_PATH this project has
|   asked CMake to find a package configuration file provided by &quot;OpenCV&quot;, but
|   CMake did not find one.


Expected behavior
-----------------
cmake project will be built as on native host.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64869</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-08-04 14:44:59 +0000</bug_when>
    <thetext>Looking at cmake.bbclass, it looks like this *is* target specific, list(APPEND CMAKE_MODULE_PATH &quot;${STAGING_DATADIR}/cmake/Modules/&quot;)
 which means we make need to install target cmake modules files into the sdk in order to support cmake?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67089</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-10-10 16:19:56 +0000</bug_when>
    <thetext>So I&apos;ve spent *way* too long learning all about the horrible ways that cmake does stupid things to piss you off.

That message is *so* misleading it&apos;s not even funny.

I&apos;ll note that for some reason the cmake files for opencv are part of opencv-apps, so it&apos;s entirely possible that they&apos;re not in the SDK.  Can you verify that you have a /usr/share/OpenCV/OpenCVConfig.cmake inside your SDK&apos;s target sysroot?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67092</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-10-10 16:32:11 +0000</bug_when>
    <thetext>https://patchwork.openembedded.org/patch/132795/ is my fix to opencv to put the cmake files into opencv-dev.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67195</commentid>
    <comment_count>4</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2016-10-12 23:45:21 +0000</bug_when>
    <thetext>Nice work. Ross. I have validated that the patch solves the problem. I&apos;ll leave open until patch is merged into meta-oe.

How do I request a backport for krogoth?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67198</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-10-13 08:39:47 +0000</bug_when>
    <thetext>Once it&apos;s merged remind me and I&apos;ll backport it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67364</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-10-19 15:06:24 +0000</bug_when>
    <thetext>Marking as 2.2 as this isn&apos;t actually a oe-core but, but meta-oe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67723</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-10-28 13:15:48 +0000</bug_when>
    <thetext>Fix to opencv merged in meta-oe fded4cf6a8cf1ff065af97f3283b55aeba458d28.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>