Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor tweaks in window dll build

  • Loading branch information...
commit 99641870d948f42ccdcd6f0d8ecb13d0340b8614 1 parent b4cdc46
@drahosp drahosp authored
Showing with 7 additions and 6 deletions.
  1. +1 −1  .travis.yml
  2. +6 −5 CMakeLists.txt
View
2  .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)
View
11 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 )
@flaviojs
flaviojs added a note

WARNING: adding the definition like this affects all targets, which means luac.exe will be exporting the same symbols as lua.dll when compiled with MSVC (probably not intended)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ endif ()
+
+ # Paths (Double escapes ne option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ON )eded)
@rpavlik
rpavlik added a note

Search and replace bug?

@drahosp Owner
drahosp added a note

Seems like unintended paste. Fixing it now, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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 )

1 comment on commit 9964187

@drahosp
Owner

True, I'll revert it to per target definition. Thanks.

Please sign in to comment.
Something went wrong with that request. Please try again.