File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ option( BUILD_RUNTIME "Build the FFT runtime library" ON )
7070option ( BUILD_CLIENT "Build a command line clFFT client program with a variety of configurable parameters (dependency on Boost)" ON )
7171option ( BUILD_TEST "Build the library testing suite (dependency on google test, Boost, and FFTW)" ON )
7272option ( BUILD_LOADLIBRARIES "Build the optional dynamic load libraries that the FFT runtime will search for" ON )
73+ option ( BUILD_SHARED_LIBRARY "Build shared libraries." ON )
7374
7475# If BOOST_ROOT is defined as an environment value, use that value and cache it so it's visible in the cmake-gui.
7576# Otherwise, create a sensible default that the user can change
Original file line number Diff line number Diff line change @@ -74,7 +74,11 @@ add_definitions( "/DCLFFT_EXPORTS" )
7474# Include standard OpenCL headers
7575include_directories ( ${OPENCL_INCLUDE_DIRS} ${PROJECT_BINARY_DIR} /include ../include )
7676
77- add_library ( clFFT SHARED ${clFFT.Files } )
77+ if (BUILD_SHARED_LIBRARY)
78+ add_library ( clFFT SHARED ${clFFT.Files } )
79+ else ()
80+ add_library ( clFFT STATIC ${clFFT.Files } )
81+ endif ()
7882target_link_libraries ( clFFT ${OPENCL_LIBRARIES} )
7983
8084set_target_properties ( clFFT PROPERTIES VERSION ${CLFFT_VERSION} )
Original file line number Diff line number Diff line change @@ -63,7 +63,11 @@ add_definitions( "/DSTATTIMER_EXPORTS" )
6363# Include standard OpenCL headers
6464include_directories ( ${OPENCL_INCLUDE_DIRS} ${PROJECT_BINARY_DIR} /include ../include )
6565
66- add_library ( StatTimer SHARED ${StatTimer.Files } )
66+ if (BUILD_SHARED_LIBRARY)
67+ add_library ( StatTimer SHARED ${StatTimer.Files } )
68+ else ()
69+ add_library ( StatTimer STATIC ${StatTimer.Files } )
70+ endif ()
6771set_target_properties ( StatTimer PROPERTIES VERSION ${CLFFT_VERSION} )
6872set_target_properties ( StatTimer PROPERTIES SOVERSION ${CLFFT_SOVERSION} )
6973set_target_properties ( StatTimer PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR} /staging" )
You can’t perform that action at this time.
0 commit comments