Skip to content

Commit

Permalink
Upgrade CMake to 3.21 to use PROJECT_IS_TOP_LEVEL (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
OneBlue authored Feb 12, 2022
1 parent b92f2b0 commit 41f095a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
cmake_minimum_required(VERSION 3.20)

# Detect if proxy-wifi is being used by another project
if(NOT DEFINED PARENT_DIRECTORY)
set(PROXY_WIFI_NOT_SUBPROJECT ON)
endif()

cmake_minimum_required(VERSION 3.21)

project(proxy-wifi LANGUAGES CXX)

Expand Down Expand Up @@ -81,11 +75,11 @@ endif()
add_subdirectory(lib)
add_subdirectory(util)

if (PROXY_WIFI_NOT_SUBPROJECT)
if (PROJECT_IS_TOP_LEVEL)
add_subdirectory(cmdline)

include(CTest)
if (BUILD_TESTING)
add_subdirectory(test)
endif()
endif()
endif()

0 comments on commit 41f095a

Please sign in to comment.