diff --git a/pallilux-gui/pallilux-gui.pro b/pallilux-gui/pallilux-gui.pro index 287465c..a95cb5d 100644 --- a/pallilux-gui/pallilux-gui.pro +++ b/pallilux-gui/pallilux-gui.pro @@ -90,6 +90,10 @@ win32 { } unix { +if(0){ + # fftw, pulseaudio stuff + LIBS += -L/usr/lib64 -lfftw3 -lpulse-simple -lpulse + # spectrometer stuff SOURCES += spectrometerconfigpage.cpp \ spectrometercontrolwidget.cpp @@ -98,24 +102,22 @@ unix { spectrometercontrolwidget.h FORMS += spectrometerconfigpage.ui +} + # X11 stuff CONFIG += link_pkgconfig PKGCONFIG += x11 - # fftw stuff - LIBS += -lfftw3 - - # pulseaudio - LIBS += -lpulse-simple - # pa_strerror is in here - LIBS += -lpulse - - # static pallilux lib - LIBS += "/home/arne/Documents/Development/PalliLux/build-pallilux-Desktop-Debug/libpallilux.a" - - # dynamic pallilux lib - #LIBS += -L/home/arne/Documents/Development/PalliLux/build-pallilux-host-Desktop-Debug -lhost + # static pallilux lib, using debug or release build + CONFIG( debug, debug|release){ + message("debug") + LIBS += "/home/arne/Documents/Development/PalliLux/build-pallilux-Desktop-Debug/libpallilux.a" + } + CONFIG(release, debug|release) { + message("release") + LIBS += "/home/arne/Documents/Development/PalliLux/build-pallilux-Desktop-Release/libpallilux.a" + } } INCLUDEPATH += $${PALLILUX_LIB_FOLDER}/cimg \ diff --git a/pallilux/CMakeLists.txt b/pallilux/CMakeLists.txt index 3ced587..768d8ac 100644 --- a/pallilux/CMakeLists.txt +++ b/pallilux/CMakeLists.txt @@ -125,13 +125,12 @@ if(UNIX) ###################################################################################################################################################### # OPTIONS ###################################################################################################################################################### - option(X11 "find and include x11 lib" ON) - option(SPECTROMETER "find and include fftw3 and pulse libs" ON) + option(X11 "find and include x11 lib" ON) -###################################################################################################################################################### -# X11 OPTION - needed for xlibscreenshot - LINUX ONLY -###################################################################################################################################################### + ###################################################################################################################################################### + # X11 OPTION - needed for xlibscreenshot - LINUX ONLY + ###################################################################################################################################################### if(X11) target_sources(${PROJECT_NAME} PUBLIC "src/screenshotproviders/xlibscreenshotprovider.cpp" "include/screenshotproviders/xlibscreenshotprovider.h") find_package(X11 REQUIRED) @@ -159,17 +158,16 @@ if(UNIX) # if all required libs are available, give option to enable spectrometer system if(FFTW_LIBRARIES AND FFTW_INCLUDE_DIR AND PULSEAUDIO_LIBRARY AND PULSEAUDIO_SIMPLE_LIBRARY) option(SPECTROMETER "find and include fftw3 and pulse libs" OFF) + + # if spectrometer option enabled + if(SPECTROMETER) + INCLUDE_DIRECTORIES ( ${FFTW_INCLUDE_DIR} ) + TARGET_LINK_LIBRARIES (${PROJECT_NAME} ${FFTW_LIBRARIES} ${PULSEAUDIO_LIBRARY} ${PULSEAUDIO_LIBRARY}) + + # add spectrometer files to target + target_sources(${PROJECT_NAME} PUBLIC "include/colordataproviders/spectrometercolordataprovider.h" "src/colordataproviders/spectrometercolordataprovider.cpp") + endif(SPECTROMETER) endif(FFTW_LIBRARIES AND FFTW_INCLUDE_DIR AND PULSEAUDIO_LIBRARY AND PULSEAUDIO_SIMPLE_LIBRARY) - - # if spectrometer option enabled - if(SPECTROMETER) - TARGET_LINK_LIBRARIES (${PROJECT_NAME} ${PULSEAUDIO_LIBRARY} ${PULSEAUDIO_LIBRARY}) - INCLUDE_DIRECTORIES ( ${FFTW_INCLUDE_DIR} ) - TARGET_LINK_LIBRARIES (${PROJECT_NAME} ${FFTW_LIBRARIES} ) - - # add spectrometer files to target - target_sources(${PROJECT_NAME} PUBLIC "include/colordataproviders/spectrometercolordataprovider.h" "src/colordataproviders/spectrometercolordataprovider.cpp") - endif(SPECTROMETER) endif(UNIX)