cmake: further cleanup

isolation_bkp/dynres
Dominik Madarász 2021-01-19 10:57:08 +01:00
parent 52d61551a9
commit 294d35c0c4
3 changed files with 10 additions and 7 deletions

View File

@ -3,14 +3,9 @@ project(eco2d)
include(cmake/utils.cmake)
set(CMAKE_C_STANDARD 11)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
setup_build_dirs()
include_directories(eco2d-cli code/vendors code/common)
include_directories(eco2d-client code/vendors code/common)
include_directories(eco2d-server code/vendors code/vendors/flecs code/common)
include_directories(code/common code/vendors code/vendors/flecs)
add_subdirectory(code/common)
add_subdirectory(code/vendors)

View File

@ -7,3 +7,10 @@ function(link_system_libs target_name)
target_link_libraries(${target_name} pthread m dl atomic)
endif()
endfunction()
function(setup_build_dirs)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR})
endfunction()

View File

@ -1,2 +1,3 @@
file(GLOB SRCS *.c *.h)
add_library(flecs-bundle STATIC ${SRCS})
include_directories(flecs-bundle .)