Skip to content

Commit

Permalink
Merge pull request #202 from aldanor/feature/target-include-directories
Browse files Browse the repository at this point in the history
Use target_include_directories() in CMake
  • Loading branch information
whoshuu committed Jun 5, 2017
2 parents 52d4987 + 96de6a8 commit b5758fb
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cpr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
message(STATUS "Using CURL_INCLUDE_DIRS: ${CURL_INCLUDE_DIRS}.")
include_directories(
${CPR_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS})

add_library(${CPR_LIBRARIES}

Expand Down Expand Up @@ -45,3 +42,14 @@ add_library(${CPR_LIBRARIES}
message(STATUS "Using CURL_LIBRARIES: ${CURL_LIBRARIES}.")
target_link_libraries(${CPR_LIBRARIES}
${CURL_LIBRARIES})

if(NOT (CMAKE_VERSION VERSION_LESS 3.0))
target_include_directories(${CPR_LIBRARIES}
PUBLIC
${CPR_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS})
else()
include_directories(
${CPR_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS})
endif()

0 comments on commit b5758fb

Please sign in to comment.