@@ -14,6 +14,14 @@ option(COUNTLY_USE_SQLITE "Use SQLite" OFF)
1414option (COUNTLY_BUILD_TESTS "Build test programs" OFF )
1515option (COUNTLY_BUILD_SAMPLE "Build Sample programs" OFF )
1616
17+ message ("Build shared libraries:" ${BUILD_SHARED_LIBS} )
18+ message ("Create a module definition (.def) on Windows.:" ${CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS} )
19+ message ("Use a custom HTTP library:" ${COUNTLY_USE_CUSTOM_HTTP} )
20+ message ("Use a custom SHA 256 library:" ${COUNTLY_USE_CUSTOM_SHA256} )
21+ message ("Use SQLite:" ${COUNTLY_USE_SQLITE} )
22+ message ("Build test programs:" ${COUNTLY_BUILD_TESTS} )
23+ message ("Build Sample programs:" ${COUNTLY_BUILD_SAMPLE} )
24+
1725if (NOT WIN32 AND NOT BUILD_SHARED_LIBS AND NOT COUNTLY_USE_CUSTOM_HTTP)
1826 message (FATAL_ERROR "You must provide a custom HTTP function when compiling statically." )
1927endif ()
@@ -53,13 +61,16 @@ target_link_libraries(countly Threads::Threads)
5361
5462target_include_directories (countly PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /vendor/json/include )
5563if (COUNTLY_BUILD_TESTS)
64+ message ("Compiling definitions for tests" )
5665 target_compile_definitions (countly PRIVATE COUNTLY_BUILD_TESTS)
5766endif ()
5867
5968if (COUNTLY_USE_CUSTOM_SHA256)
69+ message ("Compiling definitions for custom sha256" )
6070 target_compile_definitions (countly PRIVATE COUNTLY_USE_CUSTOM_SHA256)
6171else ()
6272if (APPLE )
73+ message ("Setting openssl root for Mac" )
6374 set (OPENSSL_ROOT_DIR "/usr/local/opt/openssl" )
6475endif ()
6576find_package (OpenSSL REQUIRED)
@@ -68,14 +79,17 @@ target_link_libraries(countly ${OPENSSL_LIBRARIES})
6879endif ()
6980
7081if (COUNTLY_USE_CUSTOM_HTTP)
82+ message ("Will compile definitions for custom http" )
7183 target_compile_definitions (countly PRIVATE COUNTLY_USE_CUSTOM_HTTP)
7284elseif (NOT WIN32 )
85+ message ("Checking url as device is not windows" )
7386 find_package (CURL REQUIRED)
7487 target_include_directories (countly PRIVATE ${CURL_INCLUDE_DIRS} )
7588 target_link_libraries (countly ${CURL_LIBRARIES} )
7689endif ()
7790
7891if (COUNTLY_USE_SQLITE)
92+ message ("Building sqlite directories" )
7993 target_compile_definitions (countly PRIVATE COUNTLY_USE_SQLITE)
8094 set (Sqlite3_DIR ${CMAKE_CURRENT_SOURCE_DIR} /vendor/sqlite/build )
8195 find_package (Sqlite3)
@@ -84,6 +98,7 @@ if(COUNTLY_USE_SQLITE)
8498endif ()
8599
86100if (COUNTLY_BUILD_TESTS)
101+ message ("Building test directories" )
87102 add_executable (countly-tests
88103 ${CMAKE_CURRENT_SOURCE_DIR} /tests/main.cpp
89104 ${CMAKE_CURRENT_SOURCE_DIR} /tests/views.cpp
@@ -94,10 +109,12 @@ if(COUNTLY_BUILD_TESTS)
94109
95110 target_compile_definitions (countly-tests PRIVATE COUNTLY_BUILD_TESTS)
96111 if (COUNTLY_USE_SQLITE)
112+ message ("Compiling definitions for sqlite" )
97113 target_compile_definitions (countly-tests PRIVATE COUNTLY_USE_SQLITE)
98114 target_include_directories (countly-tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /vendor/sqlite)
99115 endif ()
100116 if (COUNTLY_USE_CUSTOM_SHA256)
117+ message ("Compiling definitions for custom sha256" )
101118 target_compile_definitions (countly-tests PRIVATE COUNTLY_USE_CUSTOM_SHA256)
102119 endif ()
103120 target_include_directories (countly-tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /vendor/doctest/doctest)
@@ -110,6 +127,7 @@ if(COUNTLY_BUILD_TESTS)
110127endif ()
111128
112129if (COUNTLY_BUILD_SAMPLE)
130+ message ("Building sample directories" )
113131 add_executable (countly-sample
114132 ${CMAKE_CURRENT_SOURCE_DIR} /examples/example_integration.cpp)
115133
0 commit comments