Re: [CMake] Trouble with FindPNG module

2017-04-24 Thread Andrew Fuller
Try adding this to your toolchain file:


set( CMAKE_C_LIBRARY_ARCHITECTURE "i386-linux-gnu" )

set( CMAKE_CXX_LIBRARY_ARCHITECTURE "i386-linux-gnu" )



From: rcdai...@gmail.com <rcdai...@gmail.com> on behalf of Robert Dailey 
<rcdailey.li...@gmail.com>
Sent: April 24, 2017 10:22:53 AM
To: Andrew Fuller
Cc: CMake
Subject: Re: [CMake] Trouble with FindPNG module

The output is:

x86_64-linux-gnu

How can I tell CMake to look for 32-bit libraries? I would like to
force this from my toolchain file (which I posted a few minutes ago)

On Mon, Apr 24, 2017 at 10:16 AM, Andrew Fuller <aful...@teradici.com> wrote:
> Where did the library get installed on your system?  What's the value of
> CMAKE__LIBRARY_ARCHITECTURE?
>
>
> Since you're on a 64-bit system, I'd expect CMake to be looking for 64-bit
> libraries unless you've told it otherwise.
>
> 
> From: CMake <cmake-boun...@cmake.org> on behalf of Robert Dailey
> <rcdailey.li...@gmail.com>
> Sent: April 24, 2017 7:54:18 AM
> To: CMake; CMake Developers
> Subject: Re: [CMake] Trouble with FindPNG module
>
> Sorry to bump; any info on this? I'm completely blocked :-(
>
> On Fri, Apr 21, 2017 at 4:48 PM, Robert Dailey <rcdailey.li...@gmail.com>
> wrote:
>> I'm running CMake 3.8.0 on Ubuntu 14. I invoke the following:
>>
>> find_package(PNG REQUIRED)
>>
>> Which gives me the output in CMake:
>>
>> Could NOT find PNG (missing: PNG_LIBRARY) (found version "1.2.50")
>>
>> The CMakeCache.txt file has these variables set:
>>
>> PNG_LIBRARY_DEBUG:FILEPATH=PNG_LIBRARY_DEBUG-NOTFOUND
>> PNG_LIBRARY_RELEASE:FILEPATH=PNG_LIBRARY_RELEASE-NOTFOUND
>> PNG_PNG_INCLUDE_DIR:PATH=/usr/include
>>
>> So it found the headers, but not the libs. Why did it not find the
>> libs? Note that my version of Ubuntu is 64-bit, and I've installed the
>> 32-bit libs like so:
>>
>> $ sudo apt-get install libpng12-dev:i386
>>
>> Would the find module be confused because it is trying to find the
>> 64-bit library? What's the issue?
> --
>
> Powered by www.kitware.com<http://www.kitware.com>
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Trouble with FindPNG module

2017-04-24 Thread Robert Dailey
Interestingly, the changes to my toolchain made below work:


set( CMAKE_SYSTEM_NAME Linux )
set( CMAKE_SYSTEM_VERSION 1 )
set( CMAKE_SYSTEM_PROCESSOR i386 )
set( CMAKE_C_COMPILER gcc-4.9 )
set( CMAKE_CXX_COMPILER g++-4.9 )
set( CMAKE_C_COMPILER_ARG1 -m32 )
set( CMAKE_CXX_COMPILER_ARG1 -m32 )


The only change here is that I'm using CMAKE_C_COMPILER_ARG1 and
CMAKE_CXX_COMPILER_ARG1. These are not documented anywhere. I only
found out about them from a post from Bill Hoffman (which I have lost
the URL to).

Is this the correct toolchain? At least find_package() is properly
finding 32-bit libraries now, so I am happy. Should
CMAKE_SYSTEM_PROCESSOR be i386 or i686?



On Mon, Apr 24, 2017 at 12:22 PM, Robert Dailey
<rcdailey.li...@gmail.com> wrote:
> The output is:
>
> x86_64-linux-gnu
>
> How can I tell CMake to look for 32-bit libraries? I would like to
> force this from my toolchain file (which I posted a few minutes ago)
>
> On Mon, Apr 24, 2017 at 10:16 AM, Andrew Fuller <aful...@teradici.com> wrote:
>> Where did the library get installed on your system?  What's the value of
>> CMAKE__LIBRARY_ARCHITECTURE?
>>
>>
>> Since you're on a 64-bit system, I'd expect CMake to be looking for 64-bit
>> libraries unless you've told it otherwise.
>>
>> 
>> From: CMake <cmake-boun...@cmake.org> on behalf of Robert Dailey
>> <rcdailey.li...@gmail.com>
>> Sent: April 24, 2017 7:54:18 AM
>> To: CMake; CMake Developers
>> Subject: Re: [CMake] Trouble with FindPNG module
>>
>> Sorry to bump; any info on this? I'm completely blocked :-(
>>
>> On Fri, Apr 21, 2017 at 4:48 PM, Robert Dailey <rcdailey.li...@gmail.com>
>> wrote:
>>> I'm running CMake 3.8.0 on Ubuntu 14. I invoke the following:
>>>
>>> find_package(PNG REQUIRED)
>>>
>>> Which gives me the output in CMake:
>>>
>>> Could NOT find PNG (missing: PNG_LIBRARY) (found version "1.2.50")
>>>
>>> The CMakeCache.txt file has these variables set:
>>>
>>> PNG_LIBRARY_DEBUG:FILEPATH=PNG_LIBRARY_DEBUG-NOTFOUND
>>> PNG_LIBRARY_RELEASE:FILEPATH=PNG_LIBRARY_RELEASE-NOTFOUND
>>> PNG_PNG_INCLUDE_DIR:PATH=/usr/include
>>>
>>> So it found the headers, but not the libs. Why did it not find the
>>> libs? Note that my version of Ubuntu is 64-bit, and I've installed the
>>> 32-bit libs like so:
>>>
>>> $ sudo apt-get install libpng12-dev:i386
>>>
>>> Would the find module be confused because it is trying to find the
>>> 64-bit library? What's the issue?
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Trouble with FindPNG module

2017-04-24 Thread Robert Dailey
The output is:

x86_64-linux-gnu

How can I tell CMake to look for 32-bit libraries? I would like to
force this from my toolchain file (which I posted a few minutes ago)

On Mon, Apr 24, 2017 at 10:16 AM, Andrew Fuller <aful...@teradici.com> wrote:
> Where did the library get installed on your system?  What's the value of
> CMAKE__LIBRARY_ARCHITECTURE?
>
>
> Since you're on a 64-bit system, I'd expect CMake to be looking for 64-bit
> libraries unless you've told it otherwise.
>
> 
> From: CMake <cmake-boun...@cmake.org> on behalf of Robert Dailey
> <rcdailey.li...@gmail.com>
> Sent: April 24, 2017 7:54:18 AM
> To: CMake; CMake Developers
> Subject: Re: [CMake] Trouble with FindPNG module
>
> Sorry to bump; any info on this? I'm completely blocked :-(
>
> On Fri, Apr 21, 2017 at 4:48 PM, Robert Dailey <rcdailey.li...@gmail.com>
> wrote:
>> I'm running CMake 3.8.0 on Ubuntu 14. I invoke the following:
>>
>> find_package(PNG REQUIRED)
>>
>> Which gives me the output in CMake:
>>
>> Could NOT find PNG (missing: PNG_LIBRARY) (found version "1.2.50")
>>
>> The CMakeCache.txt file has these variables set:
>>
>> PNG_LIBRARY_DEBUG:FILEPATH=PNG_LIBRARY_DEBUG-NOTFOUND
>> PNG_LIBRARY_RELEASE:FILEPATH=PNG_LIBRARY_RELEASE-NOTFOUND
>> PNG_PNG_INCLUDE_DIR:PATH=/usr/include
>>
>> So it found the headers, but not the libs. Why did it not find the
>> libs? Note that my version of Ubuntu is 64-bit, and I've installed the
>> 32-bit libs like so:
>>
>> $ sudo apt-get install libpng12-dev:i386
>>
>> Would the find module be confused because it is trying to find the
>> 64-bit library? What's the issue?
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Trouble with FindPNG module

2017-04-24 Thread Andrew Fuller
Where did the library get installed on your system?  What's the value of 
CMAKE__LIBRARY_ARCHITECTURE?


Since you're on a 64-bit system, I'd expect CMake to be looking for 64-bit 
libraries unless you've told it otherwise.


From: CMake <cmake-boun...@cmake.org> on behalf of Robert Dailey 
<rcdailey.li...@gmail.com>
Sent: April 24, 2017 7:54:18 AM
To: CMake; CMake Developers
Subject: Re: [CMake] Trouble with FindPNG module

Sorry to bump; any info on this? I'm completely blocked :-(

On Fri, Apr 21, 2017 at 4:48 PM, Robert Dailey <rcdailey.li...@gmail.com> wrote:
> I'm running CMake 3.8.0 on Ubuntu 14. I invoke the following:
>
> find_package(PNG REQUIRED)
>
> Which gives me the output in CMake:
>
> Could NOT find PNG (missing: PNG_LIBRARY) (found version "1.2.50")
>
> The CMakeCache.txt file has these variables set:
>
> PNG_LIBRARY_DEBUG:FILEPATH=PNG_LIBRARY_DEBUG-NOTFOUND
> PNG_LIBRARY_RELEASE:FILEPATH=PNG_LIBRARY_RELEASE-NOTFOUND
> PNG_PNG_INCLUDE_DIR:PATH=/usr/include
>
> So it found the headers, but not the libs. Why did it not find the
> libs? Note that my version of Ubuntu is 64-bit, and I've installed the
> 32-bit libs like so:
>
> $ sudo apt-get install libpng12-dev:i386
>
> Would the find module be confused because it is trying to find the
> 64-bit library? What's the issue?
--

Powered by www.kitware.com<http://www.kitware.com>

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Trouble with FindPNG module

2017-04-24 Thread Robert Dailey
Sorry to bump; any info on this? I'm completely blocked :-(

On Fri, Apr 21, 2017 at 4:48 PM, Robert Dailey  wrote:
> I'm running CMake 3.8.0 on Ubuntu 14. I invoke the following:
>
> find_package(PNG REQUIRED)
>
> Which gives me the output in CMake:
>
> Could NOT find PNG (missing: PNG_LIBRARY) (found version "1.2.50")
>
> The CMakeCache.txt file has these variables set:
>
> PNG_LIBRARY_DEBUG:FILEPATH=PNG_LIBRARY_DEBUG-NOTFOUND
> PNG_LIBRARY_RELEASE:FILEPATH=PNG_LIBRARY_RELEASE-NOTFOUND
> PNG_PNG_INCLUDE_DIR:PATH=/usr/include
>
> So it found the headers, but not the libs. Why did it not find the
> libs? Note that my version of Ubuntu is 64-bit, and I've installed the
> 32-bit libs like so:
>
> $ sudo apt-get install libpng12-dev:i386
>
> Would the find module be confused because it is trying to find the
> 64-bit library? What's the issue?
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake