THRIFT-3424 Add CMake android build option
Client: Build
Patch: Nobuaki Sukegawa
This closes #696
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3005f5..37e8976 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,7 +67,11 @@
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 @@
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)