Skip to content

Commit 4fab00d

Browse files
committed
Now propagate USE_SENDGRID to subtargets, and link realmd against libcurl
1 parent 2d60efb commit 4fab00d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ find_package(PCHSupport)
4444

4545
if(USE_LIBCURL)
4646
find_package(CURL REQUIRED)
47-
add_definitions(-DUSE_SENDGRID)
4847
#add_definitions(-D_HAS_AUTO_PTR_ETC) # for VS2017 ACE support, won't do any harm to other compilers
4948
#set(CMAKE_CXX_STANDARD 17)
5049
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
@@ -458,6 +457,10 @@ if(USE_STD_MALLOC)
458457
set(DEFINITIONS ${DEFINITIONS} USE_STANDARD_MALLOC)
459458
endif()
460459

460+
if (USE_LIBCURL)
461+
set(DEFINITIONS ${DEFINITIONS} USE_SENDGRID)
462+
endif()
463+
461464
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}")
462465
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_RELEASE "${DEFINITIONS_RELEASE}")
463466
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_DEBUG "${DEFINITIONS_DEBUG}")

src/realmd/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ if(UNIX)
7878
)
7979
endif()
8080

81+
if (USE_LIBCURL)
82+
target_link_libraries(${EXECUTABLE_NAME} curl)
83+
endif()
84+
8185
set(EXECUTABLE_LINK_FLAGS "")
8286

8387
if(UNIX)

0 commit comments

Comments
 (0)