Re: [CMake] CMake generation for Android & iPhone development

2012-03-15 Thread Robert Dailey
The android-cmake project sounds interesting, but I have my own set of
generic CMake modules that i currently use to generate targets for projects
that run on Windows and Linux. I'd need to be able to setup those same
generic scripts to be able to generate targets for building with ndk on
Android as well.

What's a simple, bare-bones example of a CMakeLists.txt script that creates
an executable that can build source to run on an Android device? Hopefully
as simple as:

add_executable( android-test main.cpp )

-
Robert Dailey


On Sun, Feb 5, 2012 at 1:00 AM, Doug  wrote:

> http://code.google.com/p/android-cmake/
>
> Have a look at the opencv for android example; it's a quickstart guide for
> android~
>
> ~
> Doug.
>
> On Sun, Feb 5, 2012 at 9:07 AM, Robert Dailey  wrote:
>
>> Can someone briefly go over the possibility of using CMake to generate
>> projects for Android development and iPhone/iPad development?
>>
>> I remember trying to generate XCode projects a couple years ago for
>> iPhone development, but it wasn't quite supported. How are things now?
>>
>> And what about Android development? I haven't looked at how to develop
>> for android, but I'd love to hear if it is possible to generate Eclipse
>> projects for Android.
>>
>> -
>> Robert Dailey
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Wrong cl.exe getting picked up

2012-03-15 Thread James Bigler
On Thu, Mar 15, 2012 at 1:30 PM, John Drescher  wrote:

> > OK, but it does try to fill in the CMAKE_C_COMPILER value.  What are you
> > suggesting?  That this is a bug or some kind of mistake on my part
> thinking
> > that the value in CMAKE_C_COMPILER is somehow relevant for Visual Studio
> > targets?
> >
>
> CMAKE_C_COMPILER is not used for Visual Studio targets
>

If that's the case then the value should never be defined or defined to
something like CMAKE_C_COMPILER-NOTFOUND or
CMAKE_C_COMPILER-NOTUSEDFORVISUALSTUDIO.

This behavior isn't documented anywhere, and even if it was documented it's
confusing to have the system define variables that it will never use.

James
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CPack : RPM : architecture in the name

2012-03-15 Thread Alexander Neundorf
On Thursday 15 March 2012, Barth wrote:
> Dear all,
> 
> I found a mail in the archives discussing the naming of RPMs (30 dec.
> 2009). Indeed, a standard RPM name contains the architecture and not
> "Linux".
> 
> I am wondering if it is possible to do it now ? I use CMake 2.8.6. I still
> get an error when setting CPACK_RPM_PACKAGE_ARCHITECTURE but is there
> another way to achieve this ?

I append the architecture string simply to CPACK_SYSTEM_NAME. Not sure whether 
there is a better way.

Alex
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Wrong cl.exe getting picked up

2012-03-15 Thread John Drescher
> OK, but it does try to fill in the CMAKE_C_COMPILER value.  What are you
> suggesting?  That this is a bug or some kind of mistake on my part thinking
> that the value in CMAKE_C_COMPILER is somehow relevant for Visual Studio
> targets?
>

CMAKE_C_COMPILER is not used for Visual Studio targets
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Wrong cl.exe getting picked up

2012-03-15 Thread James Bigler
On Thu, Mar 15, 2012 at 6:46 AM, Bill Hoffman wrote:

> On 3/14/2012 6:39 PM, James Bigler wrote:
>
>> I have a system with several copies of Visual Studio installed.
>>
>> When I set the generator for "Visual Studio 9 2008" it ends up picking
>> up a different compiler:
>>
>> CMAKE_C_COMPILER:FILEPATH=C:/**Program Files (x86)/SCE/Common/VSI/bin/cl.
>> **exe
>>
>> I think this is because of the following code in
>> CMakeDetermineCCompiler.cmake (which I can't figure out how it's invokes
>> by the cmake-gui or cmake.exe):
>>
>>   # Find the compiler.
>>   IF (_CMAKE_USER_CXX_COMPILER_**PATH)
>> FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} PATHS
>> ${_CMAKE_USER_CXX_COMPILER_**PATH} DOC "C compiler" NO_DEFAULT_PATH)
>>   ENDIF (_CMAKE_USER_CXX_COMPILER_**PATH)
>>   FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} DOC "C
>> compiler")
>>
>>   IF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
>> SET(CMAKE_C_COMPILER "${CMAKE_C_COMPILER_INIT}" CACHE FILEPATH "C
>> compiler" FORCE)
>>   ENDIF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
>>
>> I believe the CMAKE_C_COMPILER_LIST contains "cl" as is the default of
>> CMAKE_GENERATOR_CC for VS generators.
>>
>> Typically VS isn't in the default path, so the first two FIND_PROGRAM
>> commands don't yield any usable results.  Then the next block sets the
>> CMAKE_C_COMPILER to "cl", and everything is OK, because if it's run from
>> within the project, VS sets the paths so its cl.exe is first.
>>
>> However if there is another cl.exe in the system PATH, then that version
>> will get picked up by the second FIND_PROGRAM, and thus cause a bit of
>> trouble later on when the copies of cl.exe aren't the same.
>>
>> Does this seem like a bug to anyone?  It seems like if you would want cl
>> to point to the same version as your copy of Visual Studio.  Perhaps
>> $(VCInstallDir) could be used with a custom command to generate what VS
>> thinks the path should be?
>>
>> Anyone have any thoughts?
>>
>> I'm using CMake 2.8.2 and 2.8.6 on windows.
>>
>>
> So, with the IDE generators CMake should not even look for cl.  It does
> not use that value anyway.
>
> -Bill
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/**CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/**listinfo/cmake
>

OK, but it does try to fill in the CMAKE_C_COMPILER value.  What are you
suggesting?  That this is a bug or some kind of mistake on my part thinking
that the value in CMAKE_C_COMPILER is somehow relevant for Visual Studio
targets?

Thanks,
James
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] ctest script: how to get make program

2012-03-15 Thread David Cole
The cross platform equivalent of:

  make install -i

is:

  cmake --build . --target install


On Thu, Mar 15, 2012 at 5:28 AM, Olivier Pierard
 wrote:
> Dear all,
>
> At the end of my ctest script (I'm using cmake 2.8.0), I perform a 'make
> install' with an 'execute_process' command:
>
> execute_process(COMMAND "make" "install" "-i" WORKING_DIRECTORY
> ${CTEST_BINARY_DIRECTORY} RESULT_VARIABLE makeInstallResult
> OUTPUT_VARIABLE makeInstallLog ERROR_VARIABLE makeInstallLog)
>
> However, 'make' should be replaced by the cmake cache variable
> 'CMAKE_MAKE_PROGRAM' for portability.
>
> I tried, without success to use the get_cmake_property / get_property
> functions.  Would it be possible to have an example on how to use this ?
>
> By the way, I'm surprised that there is no 'ctest_install' command
> (instead of using the command above) after compilation/tests ?  Is it
> intended or am I missing something ?
>
> Thanks for your help,
>
> Olivier
>
> --
>
> *
> *
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CPack : RPM : architecture in the name

2012-03-15 Thread Barth
Dear all, 

I found a mail in the archives discussing the naming of RPMs (30 dec. 2009).
Indeed, a standard RPM name contains the architecture and not "Linux". 
 
I am wondering if it is possible to do it now ? I use CMake 2.8.6. I still
get an error when setting CPACK_RPM_PACKAGE_ARCHITECTURE but is there
another way to achieve this ? 

Thank you
Barth

--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-RPM-architecture-in-the-name-tp7375562p7375562.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Wrong cl.exe getting picked up

2012-03-15 Thread Bill Hoffman

On 3/14/2012 6:39 PM, James Bigler wrote:

I have a system with several copies of Visual Studio installed.

When I set the generator for "Visual Studio 9 2008" it ends up picking
up a different compiler:

CMAKE_C_COMPILER:FILEPATH=C:/Program Files (x86)/SCE/Common/VSI/bin/cl.exe

I think this is because of the following code in
CMakeDetermineCCompiler.cmake (which I can't figure out how it's invokes
by the cmake-gui or cmake.exe):

   # Find the compiler.
   IF (_CMAKE_USER_CXX_COMPILER_PATH)
 FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} PATHS
${_CMAKE_USER_CXX_COMPILER_PATH} DOC "C compiler" NO_DEFAULT_PATH)
   ENDIF (_CMAKE_USER_CXX_COMPILER_PATH)
   FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} DOC "C
compiler")

   IF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)
 SET(CMAKE_C_COMPILER "${CMAKE_C_COMPILER_INIT}" CACHE FILEPATH "C
compiler" FORCE)
   ENDIF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER)

I believe the CMAKE_C_COMPILER_LIST contains "cl" as is the default of
CMAKE_GENERATOR_CC for VS generators.

Typically VS isn't in the default path, so the first two FIND_PROGRAM
commands don't yield any usable results.  Then the next block sets the
CMAKE_C_COMPILER to "cl", and everything is OK, because if it's run from
within the project, VS sets the paths so its cl.exe is first.

However if there is another cl.exe in the system PATH, then that version
will get picked up by the second FIND_PROGRAM, and thus cause a bit of
trouble later on when the copies of cl.exe aren't the same.

Does this seem like a bug to anyone?  It seems like if you would want cl
to point to the same version as your copy of Visual Studio.  Perhaps
$(VCInstallDir) could be used with a custom command to generate what VS
thinks the path should be?

Anyone have any thoughts?

I'm using CMake 2.8.2 and 2.8.6 on windows.



So, with the IDE generators CMake should not even look for cl.  It does 
not use that value anyway.


-Bill

--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] ctest script: how to get make program

2012-03-15 Thread Olivier Pierard
Dear all,

At the end of my ctest script (I'm using cmake 2.8.0), I perform a 'make
install' with an 'execute_process' command:

execute_process(COMMAND "make" "install" "-i" WORKING_DIRECTORY
${CTEST_BINARY_DIRECTORY} RESULT_VARIABLE makeInstallResult
OUTPUT_VARIABLE makeInstallLog ERROR_VARIABLE makeInstallLog)

However, 'make' should be replaced by the cmake cache variable
'CMAKE_MAKE_PROGRAM' for portability.

I tried, without success to use the get_cmake_property / get_property
functions.  Would it be possible to have an example on how to use this ?

By the way, I'm surprised that there is no 'ctest_install' command
(instead of using the command above) after compilation/tests ?  Is it
intended or am I missing something ?

Thanks for your help,

Olivier

-- 

*
*


--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake