This repository was archived by the owner on Mar 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
27
27
endif ()
28
28
29
29
add_library (json11 json11.cpp )
30
- target_include_directories (json11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} )
30
+ target_include_directories (json11 PUBLIC
31
+ $< BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} >
32
+ $< INSTALL_INTERFACE:.>
33
+ )
31
34
target_compile_options (json11
32
35
PRIVATE -fPIC -fno-rtti -fno-exceptions -Wall )
33
36
@@ -56,6 +59,11 @@ if (JSON11_BUILD_TESTS)
56
59
target_link_libraries (json11_test json11 )
57
60
endif ()
58
61
59
- install (TARGETS json11 DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE} )
62
+ install (TARGETS json11 EXPORT json11Config DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}
63
+ ARCHIVE DESTINATION lib
64
+ LIBRARY DESTINATION lib
65
+ RUNTIME DESTINATION bin
66
+ INCLUDES DESTINATION include )
60
67
install (FILES "${CMAKE_CURRENT_SOURCE_DIR} /json11.hpp" DESTINATION include /${CMAKE_LIBRARY_ARCHITECTURE} )
61
68
install (FILES "${CMAKE_CURRENT_BINARY_DIR} /json11.pc" DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig )
69
+ install (EXPORT json11Config NAMESPACE json11:: DESTINATION cmake )
You can’t perform that action at this time.
0 commit comments