Skip to content

Commit 97bf227

Browse files
authored
Miscellaneous changes (#78)
* Remove class specifier from LoggerModuleImpl constructor * Fix usage example in README.md * Fix doc-strings in views module header * Set install rules for countly target
1 parent 339e77c commit 97bf227

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ if (NOT WIN32 AND NOT BUILD_SHARED_LIBS AND NOT COUNTLY_USE_CUSTOM_HTTP)
1818
message(FATAL_ERROR "You must provide a custom HTTP function when compiling statically.")
1919
endif()
2020

21+
set(COUNTLY_PUBLIC_HEADERS
22+
${CMAKE_CURRENT_SOURCE_DIR}/include/countly.hpp
23+
${CMAKE_CURRENT_SOURCE_DIR}/include/countly/constants.hpp
24+
${CMAKE_CURRENT_SOURCE_DIR}/include/countly/event.hpp
25+
${CMAKE_CURRENT_SOURCE_DIR}/include/countly/logger_module.hpp
26+
${CMAKE_CURRENT_SOURCE_DIR}/include/countly/views_module.hpp)
27+
2128
add_library(countly
29+
${COUNTLY_PUBLIC_HEADERS}
2230
${CMAKE_CURRENT_SOURCE_DIR}/src/countly.cpp
2331
${CMAKE_CURRENT_SOURCE_DIR}/src/views_module.cpp
2432
${CMAKE_CURRENT_SOURCE_DIR}/src/logger_module.cpp
@@ -29,6 +37,7 @@ target_include_directories(countly
2937
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
3038

3139
set_target_properties(countly PROPERTIES
40+
PUBLIC_HEADER "${COUNTLY_PUBLIC_HEADERS}"
3241
CXX_STANDARD 14
3342
CXX_STANDARD_REQUIRED YES
3443
CXX_EXTENSIONS NO)
@@ -101,3 +110,5 @@ if(COUNTLY_BUILD_SAMPLE)
101110
CXX_STANDARD_REQUIRED YES
102111
CXX_EXTENSIONS NO)
103112
endif()
113+
114+
install(TARGETS countly ARCHIVE DESTINATION lib PUBLIC_HEADER DESTINATION include/countly)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
6868
Countly& ct = Countly::getInstance();
6969
// OS, OS_version, device, resolution, carrier, app_version);
7070
ct.SetMetrics("Windows 10", "10.22", "Mac", "800x600", "Carrier", "1.0");
71-
ct.SetCustomUserDetails({{"Account Type", "Basic"}, {"Employer", "Company4"}});
71+
ct.setCustomUserDetails({{"Account Type", "Basic"}, {"Employer", "Company4"}});
7272
// Server and port
7373
ct.Start("abf2034f975393fa994d1cf8adf9a93e4a29ac29", "https://myserver.com", 403);
7474
ct.SetMaxEventsPerMessage(40);

include/countly/views_module.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ class ViewsModule {
1515
ViewsModule(cly::CountlyDelegates *cly, std::shared_ptr<cly::LoggerModule> logger);
1616

1717
/**
18-
* Close view a with id.
18+
* Close view with id.
1919
*
2020
* @param viewId: id of the view.
2121
*/
2222
void closeViewWithID(const std::string &viewId);
2323

2424
/**
25-
* Close view a with name.
25+
* Close view with name.
2626
*
2727
* @param name: name of the view.
2828
*/
2929
void closeViewWithName(const std::string &name);
3030

3131
/**
32-
* Close view a with name.
32+
* Open view with name.
3333
*
3434
* @param name: name of the view.
3535
* @param segmentation: custom data you want to set.

0 commit comments

Comments
 (0)