Re: [CMake] How to disable the CPack preinstall build?

2016-07-06 Thread Craig Scott
Good chance CMAKE_BUILD_WITH_INSTALL_RPATH

may
be what you are looking for. There's also always the option of just running
cpack directly rather than "make package" (not sure if that will avoid the
part of the process that is causing you problems though).

On Thu, Jul 7, 2016 at 7:00 AM, Duncan Chisholm  wrote:

> Hello All,
>
> I'm looking for some CPack (3.5.2) wrangling assistance...
>
> I have CMake automatically generating a unique ID on every build. This ID
> is compiled into several components of my project and I want the same value
> to appear in my package file name. I do this by inserting it into a CPack
> project config file at build time.
>
> This works great in Visual Studio and XCode. When I build the package
> target, a new ID is generated, all the dependents are rebuilt and the
> package is created with the correct file name.
>
> However, it doesn't work for makefiles. When I execute 'make package',
> CMake subsequently executes 'make preinstall'. This causes two build IDs to
> be generated; the first ending up in the package filename and the second
> ending up in my modules (which are compiled twice).
>
> As a workaround, I've found that if I edit the CPackConfig.cmake file to
> replace CPACK_CMAKE_GENERATOR "Unix Makefiles" with "Xcode", it works.
> CPack apparently knows that it doesn't need to worry about building
> anything in this case.
>
> So... Is there a better way to get this message across to CPack? Just
> package; don't build.
>
> Duncan
>
>
> --
>
> 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
>



-- 
Craig Scott
Melbourne, Australia
http://crascit.com
-- 

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

[CMake] How to disable the CPack preinstall build?

2016-07-06 Thread Duncan Chisholm
Hello All,

I'm looking for some CPack (3.5.2) wrangling assistance...

I have CMake automatically generating a unique ID on every build. This ID
is compiled into several components of my project and I want the same value
to appear in my package file name. I do this by inserting it into a CPack
project config file at build time.

This works great in Visual Studio and XCode. When I build the package
target, a new ID is generated, all the dependents are rebuilt and the
package is created with the correct file name.

However, it doesn't work for makefiles. When I execute 'make package',
CMake subsequently executes 'make preinstall'. This causes two build IDs to
be generated; the first ending up in the package filename and the second
ending up in my modules (which are compiled twice).

As a workaround, I've found that if I edit the CPackConfig.cmake file to
replace CPACK_CMAKE_GENERATOR "Unix Makefiles" with "Xcode", it works.
CPack apparently knows that it doesn't need to worry about building
anything in this case.

So... Is there a better way to get this message across to CPack? Just
package; don't build.

Duncan
-- 

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