blob: df3149a65060e94151efcb7d6407cf115f6b7328 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
cmake_minimum_required(VERSION 2.8)
project(mfc_driver)
include(CTest)
include(ExternalProject)
set(CMAKE_MFC_FLAG_VALUE "2")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.in
${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.SharedMfcDll.txt
@ONLY
)
ExternalProject_Add(mfcShared
URL ${CMAKE_CURRENT_SOURCE_DIR}/mfc1
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.SharedMfcDll.txt
<SOURCE_DIR>/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
)
set(CMAKE_MFC_FLAG_VALUE "1")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.in
${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.StaticMfcLib.txt
@ONLY
)
ExternalProject_Add(mfcStatic
URL ${CMAKE_CURRENT_SOURCE_DIR}/mfc1
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.StaticMfcLib.txt
<SOURCE_DIR>/CMakeLists.txt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
)
set(binary_dir "${CMAKE_CURRENT_BINARY_DIR}")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/ValidateBuild.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/ValidateBuild.cmake
@ONLY
)
add_test(
NAME validate
COMMAND ${CMAKE_COMMAND}
-P "${CMAKE_CURRENT_BINARY_DIR}/ValidateBuild.cmake"
)
add_test(
NAME environment
COMMAND ${CMAKE_COMMAND} -E environment
)
message(STATUS "===== environment =====")
execute_process(COMMAND ${CMAKE_COMMAND} -E environment)
message(STATUS "===== /environment =====")
|