DiscussionsIssue archiveOCCT:Configuration

Archived issue #0030091

Configuration - allow cross-compilation from Linux (case sensitive filesystem) to x86_64-w64-mingw32

CommunityOCCT:Configurationclosed4 public notes

Search issues

Description

I needed to adapt uppercases and lowercases because I'm compiling on a case sensitive file system.

Steps to reproduce

cmake /path/to/opencascade-7.3.0 \
 -DCMAKE_TOOLCHAIN_FILE=./toolchain-mingw \
 -DINSTALL_DIR:PATH="/path/to/opencascade-7.3.0-mingw-install" \
 -DINSTALL_DIR_BIN:PATH="bin" \
 -DBUILD_MODULE_ApplicationFramework:BOOL="0" \
 -DBUILD_MODULE_Draw:BOOL="0" \
 -DBUILD_MODULE_Visualization:BOOL="0"

Additional information

$ cat toolchain-mingw
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
SET(COMPILER_PREFIX "x86_64-w64-mingw32")

# which compilers to use for C and C++
find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc)
find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++)
find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)

# here is the target environment located
SET(USER_ROOT_PATH [user path removed]/projets/mingw)
SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX} ${USER_ROOT_PATH})

# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

Public activity

4 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: abv
Date: Thu Sep 6 18:59:19 2018 +0300

    0030091: Patch needed to allow cross-compilation from linux (case sensitive filesystem) to x86_64-w64-mingw32
    
    Names of Windows header files are corrected to be lower case to match their actual names on Windows (except Windows.h) and MinGW.
    Files COMMANDWINDOW.h and MAINWINDOW.h in Draw package are renamed to CamelCase according to names of corresponding CXX files.
02Commenter 2
Fix pushed to branch CR30091, please review. Compilation is checked, see Jenkins job CR30091-master-abv
03Commenter 3
Reviewed. Please proceed.
04Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records