diff options
author | Carl Worth <cworth@cworth.org> | 2011-10-18 18:00:00 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2011-10-19 18:02:21 -0700 |
commit | 2f5b1f2477b269eaf4a09464f3c86c65b78603b4 (patch) | |
tree | 7f4607a88f5711c1d26e25a5d38a9ecd12afb517 | |
parent | 9ed226c8a4e9d511fac9b8ec772a6c06fa0a6802 (diff) |
Add a cmake-generated config.h file to hold the private bin directory
This directory is named APITRACE_PRIVATE_BIN_DIR and will have a value
that depends on the install prefix as follows:
<prefix>/lib/apitrace
This is the directory to which private programs will be installed, (that
the user needn't execute directly but that the upcoming apitrace wrapper
program will execute for the user).
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | CMakeLists.txt | 7 | ||||
-rw-r--r-- | config.h.in | 6 |
3 files changed, 14 insertions, 0 deletions
@@ -30,6 +30,7 @@ CMakeFiles Makefile build cgltrace.cpp +config.h d3d10trace.cpp d3d8trace.cpp d3d9trace.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index b8e37d6..36fa656 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,9 @@ endif () # prescribed in http://www.gentoo.org/proj/en/qa/automagic.xml set (ENABLE_GUI "AUTO" CACHE STRING "Enable Qt GUI.") +# Directory in which apitrace will install its private binaries +# We don't cache this since the user should just set the install prefix +set (APITRACE_PRIVATE_BIN_DIR ${CMAKE_INSTALL_PREFIX}/lib/apitrace) ############################################################################## # Find dependencies @@ -486,3 +489,7 @@ else () endif () include(CPack) + +# Generate a config.h file so that the source can get at options +configure_file ("${PROJECT_SOURCE_DIR}/config.h.in" + "${PROJECT_BINARY_DIR}/config.h") diff --git a/config.h.in b/config.h.in new file mode 100644 index 0000000..5fb08a1 --- /dev/null +++ b/config.h.in @@ -0,0 +1,6 @@ +#ifndef APITRACE_CONFIG_H +#define APITRACE_CONFIG_H + +#define APITRACE_PRIVATE_BIN_DIR "@APITRACE_PRIVATE_BIN_DIR@" + +#endif |