cmake: use PRIVATE instead of PUBLIC
Avoids leaking compile flags to dependents.
This commit is contained in:
parent
61bb6428fd
commit
5297136bc0
|
@ -42,6 +42,7 @@ HexVersion(PACKAGE_VERSION_NUM ${PROJECT_VERSION_MAJOR} ${PROJECT_VERSION_MINOR}
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
# XXX "check" is treated as "OFF" now, consider detecting it first
|
||||||
option(ENABLE_WERROR "Turn on compile time warnings")
|
option(ENABLE_WERROR "Turn on compile time warnings")
|
||||||
option(ENABLE_DEBUG "Turn on debug output")
|
option(ENABLE_DEBUG "Turn on debug output")
|
||||||
option(ENABLE_THREADS "Turn on threading in apps" ON)
|
option(ENABLE_THREADS "Turn on threading in apps" ON)
|
||||||
|
|
|
@ -130,7 +130,7 @@ if(ENABLE_APP)
|
||||||
)
|
)
|
||||||
|
|
||||||
if(HAVE_MRUBY)
|
if(HAVE_MRUBY)
|
||||||
target_include_directories(nghttpx PUBLIC
|
target_include_directories(nghttpx PRIVATE
|
||||||
"${CMAKE_SOURCE_DIR}/third-party/mruby/include"
|
"${CMAKE_SOURCE_DIR}/third-party/mruby/include"
|
||||||
# ${LIBMRUBY_CFLAGS}
|
# ${LIBMRUBY_CFLAGS}
|
||||||
)
|
)
|
||||||
|
@ -142,7 +142,7 @@ if(ENABLE_APP)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HAVE_NEVERBLEED)
|
if(HAVE_NEVERBLEED)
|
||||||
target_include_directories(nghttpx PUBLIC
|
target_include_directories(nghttpx PRIVATE
|
||||||
"${CMAKE_SOURCE_DIR}/third-party/neverbleed"
|
"${CMAKE_SOURCE_DIR}/third-party/neverbleed"
|
||||||
)
|
)
|
||||||
target_link_libraries(nghttpx
|
target_link_libraries(nghttpx
|
||||||
|
@ -189,7 +189,7 @@ if(ENABLE_APP)
|
||||||
add_executable(nghttp ${NGHTTP_SOURCES} $<TARGET_OBJECTS:http-parser>)
|
add_executable(nghttp ${NGHTTP_SOURCES} $<TARGET_OBJECTS:http-parser>)
|
||||||
add_executable(nghttpd ${NGHTTPD_SOURCES} $<TARGET_OBJECTS:http-parser>)
|
add_executable(nghttpd ${NGHTTPD_SOURCES} $<TARGET_OBJECTS:http-parser>)
|
||||||
add_executable(nghttpx-bin ${NGHTTPX-bin_SOURCES} $<TARGET_OBJECTS:http-parser>)
|
add_executable(nghttpx-bin ${NGHTTPX-bin_SOURCES} $<TARGET_OBJECTS:http-parser>)
|
||||||
target_compile_definitions(nghttpx-bin PUBLIC "-DPKGDATADIR=\"${PKGDATADIR}\"")
|
target_compile_definitions(nghttpx-bin PRIVATE "-DPKGDATADIR=\"${PKGDATADIR}\"")
|
||||||
set_target_properties(nghttpx-bin PROPERTIES OUTPUT_NAME nghttpx)
|
set_target_properties(nghttpx-bin PROPERTIES OUTPUT_NAME nghttpx)
|
||||||
target_link_libraries(nghttpx-bin nghttpx)
|
target_link_libraries(nghttpx-bin nghttpx)
|
||||||
add_executable(h2load ${H2LOAD_SOURCES} $<TARGET_OBJECTS:http-parser>)
|
add_executable(h2load ${H2LOAD_SOURCES} $<TARGET_OBJECTS:http-parser>)
|
||||||
|
@ -248,7 +248,7 @@ if(ENABLE_ASIO_LIB)
|
||||||
${NGHTTP2_ASIO_SOURCES}
|
${NGHTTP2_ASIO_SOURCES}
|
||||||
$<TARGET_OBJECTS:http-parser>
|
$<TARGET_OBJECTS:http-parser>
|
||||||
)
|
)
|
||||||
target_include_directories(nghttp2_asio PUBLIC
|
target_include_directories(nghttp2_asio PRIVATE
|
||||||
${OPENSSL_INCLUDE_DIRS}
|
${OPENSSL_INCLUDE_DIRS}
|
||||||
${Boost_INCLUDE_DIRS}
|
${Boost_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue