From 66078cb28575b07c6ee4c3e9352078aafbd5de58 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Thu, 5 May 2022 16:45:43 +0200 Subject: [PATCH] private tcl include dir --- CMakeLists.txt | 6 +++--- ng/CMakeLists.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7437b771..ac6a9130 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,12 +265,12 @@ if (USE_GUI) find_package(OpenGL REQUIRED) target_compile_definitions(nggui PUBLIC -DTCL -DOPENGL -DUSE_TOGL_2 PRIVATE -DUSE_TCL_STUBS -DUSE_TK_STUBS) - target_include_directories(nggui PUBLIC ${TCL_INCLUDE_PATH} ${TK_INCLUDE_PATH}) + target_include_directories(nggui PRIVATE ${TCL_INCLUDE_PATH} ${TK_INCLUDE_PATH}) if(NOT EXISTS ${TK_INCLUDE_PATH}/tkWin.h AND EXISTS ${TK_INCLUDE_PATH}/../win/tkWin.h) - target_include_directories(nggui PUBLIC ${TK_INCLUDE_PATH}/../win) + target_include_directories(nggui PRIVATE ${TK_INCLUDE_PATH}/../win) endif() if(NOT EXISTS ${TK_INCLUDE_PATH}/x11/Xlib.h AND EXISTS ${TK_INCLUDE_PATH}/../xlib/X11/Xlib.h) - target_include_directories(nggui PUBLIC ${TK_INCLUDE_PATH}/../xlib) + target_include_directories(nggui PRIVATE ${TK_INCLUDE_PATH}/../xlib) endif() target_link_libraries(nggui PUBLIC nglib togl diff --git a/ng/CMakeLists.txt b/ng/CMakeLists.txt index 53221d1f..7ba13814 100644 --- a/ng/CMakeLists.txt +++ b/ng/CMakeLists.txt @@ -24,6 +24,7 @@ if(USE_GUI) target_sources(netgen PRIVATE ../windows/netgen.rc) endif(WIN32) target_link_libraries( netgen nglib nggui netgen_python ${TK_LIBRARY} ${TCL_LIBRARY}) + target_include_directories(netgen PRIVATE ${TCL_INCLUDE_PATH} ${TK_INCLUDE_PATH}) install(TARGETS netgen ${NG_INSTALL_DIR}) if(APPLE) set_target_properties(netgen PROPERTIES OUTPUT_NAME netgen)