summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/tcl/CMakeLists.txt
diff options
context:
space:
mode:
authorJulien Louis <ptitlouis@sysif.net>2008-10-18 13:54:59 +0200
committerJulien Louis <ptitlouis@sysif.net>2008-10-18 13:54:59 +0200
commit1f10ee141ae7376675758bc9d1792346f2728c3f (patch)
treedc323570cd2502a9456b73f388cabf6af58b6975 /src/plugins/scripts/tcl/CMakeLists.txt
parenteab690aaafcd31dfe9400f51548896aafad29817 (diff)
downloadweechat-1f10ee141ae7376675758bc9d1792346f2728c3f.zip
- Add FindTCL.cmake to fix FreeBSD detection
- Only call Tcl_CreateNamespace when available in the public API, fix compatibility with older release
Diffstat (limited to 'src/plugins/scripts/tcl/CMakeLists.txt')
-rw-r--r--src/plugins/scripts/tcl/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/scripts/tcl/CMakeLists.txt b/src/plugins/scripts/tcl/CMakeLists.txt
index 977a36d4f..9b69794c6 100644
--- a/src/plugins/scripts/tcl/CMakeLists.txt
+++ b/src/plugins/scripts/tcl/CMakeLists.txt
@@ -20,9 +20,14 @@ weechat-tcl-api.c weechat-tcl-api.h)
SET_TARGET_PROPERTIES(tcl PROPERTIES PREFIX "")
IF(TCL_FOUND)
+ SET(CMAKE_REQUIRED_INCLUDES "${TCL_INCLUDE_PATH}")
+ SET(CMAKE_REQUIRED_LIBRARIES "${TCL_LIBRARY}")
+ CHECK_SYMBOL_EXISTS(Tcl_CreateNamespace tcl.h HAVE_TCL_CREATE_NS)
+
INCLUDE_DIRECTORIES(${TCL_INCLUDE_PATH})
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${TCL_LFLAGS}")
TARGET_LINK_LIBRARIES(tcl ${TCL_LIBRARY} weechat_scripts)
+
ENDIF(TCL_FOUND)
INSTALL(TARGETS tcl LIBRARY DESTINATION lib/weechat/plugins)