-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
44 lines (37 loc) · 1.33 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
cmake_minimum_required(VERSION 3.2.0)
project(big_money)
add_subdirectory(3rd)
aux_source_directory(${CMAKE_SOURCE_DIR}/src SRC)
add_executable(big_money ${SRC})
if (MSVC)
target_compile_options(big_money PRIVATE /utf-8)
endif()
if (WIN32 OR MSVC)
message(STATUS "Build big_money on windows system")
add_dependencies(big_money libcurl)
target_include_directories(big_money PUBLIC ${CMAKE_SOUREC_DIR}/include/pdcurses)
target_link_libraries(big_money pdcurses libcurl)
add_definitions(-DNOMINMAX)
else()
message(STATUS "Build big_money on *nix system")
target_compile_options(big_money PRIVATE -std=c++11)
find_package(CURL, REQUIRED)
if (CURL_FOUND)
message(STATUS "Looking for curl. Ok")
else()
message(FATAL_ERROR "Looking for curl. Fail")
endif()
set(CURSES_NEED_NCURSES TRUE)
find_package(Curses REQUIRED)
if (CURSES_FOUND)
message(STATUS "Looking for curses. Ok")
else()
message(FATAL_ERROR "Looking for curses. Fail")
endif()
target_link_libraries(big_money ncursesw curl)
endif()
target_include_directories(big_money PRIVATE
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/3rd/rapidjson/include
${CMAKE_SOURCE_DIR}/3rd/csylib/
)