Fix boost issue on Ubuntu and fix MySQL lib issue
* Add framework options for configuration * libboost_chrono-mt.a dependency issue (with clock_gettime) * MySQL lib must be added before zlib
This commit is contained in:
parent
f50c63e9e5
commit
f4263384bc
|
@ -3,11 +3,12 @@ project(otclient)
|
|||
|
||||
set(VERSION "0.6.2")
|
||||
|
||||
set(FRAMEWORK_SOUND ON)
|
||||
set(FRAMEWORK_GRAPHICS ON)
|
||||
set(FRAMEWORK_XML ON)
|
||||
set(FRAMEWORK_NET ON)
|
||||
set(FRAMEWORK_SQL ON)
|
||||
option(FRAMEWORK_SOUND "Use SOUND " ON)
|
||||
option(FRAMEWORK_GRAPHICS "Use GRAPHICS " ON)
|
||||
option(FRAMEWORK_XML "Use XML " ON)
|
||||
option(FRAMEWORK_NET "Use NET " ON)
|
||||
option(FRAMEWORK_SQL "Use SQL" ON)
|
||||
|
||||
include(src/framework/CMakeLists.txt)
|
||||
include(src/client/CMakeLists.txt)
|
||||
|
||||
|
|
|
@ -219,14 +219,12 @@ message(STATUS "LuaJIT: " ${LUAJIT})
|
|||
|
||||
find_package(PhysFS REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
set(framework_LIBRARIES ${framework_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LUA_LIBRARY}
|
||||
${PHYSFS_LIBRARY}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${ZLIB_LIBRARY}
|
||||
)
|
||||
|
||||
set(framework_INCLUDE_DIRS ${framework_INCLUDE_DIRS}
|
||||
|
@ -235,7 +233,6 @@ set(framework_INCLUDE_DIRS ${framework_INCLUDE_DIRS}
|
|||
${LUA_INCLUDE_DIR}
|
||||
${PHYSFS_INCLUDE_DIR}
|
||||
${OpenSSL_INCLUDE_DIR}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||
|
@ -277,7 +274,7 @@ else()
|
|||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
||||
set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -rdynamic -Wl,-rpath,./libs") # rdynamic is needed by backtrace.h used in crash handler
|
||||
set(SYSTEM_LIBRARIES dl)
|
||||
set(SYSTEM_LIBRARIES dl rt)
|
||||
endif()
|
||||
set(framework_LIBRARIES ${framework_LIBRARIES} ${SYSTEM_LIBRARIES})
|
||||
endif()
|
||||
|
@ -462,8 +459,6 @@ if(FRAMEWORK_SOUND)
|
|||
set(framework_LIBRARIES ${framework_LIBRARIES} winmm)
|
||||
elseif(APPLE)
|
||||
set(framework_LIBRARIES ${framework_LIBRARIES} System)
|
||||
else()
|
||||
set(framework_LIBRARIES ${framework_LIBRARIES} rt)
|
||||
endif()
|
||||
|
||||
set(framework_SOURCES ${framework_SOURCES}
|
||||
|
@ -542,6 +537,10 @@ if(FRAMEWORK_SQL)
|
|||
set(framework_DEFINITIONS ${framework_DEFINITIONS} -DFW_SQL)
|
||||
endif()
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
set(framework_LIBRARIES ${framework_LIBRARIES} ${ZLIB_LIBRARY})
|
||||
set(framework_INCLUDE_DIRS ${framework_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
|
||||
|
||||
include_directories(${framework_INCLUDE_DIRS})
|
||||
add_definitions(${framework_DEFINITIONS})
|
||||
|
||||
|
|
Loading…
Reference in New Issue