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

build shared library, allow system install #185

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ enable_testing()

option(RC_ENABLE_TESTS "Build RapidCheck tests" OFF)
option(RC_ENABLE_EXAMPLES "Build RapidCheck examples" OFF)
option(RC_SHARED_LIBRARY "Build RapidCheck as a shared library" OFF)

if(MSVC)
# /bigobj - some object files become very large so we need this
Expand All @@ -23,7 +24,13 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wno-missing-braces -std=c++11")
endif()

add_library(rapidcheck
if(RC_SHARED_LIBRARY)
set(LIBRARY_TYPE "SHARED")
else()
set(LIBRARY_TYPE "STATIC")
endif()

add_library(rapidcheck ${LIBRARY_TYPE}
src/BeforeMinimalTestCase.cpp
src/Check.cpp
src/Classify.cpp
Expand Down Expand Up @@ -82,3 +89,5 @@ if (RC_ENABLE_EXAMPLES)
endif()

add_subdirectory(extras)

install(TARGETS rapidcheck DESTINATION /usr/lib)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing newline