From e60f74217c216a6cbb1ee3b7c0b8cb95c07c7f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Draho=C5=A1?= Date: Mon, 14 Dec 2015 00:06:03 +0100 Subject: Fix build when using Visual Studio, incorrect setup of dllexports. --- CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62a911a..b35d92b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,8 +41,8 @@ if ( WIN32 AND NOT CYGWIN ) # Windows systems option ( LUA_USE_WINDOWS "Windows specific build." ON ) option ( LUA_BUILD_WLUA "Build wLua interpretter without console output." ON ) - option ( LUA_DL_DLL "Build with Dll support" ON ) - + option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ${BUILD_SHARED_LIBS} ) + # Paths (Double escapes needed) set ( LUA_DIRSEP "\\\\" ) string ( REPLACE " /" ${LUA_DIRSEP} LUA_DIR "${LUA_DIR}" ) @@ -77,7 +77,7 @@ if ( LUA_USE_DLOPEN ) # Link to dynamic linker library "dl" find_library ( DL_LIBRARY NAMES dl ) if ( DL_LIBRARY ) - list ( APPEND LIBS ${DL_LIBRARY} ) + list ( APPEND LIBS ${DL_LIBRARY} ) endif ( ) endif ( ) @@ -93,11 +93,11 @@ configure_file ( src/luaconf.h.in ${CMAKE_CURRENT_BINARY_DIR}/luaconf.h ) # Sources and headers include_directories ( src ${CMAKE_CURRENT_BINARY_DIR} ) -set ( SRC_CORE src/lapi.c src/lcode.c src/lctype.c src/ldebug.c src/ldo.c src/ldump.c - src/lfunc.c src/lgc.c src/llex.c src/lmem.c src/lobject.c src/lopcodes.c src/lparser.c +set ( SRC_CORE src/lapi.c src/lcode.c src/lctype.c src/ldebug.c src/ldo.c src/ldump.c + src/lfunc.c src/lgc.c src/llex.c src/lmem.c src/lobject.c src/lopcodes.c src/lparser.c src/lstate.c src/lstring.c src/ltable.c src/ltm.c src/lundump.c src/lvm.c src/lzio.c ) -set ( SRC_LIB src/lauxlib.c src/lbaselib.c src/lbitlib.c src/lcorolib.c src/ldblib.c - src/liolib.c src/lmathlib.c src/loslib.c src/lstrlib.c src/ltablib.c src/linit.c +set ( SRC_LIB src/lauxlib.c src/lbaselib.c src/lbitlib.c src/lcorolib.c src/ldblib.c + src/liolib.c src/lmathlib.c src/loslib.c src/lstrlib.c src/ltablib.c src/linit.c src/lutf8lib.c ) set ( SRC_LUA src/lua.c ) set ( SRC_LUAC src/luac.c ) @@ -111,11 +111,11 @@ endif ( ) ## BUILD # Create lua library -add_library ( liblua ${SRC_CORE} ${SRC_LIB} ${LUA_DLL_RC} ${LUA_DEF} ) +add_library ( liblua ${SRC_CORE} ${SRC_LIB} ${LUA_DLL_RC} ) 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_DL_DLL ) + set_target_properties ( liblua PROPERTIES COMPILE_DEFINITIONS LUA_BUILD_AS_DLL ) endif () add_executable ( lua ${SRC_LUA} src/lua.rc ) -- cgit v1.2.1