King_DuckZ
cb00e484fa
Invoke it with ie: ./scraper http://www.dilbert.com '//div[@class='\''STR_Image'\'']/a/img/@src'
27 lines
691 B
CMake
27 lines
691 B
CMake
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
|
project(scraper CXX)
|
|
|
|
add_subdirectory(lib/tidy)
|
|
add_subdirectory(lib/curlcpp)
|
|
|
|
find_package(PugiXML REQUIRED)
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -Wall -Wextra -g -O0 -fno-omit-frame-pointer")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 -Wall -Wextra -g -O3 -fomit-frame-pointer")
|
|
|
|
include_directories(SYSTEM
|
|
lib/tidy/include
|
|
${PUGIXML_INCLUDE_DIR}
|
|
${CURLCPP_SOURCE_DIR}/include
|
|
)
|
|
|
|
add_executable(${PROJECT_NAME}
|
|
src/main.cpp
|
|
)
|
|
|
|
target_link_libraries(${PROJECT_NAME}
|
|
tidy
|
|
${PUGIXML_LIBRARIES}
|
|
curlcpp
|
|
)
|