summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNobuaki Sukegawa <nsuke@apache.org>2015-11-14 00:23:40 +0900
committerNobuaki Sukegawa <nsuke@apache.org>2015-11-23 16:59:10 +0900
commitca93936e781508e9f9c8e58c26a08809b037cc29 (patch)
treef032a0ea3ccee31eda1f1ab034dc531978098307 /CMakeLists.txt
parent314fea26fe4d85d17d785d97f1e814fb448b82b9 (diff)
downloadthrift-ca93936e781508e9f9c8e58c26a08809b037cc29.tar.gz
THRIFT-3424 Add CMake android build option
Client: Build Patch: Nobuaki Sukegawa This closes #696
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3005f56e..37e89766f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,7 +67,11 @@ if(BUILD_TESTING)
else ()
message(STATUS "Building without tests")
endif ()
+
if(BUILD_COMPILER)
+ if(NOT EXISTS ${THRIFT_COMPILER})
+ set(THRIFT_COMPILER $<TARGET_FILE:thrift-compiler>)
+ endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/compiler/cpp)
endif()
@@ -75,7 +79,7 @@ if(BUILD_CPP)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/lib/cpp)
if(BUILD_TUTORIALS)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tutorial/cpp)
- endif(BUILD_TUTORIALS)
+ endif()
if(BUILD_TESTING)
if(WITH_LIBEVENT AND WITH_ZLIB AND WITH_OPENSSL)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/cpp)