summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2009-03-16 00:01:06 +0100
committerDennis kasprzyk <onestone@compiz-fusion.org>2009-03-16 00:01:06 +0100
commit975650f1a276f351aaf50ec6dd692629efbab114 (patch)
tree3c42b7f01e8127d50bd871af4ff71c01cb8661ee /CMakeLists.txt
parent75f8bd987baf95e43e674151908b2eb0f9f1095b (diff)
downloadmobilebling-975650f1a276f351aaf50ec6dd692629efbab114.tar.gz
mobilebling-975650f1a276f351aaf50ec6dd692629efbab114.tar.bz2
Avoid unneeded recompilation after cmake execution.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 5 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 078a148..b389f40 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,20 +69,13 @@ set (_compiz_package "Compiz")
compiz_configure_file (${compiz_SOURCE_DIR}/config.h.core.in ${compiz_BINARY_DIR}/generated/config.h)
-set (_commonfile "${CMAKE_BINARY_DIR}/generated/compiz-common.h")
-
-file (WRITE ${_commonfile} "#ifndef COMPIZ_COMMON_H\n")
-file (APPEND ${_commonfile} "#define COMPIZ_COMMON_H\n")
-file (APPEND ${_commonfile} "\n")
-file (APPEND ${_commonfile} "#define COMPIZ_VERSION_MAJOR ${COMPIZ_VERSION_MAJOR}\n")
-file (APPEND ${_commonfile} "#define COMPIZ_VERSION_MINOR ${COMPIZ_VERSION_MINOR}\n")
-file (APPEND ${_commonfile} "#define COMPIZ_VERSION_MICRO ${COMPIZ_VERSION_MICRO}\n")
-file (APPEND ${_commonfile} "\n")
-file (APPEND ${_commonfile} "#define COMPIZ_VERSION_STRING \"${VERSION}\"\n")
-file (APPEND ${_commonfile} "#endif\n")
+compiz_configure_file (
+ ${CMAKE_SOURCE_DIR}/include/compiz-common.h.in
+ ${CMAKE_BINARY_DIR}/generated/compiz-common.h
+)
install (
- FILES ${_commonfile}
+ FILES ${CMAKE_BINARY_DIR}/generated/compiz-common.h
DESTINATION ${includedir}/compiz
)