Commit b03f2834 authored by amitjans's avatar amitjans
Browse files

Solve shared library bug in cmake

parent b7f36685
......@@ -9,12 +9,16 @@ add_compile_options(-Wall -Wextra -Wpedantic -g)
# option to build STATIC or SHARED library
option(BUILD_SQUARE_SHARED "Build the square library shared." OFF)
if(BUILD_SQUARED_SHARED)
set(SQUARE_LIBRARY_TYPE SHARED)
if(BUILD_SQUARE_SHARED)
message("You chose a shared library")
set(SQUARE_LIBRARY_TYPE SHARED)
else()
set(SQUARE_LIBRARY_TYPE STATIC)
message("BUILD_SQUARE_SHARED is ${BUILD_SQUARE_SHARED}")
message("You chose a static library")
set(SQUARE_LIBRARY_TYPE STATIC)
endif()
# tell CMake that there is another CMakeLists.txt in this subdirectory
add_subdirectory(timer)
add_subdirectory(random)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment