From f067b42607756e149016c72fd27687a3b2498f21 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 1 Oct 2014 11:13:12 +0200 Subject: [PATCH] Allow build of lp-gen-wrappers when compiling with CMake. --- CMakeLists.txt | 3 +++ tools/CMakeLists.txt | 55 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 tools/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index cda7f18fe..4311101fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,6 +104,9 @@ add_definitions(-DHAVE_CONFIG_H) add_subdirectory(coreapi) add_subdirectory(share) +if(ENABLE_TOOLS) + add_subdirectory(tools) +endif() install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/FindLinphone.cmake diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 index 000000000..6d383a4a7 --- /dev/null +++ b/tools/CMakeLists.txt @@ -0,0 +1,55 @@ +############################################################################ +# CMakeLists.txt +# Copyright (C) 2014 Belledonne Communications, Grenoble France +# +############################################################################ +# +# 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. +# +############################################################################ + +if(MSVC) + find_library(LIBGCC NAMES gcc) + find_library(LIBMINGWEX NAMES mingwex) +endif() + +set(LP_GEN_WRAPPERS_SOURCE_FILES + generator.cc + generator.hh + genwrappers.cc + software-desc.cc + software-desc.hh +) + +add_definitions( + -DIN_LINPHONE +) + +set(LP_GEN_WRAPPERS_LIBS + ${LIBGCC} + ${LIBMINGWEX} + ${XML2_LIBRARIES} +) + +add_executable(lp-gen-wrappers ${LP_GEN_WRAPPERS_SOURCE_FILES}) +target_link_libraries(lp-gen-wrappers ${LP_GEN_WRAPPERS_LIBS}) + + +install(TARGETS lp-gen-wrappers + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +)