Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmake config new #157

Merged
merged 2 commits into from
Jan 28, 2014
Merged

Cmake config new #157

merged 2 commits into from
Jan 28, 2014

Conversation

JoakimSoderberg
Copy link
Contributor

Rebased version of #155 to get rid of the ugly merge mess.

Also added the config.h name change for autoconf in this one.

This will simplify linking against the lib, both from the build-tree and
install-tree from other CMake projects.

CMakes find_package command uses these configs to locate the exported
targets for the library.

* Also changed so that all CMake options for the project are prepended
  with JANSSON_ so that there is no ambiguity when including this as a
  subdirectory in another CMake project.
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.
@JoakimSoderberg
Copy link
Contributor Author

Fixed the stuff you commented

@JoakimSoderberg
Copy link
Contributor Author

@akheron Anything more you want me to fix?

akheron added a commit that referenced this pull request Jan 28, 2014
@akheron akheron merged commit cffc5df into akheron:master Jan 28, 2014
@akheron
Copy link
Owner

akheron commented Jan 28, 2014

Merged, thanks.

${CMAKE_CURRENT_BINARY_DIR}/private_include/config.h)

# and tell the source code to include it
add_definitions (-DHAVE_CONFIG_H)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the correct thing to do? Does it include jansson_private_config.h at all now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn that's a mistake... see #159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants