mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
33 lines
1.1 KiB
CMake
33 lines
1.1 KiB
CMake
cmake_minimum_required (VERSION 3.0)
|
|
project (ACE)
|
|
|
|
if (NOT CMAKE_BUILD_TYPE AND CMAKE_COMPILER_IS_GNUCXX)
|
|
message(STATUS "No build type selected, default to Debug")
|
|
set(CMAKE_BUILD_TYPE "Debug")
|
|
endif()
|
|
|
|
option(USE_64BIT_BUILD "USE_64BIT_BUILD" OFF)
|
|
option(USE_STATIC_LINKING "USE_STATIC_LINKING" ON)
|
|
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
SET(CMAKE_CXX_FLAGS "-std=c++11 -march=i686 -m32 -O2 -s -fPIC -fpermissive")
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
|
set(CMAKE_SHARED_LINKER_FLAGS "-static-libgcc -static-libstdc++")
|
|
else()
|
|
set(CMAKE_CXX_FLAGS_DEBUG "/D _DEBUG /MTd /Zi /Ob0 /Od /RTC1")
|
|
set(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG")
|
|
set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
|
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG")
|
|
endif()
|
|
|
|
file(GLOB ACE_COMMON_SOURCES common/*.h common/*.hpp common/*.c common/*.cpp)
|
|
add_library(ace_common STATIC ${ACE_COMMON_SOURCES})
|
|
include_directories(AFTER "common")
|
|
|
|
# Add extensions to build here
|
|
add_subdirectory(fcs)
|
|
add_subdirectory(breakLine)
|
|
add_subdirectory(advanced_ballistics)
|
|
|
|
message("Build Type: ${CMAKE_BUILD_TYPE}") |