字符串比较

1
2
3
4
5
if(${name} STREQUAL ".")
include_directories(${PROJECT_SOURCE_DIR}/include)
link_directories(${PROJECT_SOURCE_DIR}/lib)
return()
endif()

参考

  1. http://www.cmake.org/cmake/help/v3.0/command/if.html

留言

2015-01-20