Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved issue #118 "Missing VERSION_INFO when compiling as Windows DLL" #120

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Next Next commit
Change: CMake, allow the developer to select if Dynamic or Static lib…
…raries are built
Andreas Schniertshauer committed Sep 11, 2017
commit 4ba3c617c59157cf8abe6578c0fb7530cef3bcd8
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -21,7 +21,18 @@ if (NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -std=c99 -pedantic -Wall")
endif ()

# https://cmake.org/Wiki/BuildingWinDLL
# Allow the developer to select if Dynamic or Static libraries are built, default is static.
OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
# Set the LIB_TYPE variable to STATIC
SET (LIB_TYPE STATIC)
IF (BUILD_SHARED_LIBS)
# User wants to build Dynamic Libraries, so change the LIB_TYPE variable to CMake keyword 'SHARED'
SET (LIB_TYPE SHARED)
ENDIF (BUILD_SHARED_LIBS)

add_library (utf8proc
${LIB_TYPE}
utf8proc.c
utf8proc.h
)