fix demo CMakeLists.txt, can cmake .. -DTARS_WEB_HOST=...

This commit is contained in:
ruanshudong 2020-03-13 09:44:57 +08:00
parent ca1b68b61c
commit 9f124879e7
2 changed files with 10 additions and 2 deletions

View File

@ -12,7 +12,11 @@ else()
include (/usr/local/tars/cpp/makefile/tars-tools.cmake)
endif()
set(TARS_WEB_HOST "http://tars.test.com")
####you can: cd build; cmake .. -DTARS_WEB_HOST={your web host}
set(TARS_WEB_HOST "" CACHE STRING "set web host")
IF (TARS_WEB_HOST STREQUAL "")
set(TARS_WEB_HOST "http://tars.test.com")
ENDIF ()
include_directories(/usr/local/tars/cpp/thirdparty/include)
link_directories(/usr/local/tars/cpp/thirdparty/lib)

View File

@ -12,7 +12,11 @@ else()
include (/usr/local/tars/cpp/makefile/tars-tools.cmake)
endif()
set(TARS_WEB_HOST "http://tars.test.com")
####you can: cd build; cmake .. -DTARS_WEB_HOST={your web host}
set(TARS_WEB_HOST "" CACHE STRING "set web host")
IF (TARS_WEB_HOST STREQUAL "")
set(TARS_WEB_HOST "http://tars.test.com")
ENDIF ()
include_directories(/usr/local/tars/cpp/thirdparty/include)
link_directories(/usr/local/tars/cpp/thirdparty/lib)