2017-03-25 23:05:44 +08:00
|
|
|
cmake_minimum_required(VERSION 2.8.0)
|
2017-01-18 08:51:28 +08:00
|
|
|
project(acl)
|
2017-03-25 23:05:44 +08:00
|
|
|
#message(${CMAKE_SYSTEM_NAME})
|
2017-02-12 21:39:38 +08:00
|
|
|
|
2017-01-23 16:59:58 +08:00
|
|
|
#set(CMAKE_BUILD_TYPE Release)
|
2017-02-12 21:39:38 +08:00
|
|
|
#set(CMAKE_BUILD_TYPE Release CACHE STRING "set build type to release")
|
|
|
|
|
|
|
|
if (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
|
|
|
|
message(FATAL_ERROR "Please into another dir to build!")
|
|
|
|
endif()
|
|
|
|
|
2017-03-25 23:05:44 +08:00
|
|
|
#The below line was built error on Android Studio
|
|
|
|
#string(TOUPPER ${CMAKE_SYSTEM_NAME} OS_NAME)
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
|
|
|
set(CMAKE_MACOSX_RPATH build)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_subdirectory(lib_acl acl)
|
|
|
|
add_subdirectory(lib_protocol protocol)
|
|
|
|
add_subdirectory(lib_acl_cpp acl_cpp)
|
2017-02-12 21:39:38 +08:00
|
|
|
|
|
|
|
#if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android")
|
|
|
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
2017-03-25 23:05:44 +08:00
|
|
|
add_subdirectory(lib_fiber/c fiber)
|
|
|
|
add_subdirectory(lib_fiber/cpp fiber_cpp)
|
2017-01-18 08:51:28 +08:00
|
|
|
endif()
|