File tree 6 files changed +35
-4
lines changed
6 files changed +35
-4
lines changed Original file line number Diff line number Diff line change 40
40
41
41
- name : Build
42
42
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
43
- run : cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
43
+ run : >
44
+ cmake --build ${{ steps.strings.outputs.build-output-dir }}
45
+ --config ${{ matrix.build_type }}
46
+
47
+ - name : Install
48
+ run : >
49
+ cmake --install ${{ steps.strings.outputs.build-output-dir }}
50
+ --prefix ${{ steps.strings.outputs.build-output-dir }}/dist
51
+ --config ${{ matrix.build_type }}
52
+ --component benoni
53
+ --verbose
44
54
45
55
- name : Test
46
56
working-directory : ${{ steps.strings.outputs.build-output-dir }}
Original file line number Diff line number Diff line change @@ -17,6 +17,20 @@ elseif(UNIX)
17
17
add_subdirectory (src/linux)
18
18
endif ()
19
19
20
+ set_target_properties (benoni PROPERTIES PUBLIC_HEADER include /benoni/http.h)
21
+
22
+ include (GNUInstallDirs)
23
+
24
+ install (TARGETS benoni
25
+ EXPORT benoni
26
+ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} /${PROJECT_NAME} "
27
+ COMPONENT benoni
28
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR} "
29
+ COMPONENT benoni)
30
+ install (EXPORT benoni
31
+ DESTINATION "${CMAKE_INSTALL_DATADIR} /${PROJECT_NAME} /cmake"
32
+ COMPONENT benoni)
33
+
20
34
if (BENONI_EXAMPLES)
21
35
add_subdirectory (examples)
22
36
endif ()
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ configure: .always
16
16
build : .always
17
17
$(CLANG_FORMAT ) --style=file -i include/benoni/http.h src/apple/http.mm src/win32/http.cc src/linux/http.cc examples/http_example.cc test/unit/postman-echo-get.cc test/packaging/project/project.cc
18
18
$(CMAKE ) --build build
19
+ $(CMAKE ) --install build --prefix build/dist --config Debug --component benoni --verbose
19
20
20
21
example : .always
21
22
$(EXAMPLE )
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ add_library(benoni STATIC http.mm)
2
2
3
3
target_compile_options (benoni PUBLIC "-fobjc-arc" )
4
4
5
- target_include_directories (benoni PUBLIC "${PROJECT_SOURCE_DIR} /include" )
5
+ target_include_directories (benoni PUBLIC
6
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include >
7
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} /include >)
6
8
7
9
target_link_libraries (benoni PUBLIC "-framework Foundation" )
Original file line number Diff line number Diff line change 1
1
add_library (benoni STATIC http.cc)
2
2
3
- target_include_directories (benoni PUBLIC "${PROJECT_SOURCE_DIR} /include" )
3
+ target_include_directories (benoni PUBLIC
4
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include >
5
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} /include >)
4
6
5
7
target_link_libraries (benoni PUBLIC libsoup)
Original file line number Diff line number Diff line change 1
1
add_library (benoni STATIC http.cc)
2
2
3
- target_include_directories (benoni PUBLIC "${PROJECT_SOURCE_DIR} /include" )
3
+ target_include_directories (benoni PUBLIC
4
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include >
5
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} /include >)
4
6
5
7
target_link_libraries (benoni PUBLIC "Winhttp.lib" )
You can’t perform that action at this time.
0 commit comments