File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11target_include_directories (${SIMDJSON_LIB_NAME}
2- PUBLIC
3- ${PROJECT_SOURCE_DIR} /benchmark
4- ${PROJECT_SOURCE_DIR} /benchmark/linux
2+ INTERFACE
3+ $< BUILD_INTERFACE : $ {PROJECT_SOURCE_DIR} /benchmark >
4+ $< BUILD_INTERFACE : $ {PROJECT_SOURCE_DIR} /benchmark /linux >
55)
66
77add_cpp_benchmark (parse )
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ if(${CMAKE_C_COMPILER_ID} MATCHES "Intel") # icc / icpc
33 set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-intel" )
44endif ()
55
6+ include (GNUInstallDirs )
67
78# we default on a shared library.
89if (SIMDJSON_BUILD_STATIC)
@@ -26,11 +27,25 @@ set(SIMDJSON_SRC
2627 )
2728
2829add_library (${SIMDJSON_LIB_NAME} ${SIMDJSON_LIB_TYPE} ${SIMDJSON_SRC} )
30+
2931target_include_directories (${SIMDJSON_LIB_NAME}
30- PUBLIC ${PROJECT_SOURCE_DIR} /include
32+ PUBLIC
33+ $<BUILD_INTERFACE :${PROJECT_SOURCE_DIR} /include >
34+ $<INSTALL_INTERFACE :${CMAKE_INSTALL_INCLUDEDIR} >
35+ )
36+
37+ install (TARGETS ${SIMDJSON_LIB_NAME}
38+ EXPORT ${SIMDJSON_LIB_NAME} -config
39+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
40+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
41+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
3142)
3243
33- install (TARGETS ${SIMDJSON_LIB_NAME} DESTINATION lib)
44+ install (EXPORT ${SIMDJSON_LIB_NAME} -config
45+ FILE ${SIMDJSON_LIB_NAME} -config.cmake
46+ NAMESPACE ${SIMDJSON_LIB_NAME} ::
47+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/${SIMDJSON_LIB_NAME}
48+ )
3449
3550if (NOT MSVC )
3651## We output the library at the root of the current directory where cmake is invoked
Original file line number Diff line number Diff line change 11if (MSVC )
2- target_include_directories (${SIMDJSON_LIB_NAME}
3- PUBLIC $ {PROJECT_SOURCE_DIR}/windows
4- )
2+ target_include_directories (${SIMDJSON_LIB_NAME}
3+ INTERFACE $< BUILD_INTERFACE : $ {PROJECT_SOURCE_DIR} /windows >
4+ )
55endif ()
66
77add_cpp_test (jsoncheck )
You can’t perform that action at this time.
0 commit comments