Re: [CMake] CPACK: configured variables in CMake file are ignored

2012-11-27 Thread Paolo Ciccone
Hi Eric.


 Do you mean that inside CPackConfig.cmake the value you(ve set before
 INCLUDE(CPack) are not used?


That is correct.


  Am I overlooking something?

 Not something obvious I think.
 Could it be possible that INCLUDE(CPack) has been called by a subproject
 before you actually do it in your main CMakeLists.txt?


Nope, there is only one CMakeLists.txt file and the CPack text is at the
end of it.


 Which CPack generator are you using?


PackageMaker


 Not all of them use CPACK_RESOURCE_* vars.

 Could you try from a fresh build tree in order to avoid potential
 cache effect.


I have deleted the cache and the gemerated CPack files several times
without effect.
BTW, also the CPACK_PACKAGE_VERSION_MAJOR, CPACK_PACKAGE_VERSION_MINOR,
and CPACK_PACKAGE_VERSION_PATCH variables are skipped and those should not
be generator-dependent.

Cheers.

--
Paolo
--

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: configured variables in CMake file are ignored

2012-11-27 Thread Eric Noulard
2012/11/27 Paolo Ciccone phcicc...@gmail.com:
 Hi Eric.


 Do you mean that inside CPackConfig.cmake the value you(ve set before
 INCLUDE(CPack) are not used?


 That is correct.

So this is plain wrong and I don't understand how it is possible??
We should first find to fix this before examining other issue.

You should definitely find the CPACK_xxx values you(ve set
in your CMakeLists.txt inside CPackConfig.cmake.

Could you send me/us  a sample minimalistic project
which exhibit the faulty behavior?

Which version of CMake/CPack are you using?
Could you transcript the exact command you launch when
configuring and packaging your project?


[...]

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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: configured variables in CMake file are ignored

2012-11-27 Thread Paolo Ciccone
I have prepared a testcase that I can use to replicate the issue all the
time.
I am running Mac OS 10.8.2 (ML) and I tested this case with both
CMake/CPack 2.8.10.1 and 2.8.9.

The command issued is simply:

cmake -G Xcode

You can find the test case, which is stripped down to almost nothing here:

https://dl.dropbox.com/u/3701566/cmake_cpack_test.zip

Hope this helps.

---
Paolo Ciccone
www.preta3d.com
www.paolociccone.com



On Tue, Nov 27, 2012 at 9:41 AM, Eric Noulard eric.noul...@gmail.comwrote:

 2012/11/27 Paolo Ciccone phcicc...@gmail.com:
  Hi Eric.
 
 
  Do you mean that inside CPackConfig.cmake the value you(ve set before
  INCLUDE(CPack) are not used?
 
 
  That is correct.

 So this is plain wrong and I don't understand how it is possible??
 We should first find to fix this before examining other issue.

 You should definitely find the CPACK_xxx values you(ve set
 in your CMakeLists.txt inside CPackConfig.cmake.

 Could you send me/us  a sample minimalistic project
 which exhibit the faulty behavior?

 Which version of CMake/CPack are you using?
 Could you transcript the exact command you launch when
 configuring and packaging your project?


 [...]

 --
 Erk
 Le gouvernement représentatif n'est pas la démocratie --
 http://www.le-message.org

--

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: configured variables in CMake file are ignored

2012-11-27 Thread Eric Noulard
2012/11/27 Paolo Ciccone phcicc...@gmail.com:
 I have prepared a testcase that I can use to replicate the issue all the
 time.
 I am running Mac OS 10.8.2 (ML) and I tested this case with both CMake/CPack
 2.8.10.1 and 2.8.9.

 The command issued is simply:

 cmake -G Xcode

 You can find the test case, which is stripped down to almost nothing here:

 https://dl.dropbox.com/u/3701566/cmake_cpack_test.zip

If you open your CMakeLists.txt in an hexadecimal editor you'll see
that you have spurious C2 A0 UTF-8 characters (unbreakable space) at the end of
the following variables:
CPACK_PACKAGE_VENDOR
CPACK_PACKAGE_VERSION_MAJOR
CPACK_PACKAGE_VERSION_MINOR
CPACK_PACKAGE_VERSION_PATCH
CPACK_PACKAGE_DESCRIPTION_SUMMARY
CPACK_RESOURCE_FILE_WELCOME
CPACK_RESOURCE_FILE_README
CPACK_RESOURCE_FILE_LICENSE

so statement  like

set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_CURRENT_SOURCE_DIR}/intro.rtf)

may be puzzling CMake because the extraneous unbreakable space may not be
considered as a separator.

On linux it seems to work but the behavior on the Mac may be different.
Could you try replacing your CMakeLists.txt with the one attached to this mail
and retry.


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
#
# MyApp 
#

cmake_minimum_required(VERSION 2.8)
# see http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0012
if(POLICY CMP0012)
  cmake_policy(SET CMP0012 OLD)
endif()
# see http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0015
if(POLICY CMP0015)
  cmake_policy(SET CMP0015 OLD)
endif()


# Set the project name 
PROJECT(My Project)

#
# OS abbreviation
#
IF(APPLE) 
  SET(OS_CODE M)
ELSEIF(WIN32)
  SET(OS_CODE W)
ENDIF()

SET(CMAKE_CONFIGURATION_TYPES Debug;Release CACHE STRING limit configs 
FORCE)

#
# Version number
#
SET(MY_VERSION_MAJOR 3)
SET(MY_VERSION_MINOR 0)
SET(MY_VERSION_PATCH 0)

SET(MY_VERSION ${MY_VERSION_MAJOR}.${MY_VERSION_MINOR}.${MY_VERSION_PATCH})

  

#
# Targets
#
ADD_CUSTOM_TARGET(REBUILD_UI COMMAND echo Rebuilding the UI files...)


#
# Installer
#

INCLUDE(InstallRequiredSystemLibraries)

SET(CPACK_PACKAGE_NAME MyApp ${MY_VERSION_MAJOR} ${HOST_NAME})
SET(CPACK_PACKAGE_VENDOR Pret-a-3D)

SET(CPACK_PACKAGE_VERSION 3.0.0)
SET(CPACK_PACKAGE_VERSION_MAJOR 3)
SET(CPACK_PACKAGE_VERSION_MINOR 0)
SET(CPACK_PACKAGE_VERSION_PATCH 0)
SET(CPACK_PACKAGE_FILE_NAME MyApp_${MY_VERSION_MAJOR}_${HOST_NAME})
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY MyApp 3 for ${HOST_NAME})
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY 
MyApp ${MY_VERSION_MAJOR}.${MY_VERSION_MINOR})

SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/intro.rtf)

IF(APPLE)
  SET(CPACK_GENERATOR PackageMaker)
ELSEIF(WIN32)
  SET(CPACK_GENERATOR NSIS)  
ENDIF()

SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY MyApp ${MY_VERSION_MAJOR})

IF(APPLE)
  SET(CMAKE_INSTALL_PREFIX /Applications)
  SET(CPACK_PACKAGE_INSTALL_DIRECTORY /Applications)  
ENDIF()


SET(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/welcome.txt)
SET(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_CURRENT_SOURCE_DIR}/intro.rtf)
SET(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/welcome.txt)
SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/license.txt)

INCLUDE(CPack)

--

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: configured variables in CMake file are ignored

2012-11-27 Thread Paolo Ciccone
Hi Eric.
You nailed it! Those characters got inserted when I copies and pasted the
names of the variables fromt the CPack wiki. Once removed everything works
perfectly. Fantastic!

Thank you a million.
---
Paolo Ciccone
www.preta3d.com
www.paolociccone.com



On Tue, Nov 27, 2012 at 1:34 PM, Eric Noulard eric.noul...@gmail.comwrote:

 2012/11/27 Paolo Ciccone phcicc...@gmail.com:
  I have prepared a testcase that I can use to replicate the issue all the
  time.
  I am running Mac OS 10.8.2 (ML) and I tested this case with both
 CMake/CPack
  2.8.10.1 and 2.8.9.
 
  The command issued is simply:
 
  cmake -G Xcode
 
  You can find the test case, which is stripped down to almost nothing
 here:
 
  https://dl.dropbox.com/u/3701566/cmake_cpack_test.zip

 If you open your CMakeLists.txt in an hexadecimal editor you'll see
 that you have spurious C2 A0 UTF-8 characters (unbreakable space) at the
 end of
 the following variables:
 CPACK_PACKAGE_VENDOR
 CPACK_PACKAGE_VERSION_MAJOR
 CPACK_PACKAGE_VERSION_MINOR
 CPACK_PACKAGE_VERSION_PATCH
 CPACK_PACKAGE_DESCRIPTION_SUMMARY
 CPACK_RESOURCE_FILE_WELCOME
 CPACK_RESOURCE_FILE_README
 CPACK_RESOURCE_FILE_LICENSE

 so statement  like

 set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_CURRENT_SOURCE_DIR}/intro.rtf)

 may be puzzling CMake because the extraneous unbreakable space may not be
 considered as a separator.

 On linux it seems to work but the behavior on the Mac may be different.
 Could you try replacing your CMakeLists.txt with the one attached to this
 mail
 and retry.


 --
 Erk
 Le gouvernement représentatif n'est pas la démocratie --
 http://www.le-message.org

--

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: configured variables in CMake file are ignored

2012-11-27 Thread Paolo Ciccone
Yes. I use Sublime Edit 2 for all my work, Xcode is used just to compile
the project. I'll look into that and possibly contact the developer.
Showing the foreign chars would have saved me a few hours and avoided
pestering the mailing list about such trivial issue :)

Thanks again.
---
Paolo Ciccone
www.preta3d.com
www.paolociccone.com



On Tue, Nov 27, 2012 at 2:26 PM, Eric Noulard eric.noul...@gmail.comwrote:

 2012/11/27 Paolo Ciccone phcicc...@gmail.com:
  Hi Eric.
  You nailed it! Those characters got inserted when I copies and pasted the
  names of the variables fromt the CPack wiki. Once removed everything
 works
  perfectly. Fantastic!

 Happy to ear that.

 
  Thank you a million.

 You're welcome.

 May be XCode (or the programming editor you use) should have displayed
 those characters in a different way than classical space, in fact this
 is how
 I got my eyes on it.

 --
 Erk
 Le gouvernement représentatif n'est pas la démocratie --
 http://www.le-message.org

--

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: configured variables in CMake file are ignored

2012-11-26 Thread Paolo Ciccone
Hi.

This issue is with CPack 2.8.10.1 on Mac OS.

I have a CPack configuration inside a CMake file that seems to skip some
variables that have been set.
For example:

INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_RESOURCE_FILE_README Absolute path to the redme file)
SET(CPACK_PACKAGE_VENDOR Myself)
.
.
.
[OTHER commands and variables]
.
.
.
INCLUDE(CPack)

I have paths specified for
the CPACK_RESOURCE_FILE_README, CPACK_RESOURCE_FILE_WELCOME,
and CPACK_RESOURCE_FILE_LICENSE variables.
When I run CMake the corresponding CPackConfig.cmake file includes all the
path to the readme, welcome and license files are set to the templates
included with CMake. Also, the CPACK_PACKAGE_VENDOR variable is always set
to Humanity.

Am I overlooking something?

Thanks in advance.
---
Paolo
--

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: configured variables in CMake file are ignored

2012-11-26 Thread Eric Noulard
2012/11/27 Paolo Ciccone phcicc...@gmail.com:
 Hi.

 This issue is with CPack 2.8.10.1 on Mac OS.

 I have a CPack configuration inside a CMake file that seems to skip some
 variables that have been set.
 For example:

 INCLUDE(InstallRequiredSystemLibraries)
 SET(CPACK_RESOURCE_FILE_README Absolute path to the redme file)
 SET(CPACK_PACKAGE_VENDOR Myself)
 .
 .
 .
 [OTHER commands and variables]
 .
 .
 .
 INCLUDE(CPack)

 I have paths specified for the CPACK_RESOURCE_FILE_README,
 CPACK_RESOURCE_FILE_WELCOME, and CPACK_RESOURCE_FILE_LICENSE variables.
 When I run CMake the corresponding CPackConfig.cmake file includes all the
 path to the readme, welcome and license files are set to the templates
 included with CMake. Also, the CPACK_PACKAGE_VENDOR variable is always set
 to Humanity.

Do you mean that inside CPackConfig.cmake the value you(ve set before
INCLUDE(CPack) are not used?

 Am I overlooking something?

Not something obvious I think.
Could it be possible that INCLUDE(CPack) has been called by a subproject
before you actually do it in your main CMakeLists.txt?

Which CPack generator are you using?
Not all of them use CPACK_RESOURCE_* vars.

Could you try from a fresh build tree in order to avoid potential
cache effect.
-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

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