From af6c345210a0ca81b215c8e66ddb4c0b36eef9ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 4 Feb 2018 19:17:34 +0000 Subject: [PATCH] Use CMAKE_SYSTEM_NAME to check whether we are running on Linux. --- CMakeLists.txt | 2 +- src/plugins/CMakeLists.txt | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e78da86..f6b5a63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,7 @@ add_definitions( ) kde_enable_exceptions() -if(LINUX) +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") find_package(PkgConfig REQUIRED) pkg_check_modules(BLKID REQUIRED blkid>=2.30) endif() diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 1311ebb..fb5186f 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -23,11 +23,13 @@ install(FILES pmcorebackendplugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR # add_subdirectory(libparted) #endif (PARTMAN_LIBPARTEDBACKEND) -option(PARTMAN_SFDISKBACKEND "Build the sfdisk backend plugin." ON) +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + option(PARTMAN_SFDISKBACKEND "Build the sfdisk backend plugin." ON) -if (PARTMAN_SFDISKBACKEND) - add_subdirectory(sfdisk) -endif (PARTMAN_SFDISKBACKEND) + if (PARTMAN_SFDISKBACKEND) + add_subdirectory(sfdisk) + endif (PARTMAN_SFDISKBACKEND) +endif() option(PARTMAN_DUMMYBACKEND "Build the dummy backend plugin." ON)