diff options
author | Joakim Soderberg <joakim.soderberg@gmail.com> | 2014-01-13 17:13:44 +0100 |
---|---|---|
committer | Joakim Soderberg <joakim.soderberg@gmail.com> | 2014-01-27 12:48:52 +0100 |
commit | 3fe8f74e7f292f856717f7c0a3dccd4a45e574c1 (patch) | |
tree | 7e38f9d91359d1bdce323b790f188462b0f85135 /cmake | |
parent | 913937c98d2b530292e35b7c3fb6c21b576698e9 (diff) | |
download | jansson-3fe8f74e7f292f856717f7c0a3dccd4a45e574c1.zip jansson-3fe8f74e7f292f856717f7c0a3dccd4a45e574c1.tar.gz jansson-3fe8f74e7f292f856717f7c0a3dccd4a45e574c1.tar.bz2 |
Renamed config.h -> jansson_private_config.h
This is because it's really easy to get a name collission if compiling
Jansson as a subproject in a larger CMake project. If one project includes
several subprojects each having their own config.h, this will cause the
wrong file to be loaded.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/JanssonConfig.cmake.in | 10 | ||||
-rw-r--r-- | cmake/jansson_config.h.cmake | 2 | ||||
-rw-r--r-- | cmake/jansson_private_config.h.cmake (renamed from cmake/config.h.cmake) | 0 |
3 files changed, 7 insertions, 5 deletions
diff --git a/cmake/JanssonConfig.cmake.in b/cmake/JanssonConfig.cmake.in index 21af0ff..d00b3c4 100644 --- a/cmake/JanssonConfig.cmake.in +++ b/cmake/JanssonConfig.cmake.in @@ -1,7 +1,7 @@ -# - Config file for the Libevent package +# - Config file for the jansson package # It defines the following variables -# LIBEVENT_INCLUDE_DIRS - include directories for FooBar -# LIBEVENT_LIBRARIES - libraries to link against +# JANSSON_INCLUDE_DIRS - include directories for FooBar +# JANSSON_LIBRARIES - libraries to link against # Get the path of the current file. get_filename_component(JANSSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) @@ -12,6 +12,6 @@ set(JANSSON_INCLUDE_DIRS "@JANSSON__INCLUDE_DIRS@") # Include the project Targets file, this contains definitions for IMPORTED targets. include(${JANSSON_CMAKE_DIR}/JanssonTargets.cmake) -# IMPORTED targets from LibeventTargets.cmake -set(JANSSON_LIBRARIES event event_core event_extras) +# IMPORTED targets from JanssonTargets.cmake +set(JANSSON_LIBRARIES jansson) diff --git a/cmake/jansson_config.h.cmake b/cmake/jansson_config.h.cmake index 8c500b5..9917b56 100644 --- a/cmake/jansson_config.h.cmake +++ b/cmake/jansson_config.h.cmake @@ -17,7 +17,9 @@ #define JANSSON_CONFIG_H /* Define this so that we can disable scattered automake configuration in source files */ +#ifndef JANSSON_USING_CMAKE #define JANSSON_USING_CMAKE +#endif /* Note: when using cmake, JSON_INTEGER_IS_LONG_LONG is not defined nor used, * as we will also check for __int64 etc types. diff --git a/cmake/config.h.cmake b/cmake/jansson_private_config.h.cmake index bc81178..bc81178 100644 --- a/cmake/config.h.cmake +++ b/cmake/jansson_private_config.h.cmake |