Merge branch 'master' of github.com:dane-johnson/couch
This commit is contained in:
commit
fff5fc53b4
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
build/
|
||||
build-win/
|
||||
binaries/
|
||||
dist/
|
@ -26,6 +26,8 @@ add_dependencies(couchlib shader_headers)
|
||||
target_include_directories(couchlib
|
||||
PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/shaders/")
|
||||
|
||||
file(COPY LICENSE CORRESPONDINGSOURCE.txt DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(couch glfw3dll)
|
||||
target_link_libraries(couch ssp)
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
cd `dirname $0`
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
@ -16,7 +16,7 @@ if (LUA_ENABLED)
|
||||
find_package(Lua REQUIRED)
|
||||
endif ()
|
||||
|
||||
add_library(couchlib SHARED)
|
||||
add_library(couchlib STATIC)
|
||||
target_sources(couchlib PUBLIC
|
||||
Camera.h
|
||||
Camera.cpp
|
||||
@ -69,11 +69,8 @@ target_sources(couchlib PUBLIC
|
||||
Shaders/SkyboxShader.cpp)
|
||||
|
||||
|
||||
if (WIN32)
|
||||
add_library(couchlib_luascripting STATIC)
|
||||
else ()
|
||||
add_library(couchlib_luascripting SHARED)
|
||||
endif ()
|
||||
add_library(couchlib_luascripting STATIC)
|
||||
|
||||
target_sources(couchlib_luascripting PUBLIC
|
||||
Scripting/Lua.h
|
||||
Scripting/Lua.cpp)
|
||||
|
39
package.sh
Executable file
39
package.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
cd `dirname $0`
|
||||
|
||||
mkdir -p dist
|
||||
|
||||
## Linux build
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
rm -f couch-linux.tgz
|
||||
tar cvzf couch-linux.tgz \
|
||||
couch \
|
||||
CORRESPONDINGSOURCE.txt \
|
||||
LICENSE
|
||||
mv couch-linux.tgz ../dist
|
||||
cd ..
|
||||
|
||||
## Windows build
|
||||
mkdir -p build-win
|
||||
cd build-win
|
||||
x86_64-w64-mingw32-cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
rm -rf couch-win.zip
|
||||
cp ../binaries/*.dll .
|
||||
zip couch-win.zip \
|
||||
couch.exe \
|
||||
CORRESPONDINGSOURCE.txt \
|
||||
LICENSE \
|
||||
*.dll
|
||||
mv couch-win.zip ../dist
|
||||
cd ..
|
||||
|
||||
## Source packages
|
||||
git archive -o dist/couch-source.tgz master
|
||||
git archive -o dist/couch-source.zip master
|
@ -4,21 +4,15 @@ set_property(SOURCE couch.i PROPERTY CPLUSPLUS ON)
|
||||
set_property(SOURCE couch.i PROPERTY USE_TARGET_INCLUDE_DIRECTORIES ON)
|
||||
|
||||
if (LUA_ENABLED)
|
||||
if (NOT WIN32)
|
||||
swig_add_library(couchlua
|
||||
TYPE SHARED
|
||||
LANGUAGE lua
|
||||
SOURCES couch.i lua/helpers.i)
|
||||
else()
|
||||
swig_add_library(couchlua
|
||||
TYPE STATIC
|
||||
LANGUAGE lua
|
||||
SOURCES couch.i lua/helpers.i)
|
||||
endif()
|
||||
target_include_directories(couchlua PRIVATE "${PROJECT_SOURCE_DIR}/core")
|
||||
swig_add_library(couchlua
|
||||
TYPE STATIC
|
||||
LANGUAGE lua
|
||||
SOURCES couch.i lua/helpers.i)
|
||||
|
||||
swig_link_libraries(couchlua
|
||||
PRIVATE
|
||||
couchlib
|
||||
${LUA_LIBRARIES})
|
||||
target_include_directories(couchlua PRIVATE "${PROJECT_SOURCE_DIR}/core")
|
||||
|
||||
swig_link_libraries(couchlua
|
||||
PRIVATE
|
||||
couchlib
|
||||
${LUA_LIBRARIES})
|
||||
endif ()
|
||||
|
Loading…
Reference in New Issue
Block a user