Skip to content

Commit 7b71cb9

Browse files
committed
Merge branch 'master' of https://git01.codeplex.com/forks/mattpeterson1/casablanca into staging
2 parents 5355e91 + 974ac7e commit 7b71cb9

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Release/CMakeLists.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,20 @@ if(IOS)
2323
set(CMAKE_CXX_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden")
2424

2525
set(BUILD_SHARED_LIBS OFF)
26+
set(BUILD_SAMPLES OFF)
27+
option(BUILD_TESTS "Build tests." ON)
2628
elseif(UNIX) # This includes OSX
2729
find_package(Boost REQUIRED COMPONENTS random chrono system thread locale regex filesystem)
2830
find_package(Threads REQUIRED)
2931
find_package(OpenSSL REQUIRED)
3032

3133
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
34+
option(BUILD_TESTS "Build tests." ON)
35+
option(BUILD_SAMPLES "Build samples." ON)
3236
elseif(WIN32)
3337
option(BUILD_SHARED_LIBS "Build shared Libraries." ON)
38+
option(BUILD_TESTS "Build tests." ON)
39+
option(BUILD_SAMPLES "Build samples." ON)
3440

3541
add_definitions(-DUNICODE)
3642

@@ -109,9 +115,12 @@ function(add_casablanca_test NAME SOURCES_VAR)
109115
endfunction()
110116

111117
add_subdirectory(src)
112-
add_subdirectory(tests)
113118

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)
116124
add_subdirectory(samples)
117125
endif()
126+

0 commit comments

Comments
 (0)