mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-31 01:25:21 +00:00
Fixing the cmake
This commit is contained in:
+6
-9
@@ -3,10 +3,10 @@ project(bomberman)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
include_directories(bomberman lib/Ray/sources)
|
||||
include_directories(bomberman lib/wal/sources)
|
||||
include_directories(bomberman lib/LuaGate/sources)
|
||||
include_directories(bomberman sources)
|
||||
include_directories(lib/Ray/sources)
|
||||
include_directories(lib/wal/sources)
|
||||
include_directories(lib/LuaGate/sources)
|
||||
include_directories(sources)
|
||||
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/wal)
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/Ray)
|
||||
@@ -149,9 +149,7 @@ add_executable(bomberman
|
||||
sources/main.cpp
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(bomberman PUBLIC sources ${LUA_INCLUDE_DIR})
|
||||
target_link_libraries(bomberman PUBLIC wal ray ${LUA_LIBRARIES} LuaGate)
|
||||
target_link_libraries(bomberman PUBLIC wal ray LuaGate)
|
||||
|
||||
add_executable(unit_tests EXCLUDE_FROM_ALL
|
||||
${SOURCES}
|
||||
@@ -164,8 +162,7 @@ add_executable(unit_tests EXCLUDE_FROM_ALL
|
||||
tests/ViewTest.cpp
|
||||
tests/CollisionTest.cpp
|
||||
)
|
||||
target_include_directories(unit_tests PUBLIC sources)
|
||||
target_link_libraries(unit_tests PUBLIC wal ray ${LUA_LIBRARIES})
|
||||
target_link_libraries(unit_tests PUBLIC wal ray LuaGate)
|
||||
|
||||
find_package(Catch2 QUIET)
|
||||
if (NOT Catch2_FOUND)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.11)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(LIB_NAME "LuaGate")
|
||||
project(LuaGate)
|
||||
|
||||
project("${LIB_NAME}")
|
||||
include_directories(${LIB_NAME} ./sources)
|
||||
include_directories(sources)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(GCC_COVERAGE_COMPILE_FLAGS "-Wall -Wextra -Werror -Wshadow")
|
||||
@@ -18,10 +17,8 @@ set(SRC
|
||||
sources/LuaGate.cpp
|
||||
)
|
||||
|
||||
add_library(${LIB_NAME} STATIC ${SRC} ${HEADERS})
|
||||
|
||||
|
||||
include(FindLua)
|
||||
message(LUA INCLUDE PATH: ${LUA_INCLUDE_DIR})
|
||||
include_directories(${LIB_NAME} ${LUA_INCLUDE_DIR})
|
||||
target_link_libraries(${LIB_NAME} ${LUA_LIBRARIES})
|
||||
include_directories(${LUA_INCLUDE_DIR})
|
||||
|
||||
add_library(LuaGate STATIC ${SRC} ${HEADERS})
|
||||
target_link_libraries(LuaGate ${LUA_LIBRARIES})
|
||||
|
||||
Reference in New Issue
Block a user