Skip to content

Commit

Permalink
Need find_package(TCL) for TCL_INCLUDE_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
starseeker committed Aug 7, 2024
1 parent 0e17d83 commit 50de308
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions itcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,22 @@ if (ENABLE_ITCL)
# Itcl3 has a problem in that it requires internal Tcl headers.
# Occasionally (but not always) we can get these headers from
# a system include path.
set(HDRS_CANDIDATE_DIR ${TCL_INCLUDE_PATH}8.6/tcl-private)
if (EXISTS ${HDRS_CANDIDATE_DIR})
set(TCL_PRIVATE_HDRS ${HDRS_CANDIDATE_DIR}/generic)
if(NOT WIN32)
set(TCL_PRIVATE_HDRS_OS ${HDRS_CANDIDATE_DIR}/unix)
else(NOT WIN32)
set(TCL_PRIVATE_HDRS_OS ${HDRS_CANDIDATE_DIR}/win)
endif(NOT WIN32)
endif (EXISTS ${HDRS_CANDIDATE_DIR})

if (NOT TARGET TCL_BLD)
# If we're not building the bundled Tcl, see if the system
# Tcl gives us the private headers.
set(CMAKE_FIND_FRAMEWORK NEVER)
find_package(TCL)
set(HDRS_CANDIDATE_DIR ${TCL_INCLUDE_PATH}8.6/tcl-private)
if (EXISTS ${HDRS_CANDIDATE_DIR})
set(TCL_PRIVATE_HDRS ${HDRS_CANDIDATE_DIR}/generic)
if(NOT WIN32)
set(TCL_PRIVATE_HDRS_OS ${HDRS_CANDIDATE_DIR}/unix)
else(NOT WIN32)
set(TCL_PRIVATE_HDRS_OS ${HDRS_CANDIDATE_DIR}/win)
endif(NOT WIN32)
endif (EXISTS ${HDRS_CANDIDATE_DIR})
endif (NOT TARGET TCL_BLD)

# message("TCL HEADERS1: ${TCL_PRIVATE_HDRS}")

Expand Down

0 comments on commit 50de308

Please sign in to comment.