mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-08 16:50:48 +00:00
OrangeC: Add support for compiling Windows Resources
OrangeC 7.0 and above come with a resource compiler, ORC.
This commit is contained in:
committed by
Brad King
parent
552e1688f3
commit
402d72b6c0
@@ -39,7 +39,9 @@ set(CMAKE_RC_FLAG_REGEX "^[-/](D|I)")
|
||||
|
||||
# now define the following rule variables
|
||||
# CMAKE_RC_COMPILE_OBJECT
|
||||
set(CMAKE_INCLUDE_FLAG_RC "-I ")
|
||||
if(NOT CMAKE_INCLUDE_FLAG_RC)
|
||||
set(CMAKE_INCLUDE_FLAG_RC "-I ")
|
||||
endif()
|
||||
# compile a Resource file into an object file
|
||||
if(NOT CMAKE_RC_COMPILE_OBJECT)
|
||||
set(CMAKE_RC_COMPILE_OBJECT
|
||||
|
||||
@@ -7,4 +7,11 @@ set(CMAKE_FIND_LIBRARY_SUFFIXES ".l")
|
||||
macro(__windows_compiler_orangec lang)
|
||||
set(CMAKE_${lang}_CREATE_WIN32_EXE "-Wg")
|
||||
set(CMAKE_${lang}_CREATE_CONSOLE_EXE "-Wc")
|
||||
|
||||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
|
||||
if(NOT CMAKE_RC_COMPILER_INIT)
|
||||
set(CMAKE_RC_COMPILER_INIT orc)
|
||||
endif()
|
||||
enable_language(RC)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
2
Modules/Platform/Windows-orc.cmake
Normal file
2
Modules/Platform/Windows-orc.cmake
Normal file
@@ -0,0 +1,2 @@
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -! <DEFINES> <INCLUDES> <FLAGS> -o<OBJECT> <SOURCE>")
|
||||
set(CMAKE_INCLUDE_FLAG_RC "-i ")
|
||||
@@ -131,7 +131,9 @@ if(BUILD_TESTING)
|
||||
set(CMake_TEST_RESOURCES TRUE)
|
||||
endif()
|
||||
# For some Windows toolchains there is no resource support.
|
||||
if(WATCOM OR BORLAND OR CMAKE_C_COMPILER_ID STREQUAL "OrangeC")
|
||||
if(WATCOM OR BORLAND
|
||||
OR (CMAKE_C_COMPILER_ID STREQUAL "OrangeC" AND
|
||||
CMAKE_C_COMPILER_VERSION VERSION_LESS "7.0"))
|
||||
set(CMake_TEST_RESOURCES FALSE)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user