diff options
Diffstat (limited to 'EASTL/CMakeLists.txt')
-rw-r--r-- | EASTL/CMakeLists.txt | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/EASTL/CMakeLists.txt b/EASTL/CMakeLists.txt new file mode 100644 index 0000000..e8700dc --- /dev/null +++ b/EASTL/CMakeLists.txt @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------------------------- +# Copyright (C) Electronic Arts Inc. All rights reserved. +#------------------------------------------------------------------------------------------- +cmake_minimum_required(VERSION 3.1) +project(EASTL CXX) + +#------------------------------------------------------------------------------------------- +# Options +#------------------------------------------------------------------------------------------- +option(EASTL_BUILD_BENCHMARK "Enable generation of build files for benchmark" OFF) +option(EASTL_BUILD_TESTS "Enable generation of build files for tests" OFF) + +#------------------------------------------------------------------------------------------- +# Compiler Flags +#------------------------------------------------------------------------------------------- +set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/scripts/CMake") +include(CommonCppFlags) + +#------------------------------------------------------------------------------------------- +# Library definition +#------------------------------------------------------------------------------------------- +file(GLOB EASTL_SOURCES "source/*.cpp") +add_library(EASTL ${EASTL_SOURCES}) + +if(EASTL_BUILD_BENCHMARK) + add_subdirectory(benchmark) +endif() + +if(EASTL_BUILD_TESTS) + add_subdirectory(test) +endif() + +#------------------------------------------------------------------------------------------- +# Defines +#------------------------------------------------------------------------------------------- +add_definitions(-D_CHAR16T) +add_definitions(-D_CRT_SECURE_NO_WARNINGS) +add_definitions(-D_SCL_SECURE_NO_WARNINGS) +add_definitions(-DEASTL_OPENSOURCE=1) + +#------------------------------------------------------------------------------------------- +# Include dirs +#------------------------------------------------------------------------------------------- +target_include_directories(EASTL PUBLIC include) + +#------------------------------------------------------------------------------------------- +# Dependencies +#------------------------------------------------------------------------------------------- +if (NOT TARGET EABase) + add_subdirectory(test/packages/EABase) +endif() + +target_link_libraries(EASTL EABase) + |