forked from conda-forge/staged-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from msarahan/jakirkham-add_yaml
build static and dll on win. Cleanup.
- Loading branch information
Showing
4 changed files
with
15 additions
and
36 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 |
---|---|---|
@@ -1,25 +1,16 @@ | ||
diff --git CMakeLists.txt CMakeLists.txt | ||
index e84c28c..eab70b2 100644 | ||
index e84c28c..4561133 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) | ||
@@ -11,6 +11,7 @@ set (YAML_VERSION_STRING "${YAML_VERSION_MAJOR}.${YAML_VERSION_MINOR}.${YAML_VER | ||
file (GLOB SRC src/*.c) | ||
|
||
include_directories (include win32) | ||
add_definitions (-DHAVE_CONFIG_H -DYAML_DECLARE_STATIC) | ||
-add_definitions (-DHAVE_CONFIG_H -DYAML_DECLARE_STATIC) | ||
-add_library (yaml STATIC ${SRC}) | ||
- | ||
+add_library (yaml ${LIB_TYPE} ${SRC}) | ||
+add_library (yaml SHARED ${SRC}) | ||
+set_target_properties(yaml PROPERTIES COMPILE_FLAGS "-DYAML_DECLARE_EXPORT -DHAVE_CONFIG_H") | ||
+add_library (yaml_static STATIC ${SRC}) | ||
+set_target_properties(yaml_static PROPERTIES COMPILE_FLAGS "-DYAML_DECLARE_STATIC -DHAVE_CONFIG_H") | ||
\ No newline at end of file |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/bin/bash | ||
|
||
./configure \ | ||
--prefix="${PREFIX}" | ||
./configure --prefix="${PREFIX}" | ||
make | ||
make check | ||
make install |
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