summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJavier G. Sogo <jgsogo@gmail.com>2015-10-19 16:09:14 +0200
committerJay Satiro <raysatiro@yahoo.com>2015-10-19 12:49:56 -0400
commit72646c2e48a819715d2b57ca964f7cda2ef8af2c (patch)
tree329e8b2217ae9ffcfb9b2e033390c4d1ef02fb23 /CMakeLists.txt
parent4201e4a9ac47b8c10083ac7e38423364c3a5977f (diff)
downloadcurl-72646c2e48a819715d2b57ca964f7cda2ef8af2c.tar.gz
cmake: Fix for add_subdirectory(curl) use-case
- Use CURL_BINARY_DIR instead of CMAKE_BINARY_DIR. When including CURL using add_subdirectory the variables CMAKE_BINARY_DIR and CURL_BINARY_DIR hold different paths. Closes https://github.com/bagder/curl/pull/488 Closes https://github.com/bagder/curl/pull/498
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 02fa8db97..858ac77f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1153,7 +1153,7 @@ set(VERSIONNUM "${CURL_VERSION_NUM}")
# Finally generate a "curl-config" matching this config
configure_file("${CURL_SOURCE_DIR}/curl-config.in"
"${CURL_BINARY_DIR}/curl-config" @ONLY)
-install(FILES "${CMAKE_BINARY_DIR}/curl-config"
+install(FILES "${CURL_BINARY_DIR}/curl-config"
DESTINATION bin
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
@@ -1163,7 +1163,7 @@ install(FILES "${CMAKE_BINARY_DIR}/curl-config"
# Finally generate a pkg-config file matching this config
configure_file("${CURL_SOURCE_DIR}/libcurl.pc.in"
"${CURL_BINARY_DIR}/libcurl.pc" @ONLY)
-install(FILES "${CMAKE_BINARY_DIR}/libcurl.pc"
+install(FILES "${CURL_BINARY_DIR}/libcurl.pc"
DESTINATION lib/pkgconfig)
# This needs to be run very last so other parts of the scripts can take advantage of this.