From e4d1f44c2a4b6a6f562a1899e6cbab16fba909ae Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Fri, 18 May 2018 22:29:04 -0700 Subject: [PATCH] Cleanup CMakeLists.txt --- src/cpp-utils/CMakeLists.txt | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/cpp-utils/CMakeLists.txt b/src/cpp-utils/CMakeLists.txt index 8b3a4fcd..31444978 100644 --- a/src/cpp-utils/CMakeLists.txt +++ b/src/cpp-utils/CMakeLists.txt @@ -50,19 +50,13 @@ set(SOURCES add_library(${PROJECT_NAME} STATIC ${SOURCES}) -find_package(CURL) -if(NOT ${CURL_FOUND}) - message(FATAL_ERROR "CURL library not found") -endif() -include_directories(${CURL_INCLUDE_DIRS}) +find_package(CURL REQUIRED) +target_include_directories(${PROJECT_NAME} PUBLIC ${CURL_INCLUDE_DIRS}) target_link_libraries(${PROJECT_NAME} PUBLIC ${CURL_LIBRARIES}) -find_package(Backtrace) -if(NOT ${Backtrace_FOUND}) - message(FATAL_ERROR "Backtrace library not found") -endif() -include_directories(${Backtrace_INCLUDE_DIRS}) -target_link_libraries(${PROJECT_NAME} PUBLIC ${Backtrace_LIBRARIES}) +find_package(Backtrace REQUIRED) +target_include_directories(${PROJECT_NAME} PUBLIC ${Backtrace_INCLUDE_DIRS}) +target_link_libraries(${PROJECT_NAME} PUBLIC ${Backtrace_LIBRARIES}) target_link_libraries(${PROJECT_NAME} PUBLIC pthread)