[patch] CMakeLists.txt and config.h.cmake

"Pietro Cerutti" <[email protected]> Mon, 21 Mar 2011 12:39:23 +0100
Newsgroups gmane.comp.gnu.ccaudio.devel
Message-ID <[email protected]>
--===============0906273262==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="GZVR6ND4mMseVXL/"
Content-Disposition: inline


--GZVR6ND4mMseVXL/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

The configure_file CMake directive has to appear after the variables
used in the configuration file have been set, otherwise the effect is
not the desired one. In particular, check_include_files must appear
before configure_file.

This patch solves the problem.


--- CMakeLists.txt.orig	2011-03-21 12:41:35.000000000 +0100
+++ CMakeLists.txt	2011-03-21 12:41:51.000000000 +0100
@@ -31,8 +31,6 @@
 # set to true for debug and trace during CMakeLists development
 set(CMAKE_VERBOSE_MAKEFILE FALSE)
=20
-configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
-
 # Set defaults and pass common options.  Common build options can be passed
 # to cmake using cmake -DWITH_CFLAGS=3D"...", WITH_LIBS, and WITH_INCLUDES
 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR=
}/inc ${WITH_INCLUDES})
@@ -117,6 +115,8 @@
     endif()
 endif()
=20
+configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+
 file(GLOB ccaudio_src src/*.cpp)
 set(ccaudio_inc inc/ccaudio2.h)
 add_library(ccaudio ${BUILD_LIBRARY_TYPE} ${ccaudio_src} ${ccaudio_inc})


--=20
Pietro Cerutti
The FreeBSD Project
[email protected]

PGP Public Key:
http://gahr.ch/pgp

--GZVR6ND4mMseVXL/
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk2HOOsACgkQwMJqmJVx947HPQCfS1UdbL6nwPGoG4/4JJBGbXnw
hVcAnRwj0EA0STHOfyr1Emd/ybo+mXUH
=Lpq1
-----END PGP SIGNATURE-----

--GZVR6ND4mMseVXL/--


--===============0906273262==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ccaudio-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/ccaudio-devel

--===============0906273262==--