Skip to content

Commit 578f211

Browse files
committed
Update of build process on Windows systems
1 parent 0ab1cb7 commit 578f211

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

build-win32.cmake

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11

2-
# CMake script for building R OpenFLUID package (win32 binary)
3-
# usage : cmake -P build-win32.cmake
2+
# CMake script for building R OpenFLUID package (win32 binary)
3+
# usage : cmake -P build-win32.cmake
44

55
# This script must be launched from MSYS console
66

7-
# Notice that environment variables must be correctly set
8-
# in order to find the OpenFLUID framework, the R environnement
7+
# Notice that environment variables must be correctly set
8+
# in order to find the OpenFLUID framework, the R environnement
99
# and GCC tools (C++11)
1010
# See file win32-env.sh.tpl for more information
11-
11+
1212

1313
INCLUDE("config.in.cmake")
1414

1515
INCLUDE("cmake/display-infos.cmake")
1616
INCLUDE("cmake/preprocess.cmake")
1717

1818

19-
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}"
19+
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}"
2020
"-E" "chdir" "${BUILDDIR}"
2121
"R" "CMD" "build" "ROpenFLUID")
22-
23-
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}"
22+
23+
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}"
2424
"-E" "chdir" "${BUILDDIR}"
25-
"R" "CMD" "INSTALL" "--build" "ROpenFLUID")
25+
"R" "CMD" "INSTALL" "--build" "--no-test-load"
26+
"--library=${BUILDLIBRDIR}" "ROpenFLUID")

cmake/preprocess.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
FILE(MAKE_DIRECTORY ${BUILDDIR})
44
FILE(REMOVE_RECURSE ${PACKAGEBUILDDIR})
55
FILE(MAKE_DIRECTORY ${PACKAGEBUILDDIR})
6+
FILE(MAKE_DIRECTORY ${BUILDLIBRDIR})
67

7-
FILE(COPY "${PACKAGESRCDIR}/"
8+
FILE(COPY "${PACKAGESRCDIR}/"
89
DESTINATION "${PACKAGEBUILDDIR}"
910
PATTERN ".*" EXCLUDE
1011
PATTERN "_*" EXCLUDE
@@ -21,8 +22,8 @@ CONFIGURE_FILE(${RESOURCESDIR}/tests/PrimitivesExampleSelectedOutputs.R.in ${PAC
2122

2223

2324

24-
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}"
25+
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}"
2526
"-E" "chdir" "${PACKAGEBUILDDIR}"
2627
"R" "CMD" "BATCH" "--vanilla" "${RESOURCESDIR}/roxygen2.R")
2728

28-
FILE(REMOVE "${PACKAGEBUILDDIR}/roxygen2.Rout")
29+
FILE(REMOVE "${PACKAGEBUILDDIR}/roxygen2.Rout")

config.in.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ IF(WIN32)
77
SET(BUILDDIR "${BUILDDIR}-win32")
88
ENDIF()
99
SET(PACKAGEBUILDDIR "${BUILDDIR}/ROpenFLUID")
10-
SET(REQUIRED_OPENFLUID_VERSION "2.1.6")
10+
SET(BUILDLIBRDIR "${BUILDDIR}/_Rlibrary")
1111

1212
# Title and description
1313
SET(OpenFLUID_R_TITLE "R Interface to OpenFLUID Platform Framework for Modelling and Simulation of Landscapes")
1414
SET(OpenFLUID_R_DESC "Provides a collection of functions to load, parameterize, run and analyze OpenFLUID simulations within the GNU R environment.")
1515

16-
# Version
16+
# ROpenFLUID Version
1717
SET(OpenFLUID_R_VERSION_PATCH "20180726")
1818

19+
# Required OpenFLUID version
20+
SET(REQUIRED_OPENFLUID_VERSION "2.1.6")
21+
1922

2023
# ===========================================================================================
2124

0 commit comments

Comments
 (0)