Hi Domen,

Thanks for that confirmation. While rolling it into the main postinstall script might make sense, I would need to run a different script (or not at all) based on the CMake option flags the user had selected. Thus I'd need to generate multiple versions of the script depending on what they'd selected. (Perhaps this might be better handled using RPM components, however that's another task for another day.)

What I did do was use the CPACK_RPM_SPEC_MORE_DEFINE parameter:

         # If the user builds shared, make sure that the RPM package
   (that might be generated) runs ldconfig when it's installed.
        IF( BUILD_SHARED_LIBS )
            SET(CPACK_RPM_SPEC_MORE_DEFINE "%posttrans -p /sbin/ldconfig")
        ENDIF( BUILD_SHARED_LIBS )

Which allowed me to set raw rpm spec options which would simply get appended in. For a simple oneliner like ldconfig, this is an even better result as it doesn't require me to create an external script file.


Thanks for all suggestions and assistance.
Thomas

Thomas Teo
Australian Centre for Field Robotics
The University of Sydney

t....@acfr.usyd.edu.au
www.acfr.usyd.edu.au

On 30/05/2016 4:06 PM, Domen Vrankar wrote:

--

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

Reply via email to