summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Drahoš <drahosp@gmail.com>2012-09-30 16:52:19 +0200
committerPeter Drahoš <drahosp@gmail.com>2012-09-30 16:52:19 +0200
commit99641870d948f42ccdcd6f0d8ecb13d0340b8614 (patch)
tree5b22bbfc6a051a1a0216ae90b338819b38d2c591
parentb4cdc46eaafdadf2e87de2667d68cf55aa839464 (diff)
downloadlua-99641870d948f42ccdcd6f0d8ecb13d0340b8614.tar.gz
Minor tweaks in window dll build
-rw-r--r--.travis.yml2
-rw-r--r--CMakeLists.txt11
2 files changed, 7 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index 049d304..067e4d9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,7 +4,7 @@
# We assume C build environments
language: C
-
+
# Try using multiple Lua Implementations
env:
- TOOL="" # Use native compiler (GCC usually)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e18e81..06267a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,8 +39,12 @@ set ( LUA_CPATH_DEFAULT "./?${LUA_MODULE_SUFFIX};${LUA_DIR}${LUA_CDIR}/?${LUA_MO
if ( WIN32 AND NOT CYGWIN )
# Windows systems
option ( LUA_WIN "Windows specific build." ON )
- option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ON )
- # Paths (Double escapes needed)
+ option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ${BUILD_SHARED_LIBS} )
+ if ( LUA_BUILD_AS_DLL )
+ add_definitions ( -DLUA_BUILD_AS_DLL )
+ endif ()
+
+ # Paths (Double escapes ne option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ON )eded)
set ( LUA_DIRSEP "\\\\" )
string ( REPLACE " /" ${LUA_DIRSEP} LUA_DIR "${LUA_DIR}" )
string ( REPLACE "/" ${LUA_DIRSEP} LUA_LDIR "${LUA_LDIR}" )
@@ -121,9 +125,6 @@ endif ( )
add_library ( liblua SHARED ${SRC_CORE} ${SRC_LIB} ${LUA_DLL_RC} ${LUA_DEF} )
target_link_libraries ( liblua ${LIBS} )
set_target_properties ( liblua PROPERTIES OUTPUT_NAME lua CLEAN_DIRECT_OUTPUT 1 )
-if ( LUA_BUILD_AS_DLL )
- set_target_properties ( liblua PROPERTIES COMPILE_DEFINITIONS LUA_BUILD_AS_DLL )
-endif ( )
add_executable ( lua ${SRC_LUA} src/lua.rc )
target_link_libraries ( lua liblua )