1
0

Fixed linking order under MinGW.

Ref.: #1044
This commit is contained in:
Mattes D 2014-07-01 06:40:38 +02:00
parent 0fb236bfe4
commit 4f60f5aef4
2 changed files with 9 additions and 3 deletions

View File

@ -9,8 +9,14 @@ file(GLOB SOURCE
)
# add headers to MSVC project files:
# Lua is required as a DLL for LuaSQLite:
if (WIN32)
add_definitions(-DLUA_BUILD_AS_DLL)
endif()
# add headers to MSVC project files:
if (MSVC)
file(GLOB HEADERS "src/*.h")
list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/src/lua.h" "${PROJECT_SOURCE_DIR}/src/luac.h")
set(SOURCE ${SOURCE} ${HEADERS})
@ -25,5 +31,5 @@ endif()
add_library(sqlite ${SOURCE})
if (UNIX)
target_link_libraries(sqlite ${DYNAMIC_LOADER})
target_link_libraries(sqlite ${DYNAMIC_LOADER} lua)
endif()

View File

@ -261,4 +261,4 @@ endif ()
if (WIN32)
target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)
endif()
target_link_libraries(${EXECUTABLE} luaexpat iniFile jsoncpp polarssl zlib lua sqlite)
target_link_libraries(${EXECUTABLE} luaexpat iniFile jsoncpp polarssl zlib sqlite lua)