rearrange cmakelists

This commit is contained in:
Lion Kortlepel 2020-11-16 15:39:03 +01:00
parent 086bcb5ecc
commit 450f6d7139

View File

@ -20,15 +20,16 @@ elseif (WIN32)
endif () endif ()
find_package(Boost 1.70.0 REQUIRED COMPONENTS system thread) find_package(Boost 1.70.0 REQUIRED COMPONENTS system thread)
file(GLOB source_files "src/*.cpp" "src/*/*.cpp" "include/*.h" "include/*/*.h" "include/*.hpp" "include/*/*.hpp") file(GLOB source_files "src/*.cpp" "src/*/*.cpp" "include/*.h" "include/*/*.h" "include/*.hpp" "include/*/*.hpp")
add_executable(BeamMP-Server ${source_files}) add_executable(BeamMP-Server ${source_files})
target_include_directories(BeamMP-Server SYSTEM PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>) target_include_directories(BeamMP-Server SYSTEM PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
find_package(Lua 5.3 REQUIRED) find_package(Lua 5.3 REQUIRED)
target_include_directories(BeamMP-Server SYSTEM PUBLIC ${LUA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}) target_include_directories(BeamMP-Server SYSTEM PUBLIC ${LUA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})
if (UNIX) if (UNIX)
target_link_libraries(BeamMP-Server curl z pthread stdc++fs ${Boost_LINK_DIRS} ${LUA_LIBRARIES}) target_link_libraries(BeamMP-Server z pthread stdc++fs ${Boost_LINK_DIRS} lua curl dl)
elseif (WIN32) elseif (WIN32)
include(FindLua) include(FindLua)
find_package(CURL CONFIG REQUIRED) find_package(CURL CONFIG REQUIRED)