diff --git a/CMakeLists.txt b/CMakeLists.txt index 2684d7effc..4282183902 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,12 +87,11 @@ set(CMAKE_POSITION_INDEPENDENT_CODE OFF) # set module path set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) -# include some generic functions +# include some generic functions to ensure correctness of the env include(Pcsx2Utils) -# Detect current OS +check_no_parenthesis_in_path() detectOperatingSystem() - check_compiler_version("4.7" "4.5") #------------------------------------------------------------------------------- diff --git a/cmake/Pcsx2Utils.cmake b/cmake/Pcsx2Utils.cmake index cb0306c5b3..06013a346b 100644 --- a/cmake/Pcsx2Utils.cmake +++ b/cmake/Pcsx2Utils.cmake @@ -67,3 +67,9 @@ function(check_compiler_version version_warn version_err) endif() endif() endfunction() + +function(check_no_parenthesis_in_path) + if ("${CMAKE_BINARY_DIR}" MATCHES "[()]" OR "${CMAKE_SOURCE_DIR}" MATCHES "[()]") + message(FATAL_ERROR "Your path contains some parenthesis. Unfortunately Cmake doesn't support them correctly.\nPlease rename your directory to avoid '(' and ')' characters\n") + endif() +endfunction()