cmark

My personal build of CMark ✏️

Commit
03b5d601058c8d1a2121ff1f6e874a84a4a96a51
Parent
f988ab6d41855de43c157633852f0fe3c0770c6d
Author
John MacFarlane <jgm@berkeley.edu>
Date

Merge pull request #137 from foonathan/master

CMake fixes

Diffstat

2 files changed, 11 insertions, 0 deletions

Status File Name N° Changes Insertions Deletions
Modified CMakeLists.txt 8 8 0
Modified src/CMakeLists.txt 3 3 0
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -1,5 +1,13 @@
 cmake_minimum_required(VERSION 2.8.9)
+
+# prevent ugly developer warnings because version is set directly, not through project()
+# it should be redone properly by using VERSION in project() if on CMake 3.x
+if(CMAKE_MAJOR_VERSION GREATER 2)
+    cmake_policy(SET CMP0048 OLD)
+endif()
+
 project(cmark)
+
 include("FindAsan.cmake")
 
 if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -126,6 +126,7 @@ endif(MSVC)
 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
 include (InstallRequiredSystemLibraries)
 install(TARGETS ${PROGRAM} ${LIBRARY} ${STATICLIBRARY}
+  EXPORT cmark
   RUNTIME DESTINATION bin
   LIBRARY DESTINATION ${LIB_INSTALL_DIR}
   ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
@@ -138,6 +139,8 @@ install(FILES
   DESTINATION include
   )
 
+install(EXPORT cmark DESTINATION ${LIB_INSTALL_DIR}/cmake)
+
 # Feature tests
 include(CheckIncludeFile)
 include(CheckCSourceCompiles)