[channels,rdpear] fix krb5 inclusion

* do not expose the krb5 include path in interface library, it is
  private to the object library
* fix include krb5.h instead of krb5/krb5.h
This commit is contained in:
akallabeth 2024-09-14 17:24:07 +02:00
parent 6327b77461
commit 2bcf2c50eb
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
4 changed files with 28 additions and 13 deletions

View File

@ -16,7 +16,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <krb5/krb5.h>
#include <krb5.h>
#include <errno.h>
#include <winpr/assert.h>

View File

@ -26,10 +26,25 @@ add_library(rdpear-common-obj OBJECT
)
target_include_directories(rdpear-common
INTERFACE ${KRB5_INCLUDE_DIRS})
target_include_directories(rdpear-common-obj
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${KRB5_INCLUDE_DIRS})
SYSTEM
INTERFACE ${KRB5_INCLUDE_DIRS}
)
target_compile_options(rdpear-common
INTERFACE
${KRB5_CFLAGS}
)
target_link_options(rdpear-common
INTERFACE
${KRB5_LDFLAGS}
)
target_include_directories(rdpear-common-obj
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
)
target_include_directories(rdpear-common-obj
SYSTEM
PRIVATE ${KRB5_INCLUDE_DIRS}
)
target_link_directories(rdpear-common INTERFACE ${KRB5_LIBRARY_DIRS})
target_link_libraries(rdpear-common INTERFACE
${KRB5_LIBRARIES}

View File

@ -201,14 +201,14 @@ else()
GET_KRB5_BY_CONFIG("${KRB5_ROOT_CONFIG}")
endif()
#message("using KRB5_FOUND ${KRB5_FOUND} ")
#message("using KRB5_VERSION ${KRB5_VERSION} ")
#message("using KRB5_FLAVOUR ${KRB5_FLAVOUR} ")
#message("using KRB5_CFLAGS ${KRB5_CFLAGS} ")
#message("using KRB5_LDFLAGS ${KRB5_LDFLAGS} ")
#message("using KRB5_INCLUDEDIR ${KRB5_INCLUDEDIR} ")
#message("using KRB5_INCLUDE_DIRS ${KRB5_INCLUDEDIR} ")
#message("using KRB5_LIBRARIES ${KRB5_LIBRARIES} ")
message("using KRB5_FOUND ${KRB5_FOUND} ")
message("using KRB5_VERSION ${KRB5_VERSION} ")
message("using KRB5_FLAVOUR ${KRB5_FLAVOUR} ")
message("using KRB5_CFLAGS ${KRB5_CFLAGS} ")
message("using KRB5_LDFLAGS ${KRB5_LDFLAGS} ")
message("using KRB5_INCLUDEDIR ${KRB5_INCLUDEDIR} ")
message("using KRB5_INCLUDE_DIRS ${KRB5_INCLUDE_DIRS} ")
message("using KRB5_LIBRARIES ${KRB5_LIBRARIES} ")
include(FindPackageHandleStandardArgs)