From 286a613ef9da9f3ea549190fc17275a4426070e9 Mon Sep 17 00:00:00 2001 From: krj Date: Sat, 10 Oct 2009 05:51:08 +0000 Subject: [PATCH] Add tools/lemon/CMakeLists.txt which creates the lemon parser executable git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30461 f5534014-38df-0310-8fa8-9805f1628bb7 --- CMakeLists.txt | 12 +----------- cmake/modules/UseLemon.cmake | 4 ++-- tools/lemon/CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 13 deletions(-) create mode 100644 tools/lemon/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 2800f20c1e..e0f510793b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -374,6 +374,7 @@ endif() add_subdirectory( codecs ) add_subdirectory( epan ) add_subdirectory( gtk ) +add_subdirectory( tools/lemon ) add_subdirectory( wiretap ) add_subdirectory( wsutil ) @@ -401,17 +402,6 @@ ADD_CUSTOM_COMMAND( ${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl ) -# Create the necessary tools -set(lemon_FILES - tools/lemon/lemon.c -) -set(lemon_LIBS - # Do we need something here on any platform? -) -add_executable(lemon ${lemon_FILES}) -target_link_libraries(lemon ${lemon_LIBS}) -# but don't install - register_tap_files(tshark-tap-register.c ${TSHARK_TAP_SRC} ) diff --git a/cmake/modules/UseLemon.cmake b/cmake/modules/UseLemon.cmake index ecdf7f132e..afdf2ef0bf 100644 --- a/cmake/modules/UseLemon.cmake +++ b/cmake/modules/UseLemon.cmake @@ -10,7 +10,8 @@ MACRO(ADD_LEMON_FILES _sources ) SET(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.c) ADD_CUSTOM_COMMAND( - OUTPUT ${_out} + OUTPUT + ${_out} COMMAND lemon t=${_lemonpardir}/lempar.c ${srcdir}/${_in} @@ -20,4 +21,3 @@ MACRO(ADD_LEMON_FILES _sources ) SET(${_sources} ${${_sources}} ${_out} ) ENDFOREACH (_current_FILE) ENDMACRO(ADD_LEMON_FILES) - diff --git a/tools/lemon/CMakeLists.txt b/tools/lemon/CMakeLists.txt new file mode 100644 index 0000000000..2b396bcd37 --- /dev/null +++ b/tools/lemon/CMakeLists.txt @@ -0,0 +1,34 @@ +# CMakeLists.txt +# +# $Id: CMakeLists.txt 30460 2009-10-10 05:35:21Z krj $ +# +# Wireshark - Network traffic analyzer +# By Gerald Combs +# Copyright 1998 Gerald Combs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +set(lemon_FILES + lemon.c +) + +set(lemon_LIBS + # Do we need something here on any platform? +) + +add_executable(lemon ${lemon_FILES}) + +target_link_libraries(lemon ${lemon_LIBS})