> find_path(FLEX_INCLUDE_DIR FlexLexer.h > DOC "Path to the flex headers") can never find port's FlexLexer.h that is installed into /usr/local/include/flex/FlexLexer.h Ports should use flex from ports, not from the base, because port have a generally newer version. The above place in share/cmake/Modules/FindFLEX.cmake should be: > find_path(FLEX_INCLUDE_DIR flex/FlexLexer.h > DOC "Path to the flex headers")
Moin moin Sorry, I overlooked this PR. We could add some path hints to make it also look in localbase too for headers and libraries of flex. Do you have a port in mind to test it against? mfg Tobias [1] https://cmake.org/cmake/help/v3.16/command/find_path.html
The port is cad/cascade-compiler. files/patch-CMakeLists.txt removes FLEX_INCLUDE_DIRS because it is wrong (not from ports).
Created attachment 210859 [details] v1 Could you try the attached patch to devel/cmake? mfg Tobias
Now FLEX_INCLUDE_DIRS=/usr/local/include/flex. Thank you for working on this!
Committed. Let's hope there is no fallout :-)
A commit references this bug: Author: tcberner Date: Sun Jan 19 09:26:55 UTC 2020 New revision: 523523 URL: https://svnweb.freebsd.org/changeset/ports/523523 Log: devel/cmake: Make Flex find module look in ${LOCALBASE} PR: 243068 Reported by: yuri Changes: head/devel/cmake/Makefile head/devel/cmake/files/patch-Modules_FindFLEX.cmake