This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
49 lines (41 loc) · 1.86 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright (C) 2007-2011 LuaDist.
# Created by Peter Drahoš
# 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.
# C type needed for correct library suffix and prefix detection
project ( luadist C )
cmake_minimum_required ( VERSION 2.6 )
include ( dist.cmake )
## LuaDist settings
# Host specific setup
set ( DETECTED_TYPE ${CMAKE_SYSTEM_PROCESSOR} )
set ( DETECTED_ARCH ${CMAKE_SYSTEM_NAME} )
if ( CYGWIN )
# Make sure Cygwin uses correct arch and type.
set ( DETECTED_TYPE x86 )
set ( DETECTED_ARCH Cygwin )
elseif ( MSVC )
set ( DETECTED_TYPE MSVC32 )
endif ()
set ( DIST_VERSION 1.2 )
set ( DIST_TYPE ${DETECTED_TYPE} CACHE STRING "Host system type. PLEASE CHECK!" FORCE )
set ( DIST_ARCH ${DETECTED_ARCH} CACHE STRING "Host system architecture. PLEASE CHECK!" FORCE )
set ( DIST_LUA_LIBRARY "/${INSTALL_LIB}/${CMAKE_SHARED_LIBRARY_PREFIX}lua${CMAKE_SHARED_LIBRARY_SUFFIX}" )
if ( WIN32 OR CYGWIN )
# On Windows use the import library
set ( DIST_LUA_LIBRARY "/${INSTALL_LIB}/${CMAKE_IMPORT_LIBRARY_PREFIX}lua${CMAKE_IMPORT_LIBRARY_SUFFIX}" )
endif ()
configure_file ( dist/config.lua.in ${CMAKE_CURRENT_BINARY_DIR}/dist/config.lua @ONLY )
install_lua_executable ( luadist luadist )
install_lua_module ( dist.init dist/init.lua )
install_lua_module ( dist.dep dist/dep.lua )
install_lua_module ( dist.fetch dist/fetch.lua )
install_lua_module ( dist.log dist/log.lua )
install_lua_module ( dist.manifest dist/manifest.lua )
install_lua_module ( dist.package dist/package.lua )
install_lua_module ( dist.persist dist/persist.lua )
install_lua_module ( dist.sys dist/sys.lua )
install_lua_module ( dist.config ${CMAKE_CURRENT_BINARY_DIR}/dist/config.lua )
install_data ( COPYRIGHT README )
install_doc ( doc/ )