cmark

My personal build of CMark ✏️

Commit
b7188e8c1bfe0e148c3d3e6d08a9004cdfb2264d
Parent
78168bfef1fa508b5c37220d068d8835184a0404
Author
Saleem Abdulrasool <compnerd@compnerd.org>
Date

build: only include GNUInstallDirs once

Avoid including the utility once, which should avoid some unnecessary CMake checks, and reduces duplication.

Diffstat

3 files changed, 1 insertion, 5 deletions

Status File Name N° Changes Insertions Deletions
Modified CMakeLists.txt 1 1 0
Modified man/CMakeLists.txt 3 0 3
Modified src/CMakeLists.txt 2 0 2
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.0)
 project(cmark VERSION 0.29.0)
 
 include("FindAsan.cmake")
+include(GNUInstallDirs)
 
 if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
     message(FATAL_ERROR "Do not build in-source.\nPlease remove CMakeCache.txt and the CMakeFiles/ directory.\nThen: mkdir build ; cd build ; cmake .. ; make")
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
@@ -1,7 +1,4 @@
 if (NOT MSVC)
-
-include(GNUInstallDirs)
-
   install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1
     DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -2,8 +2,6 @@ if(${CMAKE_VERSION} VERSION_GREATER "3.3")
     cmake_policy(SET CMP0063 NEW)
 endif()
 
-include(GNUInstallDirs)
-
 set(LIBRARY "libcmark")
 set(STATICLIBRARY "libcmark_static")
 set(HEADERS