diff options
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r-- | Source/CMakeLists.txt | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 9160932..423be68 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 1.3) +CMAKE_MINIMUM_REQUIRED(VERSION 1.5) SET(SRCS cmake.cxx @@ -102,7 +102,8 @@ LINK_DIRECTORIES(${CMake_BINARY_DIR}/Source) ADD_EXECUTABLE(cmake cmakemain.cxx) ADD_EXECUTABLE(DumpDocumentation cmDumpDocumentation) -ADD_EXECUTABLE(ctest ctest.cxx cmCTest.cxx) + +SET(CMTEST_SRCS ctest.cxx cmCTest.cxx) IF (UNIX) TARGET_LINK_LIBRARIES(CMakeLib ${CMAKE_DL_LIBS}) @@ -110,7 +111,24 @@ ENDIF (UNIX) TARGET_LINK_LIBRARIES(cmake CMakeLib) TARGET_LINK_LIBRARIES(DumpDocumentation CMakeLib) -TARGET_LINK_LIBRARIES(ctest CMakeLib) + +OPTION(CMAKE_WITH_CURL "Build CMake with Curl support" OFF) +MARK_AS_ADVANCED(CMAKE_WITH_CURL) +IF(CMAKE_WITH_CURL) + SUBDIRS(CTest) + SET(CMTEST_SRCS ${CMTEST_SRCS} CTest/cmCTestSubmit.cxx) + ADD_DEFINITIONS(-DHAVE_CURL) + INCLUDE_DIRECTORIES( + ${CMAKE_SOURCE_DIR}/Source/CTest/Curl + ${CMAKE_SOURCE_DIR}/Source/CTest + ) +ENDIF(CMAKE_WITH_CURL) + +ADD_EXECUTABLE(cmtest ${CMTEST_SRCS}) +TARGET_LINK_LIBRARIES(cmtest CMakeLib) +IF(CMAKE_WITH_CURL) + TARGET_LINK_LIBRARIES(cmtest Curl) +ENDIF(CMAKE_WITH_CURL) IF (UNIX) INCLUDE (${CMake_SOURCE_DIR}/Modules/FindCurses.cmake OPTIONAL) |