diff --git a/cmake/compilers/gnu.cmake b/cmake/compilers/gnu.cmake index f52c54f8..15ed08b6 100644 --- a/cmake/compilers/gnu.cmake +++ b/cmake/compilers/gnu.cmake @@ -25,7 +25,3 @@ add_compile_options(-fno-strict-aliasing) # This is necessary to hide all symbols unless explicitly exported # via the Q_EXPORT macro add_compile_options(-fvisibility=hidden) - -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX /opt/quake3) -endif() diff --git a/cmake/platforms/all.cmake b/cmake/platforms/all.cmake index 7d8ad9a9..f5cae409 100644 --- a/cmake/platforms/all.cmake +++ b/cmake/platforms/all.cmake @@ -1,4 +1,5 @@ include(platforms/emscripten) +include(platforms/linux) include(platforms/macos) include(platforms/unix) include(platforms/windows) diff --git a/cmake/platforms/linux.cmake b/cmake/platforms/linux.cmake new file mode 100644 index 00000000..d054d81a --- /dev/null +++ b/cmake/platforms/linux.cmake @@ -0,0 +1,9 @@ +# Linux-like specific settings, i.e. including FreeBSD etc. + +if(NOT UNIX OR APPLE) + return() +endif() + +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set_property(CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE /opt/quake3) +endif()