[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[fluid-dev] Re: Using cmake for the fink builds of fluidsynth
From: |
Pedro Lopez-Cabanillas |
Subject: |
[fluid-dev] Re: Using cmake for the fink builds of fluidsynth |
Date: |
Fri, 24 Sep 2010 23:15:02 +0200 |
User-agent: |
KMail/1.13.5 (Linux/2.6.34.7-0.3-desktop; KDE/4.4.4; i686; ; ) |
Hi,
I've committed now a change to the SVN (r371) initializing the variable
CMAKE_INSTALL_NAME_DIR in the main CMakeLists.txt when configuring FS for Mac
OSX, because this variable should always be set with the same value. I don't
want to do that with the other variables, but you can set them easily in the
command line or using the GUI CMake interface. For instance this command line
cmake .. -DCMAKE_INSTALL_PREFIX=/sw -DLIB_SUFFIX='' \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=1 \
-DCMAKE_INSTALL_RPATH=/sw/lib
is equivalent to your patch.
The LIB_SUFFIX variable was already declared with the CACHE option. It is
initialized to "64" in machines using 64 bit pointers, but you can change it
anyway in the command line or using the GUI.
The RPATH related variables [1] can also be set in the command line, and it
seems wrong to me hardcoding some choices in the CMake scripts, because the
settings are expected to be different depending on the system and the type of
user. I use RPATH in Linux with the default settings, because it is convenient
for me as developer. Other people may prefer to use -DCMAKE_SKIP_RPATH=1 in
the command line, to avoid RPATH in their Unix builds. In Windows, this
feature doesn't exist. Some packagers (for instance, Debian) build the
software with the default RPATH settings, stripping later the paths from the
binaries before rolling the packages.
Regards,
Pedro
[1] http://www.cmake.org/Wiki/CMake_RPATH_handling
PD: please use the mailing list, it accepts small attachments.
On Wednesday 22 September 2010, you wrote:
> hello all
>
> While writing a build/install script for the new fluidsynth (1.1.2)
> using autotools posed no problem, I decided to do a script using cmake
> instead.
>
> This approach exposed certain portability issues which I brought to
> the attention of the Fink Core team. Anyway, I had the privilege of
> receiving some great advice from Benjamin Reed aka Ranger Rick (who
> happens to be one of the coolest guys I know).
>
> In the cmake script that Ranger Rick suggested to me (attached), he
> uses the SET command with the CACHE option. Here he sets values for
> variables like CMAKE_INSTALL_RPATH_USE_LINK_PATH. So I added these
> suggestions to the Apple Mac OSX part of Pedro's CMakeLists.txt file
> and the fink package for fluidsynth was easily compiled and installed.
>
> It would be great if both the assistance of Jean-François Mertens and
> Benjamin Reed could be acknowledged for the next release.
>
> Also, in the "Downloads" section, could you also add "fink install
> fluidsynth".
>
> Best wishes,
> Ebrahim
>
>
>
>
--- fluidsynth-1.1.2/CMakeLists.txt.orig 2010-08-31 23:24:53.000000000
-0400
+++ fluidsynth-1.1.2/CMakeLists.txt 2010-09-21 08:14:09.000000000
-0400
@@ -345,6 +345,16 @@
pkg_check_modules ( DBUS dbus-1>=1.0.0 )
set ( DBUS_SUPPORT ${DBUS_FOUND} )
endif ( enable-dbus )
+
+set (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
+set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING
"Library directory name")
+
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+set(CMAKE_INSTALL_RPATH ${LIB_DESTINATION} )
+
+if(APPLE)
+ set(CMAKE_INSTALL_NAME_DIR ${LIB_DESTINATION})
+endif(APPLE)
# General configuration file
configure_file ( ${CMAKE_SOURCE_DIR}/src/config.cmake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [fluid-dev] Re: Using cmake for the fink builds of fluidsynth,
Pedro Lopez-Cabanillas <=