STYLE: Nightly Version update
[cmake.git] / Tests / VSExternalInclude / CMakeLists.txt
blob841df4f9e2d4ce2f77968178a506b29cb12ca4a0
1 PROJECT(VSExternalInclude)
3 IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
4   SET(PROJECT_EXT dsp)
5 ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
6   SET(PROJECT_EXT vcproj)
7 ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
10 # make sure directories exists
11 SET(LIB1_BINARY_DIR ${VSExternalInclude_BINARY_DIR}/Lib1)
12 MAKE_DIRECTORY("${LIB1_BINARY_DIR}")
14 SET(LIB2_BINARY_DIR ${VSExternalInclude_BINARY_DIR}/Lib2)
15 MAKE_DIRECTORY("${LIB2_BINARY_DIR}")
17 # generate lib1
18 EXEC_PROGRAM("${CMAKE_COMMAND}" "${LIB1_BINARY_DIR}"  ARGS -G\"${CMAKE_GENERATOR}\" 
19   \"${VSExternalInclude_SOURCE_DIR}/Lib1\" OUTPUT_VARIABLE OUT)
20 MESSAGE("CMAKE Ran with the following output:\n\"${OUT}\"")
22 # generate lib2
23 EXEC_PROGRAM("${CMAKE_COMMAND}" "${LIB2_BINARY_DIR}"  ARGS -G\"${CMAKE_GENERATOR}\" 
24   \"${VSExternalInclude_SOURCE_DIR}/Lib2\" OUTPUT_VARIABLE OUT)
25 MESSAGE("CMAKE Ran with the following output:\n\"${OUT}\"")
28 INCLUDE_EXTERNAL_MSPROJECT(lib1 ${VSExternalInclude_BINARY_DIR}/Lib1/LIB1.${PROJECT_EXT})
29 # lib2 depends on lib1
30 INCLUDE_EXTERNAL_MSPROJECT(lib2 ${VSExternalInclude_BINARY_DIR}/Lib2/LIB2.${PROJECT_EXT} lib1)
32 INCLUDE_DIRECTORIES(${VSExternalInclude_SOURCE_DIR}/Lib2 ${VSExternalInclude_SOURCE_DIR}/Lib1)
34 SET(SOURCES main.cpp)
36 ADD_EXECUTABLE(VSExternalInclude ${SOURCES})
38 # target depends on lib2
39 ADD_DEPENDENCIES(VSExternalInclude lib2)