-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml: Attempt to build the DLL and LIB libraries on Windows.
- Loading branch information
Showing
3 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git CMakeLists.txt CMakeLists.txt | ||
index e84c28c..eab70b2 100644 | ||
--- CMakeLists.txt | ||
+++ CMakeLists.txt | ||
@@ -3,6 +3,13 @@ | ||
cmake_minimum_required (VERSION 2.8) | ||
project (yaml C) | ||
|
||
+# Allow the developer to select if Dynamic or Static libraries are built | ||
+OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" OFF) | ||
+SET (LIB_TYPE STATIC) | ||
+IF (BUILD_SHARED_LIBS) | ||
+ SET (LIB_TYPE SHARED) | ||
+ENDIF (BUILD_SHARED_LIBS) | ||
+ | ||
set (YAML_VERSION_MAJOR 0) | ||
set (YAML_VERSION_MINOR 1) | ||
set (YAML_VERSION_PATCH 6) | ||
@@ -12,5 +19,4 @@ file (GLOB SRC src/*.c) | ||
|
||
include_directories (include win32) | ||
add_definitions (-DHAVE_CONFIG_H -DYAML_DECLARE_STATIC) | ||
-add_library (yaml STATIC ${SRC}) | ||
- | ||
+add_library (yaml ${LIB_TYPE} ${SRC}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters