Fixed FreeBSD compilition
This commit is contained in:
parent
0b79ad0d5d
commit
623146996a
@ -97,6 +97,17 @@ if (WIN32)
|
|||||||
add_definitions(-DLUA_BUILD_AS_DLL)
|
add_definitions(-DLUA_BUILD_AS_DLL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#On Unix we use two dynamic loading libraries dl and ltdl.
|
||||||
|
#Preference is for dl on unknown systems as it is specified in POSIX
|
||||||
|
#the dynamic loader is used by lua and sqllite.
|
||||||
|
if (UNIX)
|
||||||
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||||
|
set(DYNAMIC_LOADER ltdl)
|
||||||
|
else()
|
||||||
|
set(DYNAMIC_LOADER dl)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# The Expat library is linked in statically, make the source files aware of that:
|
# The Expat library is linked in statically, make the source files aware of that:
|
||||||
add_definitions(-DXML_STATIC)
|
add_definitions(-DXML_STATIC)
|
||||||
|
|
||||||
|
@ -26,5 +26,5 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
target_link_libraries(lua m dl)
|
target_link_libraries(lua m ${DYNAMIC_LOADER})
|
||||||
endif()
|
endif()
|
||||||
|
@ -21,5 +21,5 @@ endif()
|
|||||||
add_library(sqlite ${SOURCE})
|
add_library(sqlite ${SOURCE})
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
target_link_libraries(sqlite dl)
|
target_link_libraries(sqlite ${DYNAMIC_LOADER})
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user