I am trying to make the build of a source package work, i.e. a compressed 
version of the complete source code as it comes out of SVN. With these lines in 
CMakeLists.txt:

# Create a source package
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_PACKAGE_FILE_NAME 
"${CPACK_PACKAGE_NAME}-${ORX_MAJOR}.${ORX_MINOR}.${ORX_MOD_LVL}-${CPACK_PACKAGE_RELEASE}")

The package looks like this

oorexx-5.1.0-12706
|-- usr
|   |-- local
|        |-- CHANGES
|        |-- CMake-build-readme.txt
|        |-- CMakeLists.txt
...

i.e. the default path is included in the compressed source, and we do not want 
that.

I tried to change the install path for the source package like this:

# Create a source package
set (CMAKE_INSTALL_PREFIX .)
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_PACKAGE_FILE_NAME 
"${CPACK_PACKAGE_NAME}-${ORX_MAJOR}.${ORX_MINOR}.${ORX_MOD_LVL}-${CPACK_PACKAGE_RELEASE}")

Now the package looks like this:

oorexx-5.1.0-12706
|-- CHANGES
|-- CMake-build-readme.txt
|-- CMakeLists.txt
...

i.e. the additional subdirectories are gone, and the package is as we want it 
to be. That is the good news.

The bad news is that (as I just learned) it had the side effect that "make 
install" fail on macOS and hence the building of an installer consequently fail

Does anybody have a solution how to be able to install (make install) to 
~Applications/ooRexx5 on macOS and still being able to create a source package 
without any additional path?

I have tried to build the package also on Linux but also that did not work.

Since Rony have managed to build a relocatable package, could such an approach 
be made? I do not possess the knowledge of how CMake works so I am relying on 
help here.

If nothing else helps I see so other possibility than creating the package in a 
post-process driven from CMake (similar to how the Windows and macOS installers 
are created). But it MUST be possible to do this the "right” way using normal 
CMake commands?

Hälsningar/Regards/Grüsse,
P.O. Jonsson
oor...@jonases.se



_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to