1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 17:47:09 +00:00
conky/CMakeLists.txt
Brenden Matthews 4fc4128ffa Squashed '3rdparty/toluapp/' content from commit 2e0e8533
git-subtree-dir: 3rdparty/toluapp
git-subtree-split: 2e0e8533a56405df26ebf15735cb8b81f23d0990
2018-12-20 20:48:35 -05:00

40 lines
1.3 KiB
CMake

# 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 3.4 )
include ( cmake/dist.cmake )
include(FindPkgConfig)
pkg_search_module(LUA REQUIRED lua>=5.3 lua5.3 lua-5.3 lua53 lua5.2 lua-5.2 lua52)
include_directories ( include src/lib ${LUA_INCLUDE_DIRS} )
# Build lib
file ( GLOB SRC_LIBTOLUAPP src/lib/*.c )
if ( MSVC )
set ( DEF_FILE libtoluapp.def )
endif ( )
add_library ( toluapp_lib SHARED ${SRC_LIBTOLUAPP} ${DEF_FILE} )
add_library ( toluapp_lib_static STATIC ${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/ )