File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,20 @@ if(IOS)
23
23
set (CMAKE_CXX_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden" )
24
24
25
25
set (BUILD_SHARED_LIBS OFF )
26
+ set (BUILD_SAMPLES OFF )
27
+ option (BUILD_TESTS "Build tests." ON )
26
28
elseif (UNIX ) # This includes OSX
27
29
find_package (Boost REQUIRED COMPONENTS random chrono system thread locale regex filesystem )
28
30
find_package (Threads REQUIRED )
29
31
find_package (OpenSSL REQUIRED )
30
32
31
33
option (BUILD_SHARED_LIBS "Build shared Libraries." ON )
34
+ option (BUILD_TESTS "Build tests." ON )
35
+ option (BUILD_SAMPLES "Build samples." ON )
32
36
elseif (WIN32 )
33
37
option (BUILD_SHARED_LIBS "Build shared Libraries." ON )
38
+ option (BUILD_TESTS "Build tests." ON )
39
+ option (BUILD_SAMPLES "Build samples." ON )
34
40
35
41
add_definitions (-DUNICODE )
36
42
@@ -109,9 +115,12 @@ function(add_casablanca_test NAME SOURCES_VAR)
109
115
endfunction ()
110
116
111
117
add_subdirectory (src )
112
- add_subdirectory (tests )
113
118
114
- # If we aren't on iOS, we can build samples.
115
- if (NOT IOS )
119
+ if (BUILD_TESTS )
120
+ add_subdirectory (tests )
121
+ endif ()
122
+
123
+ if (BUILD_SAMPLES )
116
124
add_subdirectory (samples )
117
125
endif ()
126
+
You can’t perform that action at this time.
0 commit comments