-
Notifications
You must be signed in to change notification settings - Fork 4
/
udunits.cmake
26 lines (22 loc) · 1.06 KB
/
udunits.cmake
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
set(CTEST_PROJECT_NAME "udunits")
set(CTEST_BUILD_NAME "$ENV{SGEN}-udunits")
set(CTEST_SITE "$ENV{COMPUTERNAME}")
set(VER "$ENV{udunits_VER}")
set(CTEST_SOURCE_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}/lib/src/udunits-${VER}")
set(CTEST_BINARY_DIRECTORY "${CTEST_SCRIPT_DIRECTORY}/lib/build/udunits-${VER}")
set(EXPAT_INC ${CTEST_SCRIPT_DIRECTORY}/lib/install/expat-$ENV{EXPAT_VER}/${CONF_DIR}/include)
if("${CONF_DIR}" STREQUAL "debug")
set(EXPAT_LIB "${CTEST_SCRIPT_DIRECTORY}/lib/install/expat-$ENV{EXPAT_VER}/${CONF_DIR}/lib/expatd.lib")
else()
set(EXPAT_LIB "${CTEST_SCRIPT_DIRECTORY}/lib/install/expat-$ENV{EXPAT_VER}/${CONF_DIR}/lib/expat.lib")
endif()
set(BUILD_OPTIONS
-DCMAKE_INSTALL_PREFIX:PATH=${CTEST_SCRIPT_DIRECTORY}/lib/install/udunits-${VER}/${CONF_DIR}
-DEXPAT_INCLUDE_DIR:PATH=${EXPAT_INC}
-DEXPAT_LIBRARY:FILEPATH=${EXPAT_LIB}
)
CTEST_START("Experimental")
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}"
OPTIONS "${BUILD_OPTIONS}")
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" TARGET install)