cmark

My personal build of CMark ✏️

Commit
3cad10545eca566bcf6c2bc3b5dd8b577a70493d
Parent
828eeaf8960a347777f34ed134c5211717f1d446
Author
Saleem Abdulrasool <compnerd@compnerd.org>
Date

build: use `CMAKE_INCLUDE_CURRENT_DIRECTORY`

This uses the CMake mechanism for including the current source and binary directories. This avoids the custom handling for this.

Diffstat

2 files changed, 2 insertions, 2 deletions

Status File Name N° Changes Insertions Deletions
Modified CMakeLists.txt 2 2 0
Modified src/CMakeLists.txt 2 0 2
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -23,6 +23,8 @@ endif()
 set(CMAKE_C_VISIBILITY_PRESET hidden)
 set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
 
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
 # The Linux modules distributed with CMake add "-rdynamic" to the build flags
 # which is incompatible with static linking under certain configurations.
 # Unsetting CMAKE_SHARED_LIBRARY_LINK_C_FLAGS ensures this does not happen.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -46,8 +46,6 @@ set(LIBRARY_SOURCES
 set(PROGRAM "cmark")
 set(PROGRAM_SOURCES main.c)
 
-include_directories(. ${CMAKE_CURRENT_BINARY_DIR})
-
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmark_version.h.in
   ${CMAKE_CURRENT_BINARY_DIR}/cmark_version.h)