libsndfile / libsamplerate

An audio Sample Rate Conversion library
http://libsndfile.github.io/libsamplerate/
BSD 2-Clause "Simplified" License
603 stars 168 forks source link

BUILD SHARED_LIBS and CMAKE_BUILD_TYPE menus not available with cmake-gui #136

Closed sezero closed 3 years ago

sezero commented 3 years ago

Is that intentional? Maybe you need something like the following in CMakeLists.txt?

IF (NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
    MESSAGE(STATUS "Setting build type to 'Debug' as none was specified.")
    SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
    SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
ENDIF ()
SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_BUILD_TYPE}")
MESSAGE(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")

OPTION(BUILD_SHARED_LIBS "Build dynamic library" OFF)
evpobr commented 3 years ago

Probably Yes for BUILD_SHARED_LIBS, but I'm not sure about CMAKE_BUILD_TYPE. In fact, an empty CMAKE_BUILD_TYPE will allow you to pass -O2 instead of -O3 by default, for example.

sezero commented 3 years ago

Probably Yes for BUILD_SHARED_LIBS, but I'm not sure about CMAKE_BUILD_TYPE. In fact, an empty CMAKE_BUILD_TYPE will allow you to pass -O2 instead of -O3 by default, for example.

You do what you do from cmdline, and that's good, but gui users (e.g. windows users) won't be doing that.

evpobr commented 3 years ago

I don't know what the point is now to use cmake-gui on Windows, if you can just open the CMake project folder in Visual Studio or VS Code. Everything is automatically configured and managed via the IDE.

sezero commented 3 years ago

Well, I have no strong opinions on the case - just notified you of the issue.

evpobr commented 3 years ago

Ok, let's leave as it is.