Add build instructions for linux, fix some cmake issues

This commit is contained in:
root
2020-11-08 06:54:59 -05:00
parent 1ef6cf53a2
commit b8bd939bd7
2 changed files with 37 additions and 3 deletions
+1 -2
View File
@@ -24,15 +24,14 @@ file(GLOB source_files "src/*.cpp" "src/*/*.cpp" "include/*.h" "include/*/*.h" "
add_executable(BeamMP-Server ${source_files})
target_include_directories(BeamMP-Server SYSTEM PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
find_package(Lua 5.3 REQUIRED)
target_include_directories(BeamMP-Server SYSTEM PUBLIC ${LUA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})
if (UNIX)
find_package(Lua 5.3 REQUIRED)
target_link_libraries(BeamMP-Server curl z pthread stdc++fs ${Boost_LINK_DIRS} ${LUA_LIBRARIES})
elseif (WIN32)
include(FindLua)
find_package(CURL CONFIG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(Lua REQUIRED)
target_link_libraries(BeamMP-Server PRIVATE urlmon ws2_32 CURL::libcurl ZLIB::ZLIB ${Boost_LINK_DIRS} ${LUA_LIBRARIES})
endif ()