A few months ago, I had to modify CMakeLists.txt in my working copy,
because I use the variable CMAKE_INSTALL_PREFIX to have a distinct delivery
directory for each configuration.
The purpose of this mail is to ask if the changes can be committed.

Assuming that the following variables are defined :
$oorexx_src_dir : directory of sources
$oorexx_build : directory for the build
$oorexx_delivery : directory for the delivery

I use these commands to build a configuration (here Release) :
cd $oorexx_build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$oorexx_delivery
$oorexx_src_dir
make install

The binaries are installed in $oorexx_delivery/bin, lib, ...

Q1) How do you proceed to support multiple builds for ooRexx with cmake ?
Nobody complained so I wonder if a different approach is possible.

Q2) Assuming  CMAKE_INSTALL_PREFIX is the correct way, then CMakeLists.txt
should be slightly modified for the platforms other than Windows :

   set (CMAKE_INSTALL_PREFIX /usr)
must be replaced by
   if(NOT DEFINED CMAKE_INSTALL_PREFIX)
      set(CMAKE_INSTALL_PREFIX "/usr")
   endif()


   find_path(INSTALL_LIB_DIR libc.so PATHS ${CMAKE_INSTALL_PREFIX}/lib/*
${CMAKE_INSTALL_PREFIX}/lib64)
returns "INSTALL_LIB_DIR-NOTFOUND" when libc.so not found, and a directory
with this name is created in the delivery directory.
So must be followed by
   if (${INSTALL_LIB_DIR} STREQUAL "INSTALL_LIB_DIR-NOTFOUND")
      set (INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib)
   endif ()

Probably more work needed about this find_path, because does not work for
MacOs & Ubuntu. Can't tell for the other non-Windows platforms.

Jean-Louis
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to