Skip to content

Find CMake files for add_subdirectory(curl) use-case - #498

Closed
jgsogo wants to merge 1 commit into
curl:masterfrom
jgsogo:add_subdir
Closed

jgsogo wants to merge 1 commit into
curl:masterfrom
jgsogo:add_subdir

Conversation

@jgsogo

@jgsogo jgsogo commented Oct 19, 2015 •

Copy link
Copy Markdown
Contributor

When including CURL using add_subdirectory the variables CMAKE_BINARY_DIR and CURL_BINARY_DIR hold different paths.

(It was PR #488 but I messed it up :/)

When including CURL using add_subdirectory the variables
CMAKE_BINARY_DIR and CURL_BINARY_DIR hold different paths.
@jgsogo

jgsogo commented Oct 19, 2015

Copy link
Copy Markdown
Contributor Author

@snikulov @bagder @bradking @whoshuu I'm closing PR#488 in favor of this one. I don't know but happened there when trying to rewrite commit message.

@bradking

Copy link
Copy Markdown
Contributor

Thanks. LGTM.

@jzakrzewski

Copy link
Copy Markdown
Contributor

Just out of curiosity - the change makes it more consistent, so that's ok but isn't it invalid to build this via add_subdirectory()? I mean it contains both: cmake_minimum_required an project. As far as I know it can mess up ones build badly.

@bradking

Copy link
Copy Markdown
Contributor

@jzakrzewski: Using add_subdirectory to include one project inside another is supported by CMake. It just takes some care that the inner project does not reference CMAKE_BINARY_DIR and such. Actually CMake's own source builds an internal libcurl using add_subdirectory to support the file(DOWNLOAD) and a few other commands.

@jgsogo jgsogo mentioned this pull request Oct 19, 2015
@snikulov

Copy link
Copy Markdown
Contributor

LGTM 👍

@jzakrzewski

Copy link
Copy Markdown
Contributor

@bradking Thanks for clarification. I have just never used it.

@jay jay closed this in 72646c2 Oct 19, 2015
@jay

jay commented Oct 19, 2015

Copy link
Copy Markdown
Member

Thanks, landed in 72646c2.

@lock lock Bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants