TarsCloud_TarsCpp/tools/CMakeLists.txt

46 lines
1.1 KiB
CMake
Raw Normal View History

2018-09-05 11:26:21 +08:00
cmake_minimum_required(VERSION 2.8)
project(tools)
include_directories(${util_SOURCE_DIR}/include)
link_libraries(tarsutil)
function(tars2language TARGET)
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/bin)
2020-04-02 18:57:36 +08:00
endforeach()
2018-09-05 11:26:21 +08:00
include_directories(${PROJECT_SOURCE_DIR}/tarsparse)
aux_source_directory(. DIR_SRCS)
link_libraries(tarsparse)
add_executable(${TARGET} ${DIR_SRCS})
install(TARGETS ${TARGET}
RUNTIME DESTINATION tools)
endfunction()
IF(UNIX)
2018-09-05 11:26:21 +08:00
add_subdirectory(tarsgrammar)
2020-02-07 13:50:04 +08:00
ENDIF(UNIX)
2018-09-05 11:26:21 +08:00
add_subdirectory(tarsparse)
add_subdirectory(tars2cpp)
add_subdirectory(tars2python)
add_subdirectory(tars2cs)
add_subdirectory(tars2c)
add_subdirectory(tars2oc)
add_subdirectory(tars2php)
add_subdirectory(tars2android)
add_subdirectory(tars2node)
2020-04-02 18:57:36 +08:00
add_subdirectory(tars2case)
2018-09-05 11:26:21 +08:00
2020-02-11 21:37:07 +08:00
IF(TARS_PROTOBUF)
2018-09-05 11:26:21 +08:00
add_subdirectory(pb2tarscpp)
ENDIF()