CMakeLists.txt: Don't require a C++ compiler
By default, CMake assumes that the project is using both C and C++. By explicitly passing 'C' as argument of the project() macro, we tell CMake that only C is used, which prevents CMake from erroring out if a C++ compiler doesn't exist. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> [Retrieved (and slightly updated by adding enable_language(CXX) if WITH_ASTYLE is set) from: https://git.buildroot.net/buildroot/tree/package/openjpeg/0003-CMakeLists.txt-Don-t-require-a-C-compiler.patch] Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
parent
2519439d7d
commit
4d147d9630
|
@ -24,7 +24,7 @@ endif()
|
||||||
#string(TOLOWER ${OPENJPEG_NAMESPACE} OPENJPEG_LIBRARY_NAME)
|
#string(TOLOWER ${OPENJPEG_NAMESPACE} OPENJPEG_LIBRARY_NAME)
|
||||||
set(OPENJPEG_LIBRARY_NAME openjp2)
|
set(OPENJPEG_LIBRARY_NAME openjp2)
|
||||||
|
|
||||||
project(${OPENJPEG_NAMESPACE})
|
project(${OPENJPEG_NAMESPACE} C)
|
||||||
|
|
||||||
# Do full dependency headers.
|
# Do full dependency headers.
|
||||||
include_regular_expression("^.*$")
|
include_regular_expression("^.*$")
|
||||||
|
|
|
@ -120,5 +120,6 @@ endif(BUILD_THIRDPARTY)
|
||||||
|
|
||||||
#------------
|
#------------
|
||||||
IF (WITH_ASTYLE)
|
IF (WITH_ASTYLE)
|
||||||
|
enable_language(CXX)
|
||||||
ADD_SUBDIRECTORY(astyle)
|
ADD_SUBDIRECTORY(astyle)
|
||||||
ENDIF(WITH_ASTYLE)
|
ENDIF(WITH_ASTYLE)
|
||||||
|
|
Loading…
Reference in New Issue