Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
#
# See README.CMake

set(PACKAGE shp)
if (TARGET ${PACKAGE})
return ()
endif ()

# Version 3.11 or above of cmake is currently required for all platforms.
cmake_minimum_required(VERSION 3.11)
project(shapelib C CXX)
Expand Down Expand Up @@ -49,7 +54,6 @@ if(BUILD_SHARED_LIBS AND (WIN32 OR CYGWIN))
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dll)
endif()

set(PACKAGE shp)

# Set up install locations.
set(
Expand Down Expand Up @@ -202,8 +206,9 @@ endif()

find_program(BASH_EXECUTABLE bash)
if(BASH_EXECUTABLE)
set(BUILD_TESTING ON CACHE BOOL "Build the testing tree.")
option(BUILD_TESTING "Build tests" ON)
else()
set(BUILD_TESTING OFF CACHE BOOL "Disable tests")
message(STATUS "WARNING: bash not available so disabling testing")
endif()

Expand Down