diff options
author | chai <chaifix@163.com> | 2021-11-08 01:17:11 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-08 01:17:11 +0800 |
commit | efce5b6bd5c9d4f8214a71e0f7a7c35751710a4c (patch) | |
tree | 0789475ded5c377667165a3ddb047ca6703bcf33 /ThirdParty/toluapp/CMakeLists.txt | |
parent | ed78df90944bbe6b7de7308bda2bf3a7f1bc3de6 (diff) |
+ tolua
+ lpeg
Diffstat (limited to 'ThirdParty/toluapp/CMakeLists.txt')
-rw-r--r-- | ThirdParty/toluapp/CMakeLists.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ThirdParty/toluapp/CMakeLists.txt b/ThirdParty/toluapp/CMakeLists.txt new file mode 100644 index 0000000..b59ef7c --- /dev/null +++ b/ThirdParty/toluapp/CMakeLists.txt @@ -0,0 +1,36 @@ +# Copyright (C) 2007-2012 LuaDist. +# Created by Peter Kapec +# Redistribution and use of this file is allowed according to the terms of the MIT license. +# For details see the COPYRIGHT file distributed with LuaDist. +# Please note that the package source code is licensed under its own license. + +project ( toluapp C ) +cmake_minimum_required ( VERSION 2.8 ) +include ( cmake/dist.cmake ) + +find_package ( Lua REQUIRED ) +include_directories ( include src/lib ${LUA_INCLUDE_DIR} ) + +# Build lib +file ( GLOB SRC_LIBTOLUAPP src/lib/*.c ) +if ( MSVC ) + set ( DEF_FILE libtoluapp.def ) +endif ( ) + +add_library ( toluapp_lib ${SRC_LIBTOLUAPP} ${DEF_FILE} ) +target_link_libraries ( toluapp_lib ${LUA_LIBRARIES} ) +set_target_properties ( toluapp_lib PROPERTIES OUTPUT_NAME toluapp CLEAN_DIRECT_OUTPUT + 1 ) + +# Build app +include_directories ( src/bin ) +set ( SRC_TOLUA src/bin/tolua.c src/bin/toluabind.c ) +add_executable ( toluapp ${SRC_TOLUA} ) +target_link_libraries ( toluapp toluapp_lib ${LUA_LIBRARIES} ) + +# Install +install_library ( toluapp_lib ) +install_executable ( toluapp ) +install_header ( include/ ) +install_data ( README INSTALL ) +install_doc ( doc/ ) |