diff --git a/CMakeLists.txt b/CMakeLists.txt index 9aeba20..0029f49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ include_directories(${OpenGL_INCLUDE_DIRS}) # Find and include asplib find_package(asplib REQUIRED SpectrumVisProcessor FFT) -include_directories(${asplib_INCLUDE_DIRS}) +#include_directories(${asplib_INCLUDE_DIRS}) # Define PictureIt includes list(APPEND PI_INCLUDES "${PROJECT_SOURCE_DIR}/src") @@ -34,7 +34,8 @@ endif() # Include PictureIt direcotires include_directories(${PI_INCLUDES} - ${asplib_INCLUDE_DIRS}) + #${asplib_INCLUDE_DIRS}) + ) set(PI_SOURCES src/pictureit.cpp src/spectrum.cpp @@ -53,9 +54,8 @@ set(PI_HEADERS src/pictureit.h # Configure PictureItConfig.cmake.in configure_file(PictureItConfig.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PictureItConfig.cmake" @ONLY) - add_library(PictureIt STATIC ${PI_SOURCES} ${PI_HEADERS}) - +target_link_libraries(PictureIt PRIVATE asplib::SpectrumVisProcessor) set_target_properties(PictureIt PROPERTIES LINKER_LANGUAGE CXX) set_target_properties(PictureIt PROPERTIES OUTPUT_NAME PictureIt) diff --git a/PictureItConfig.cmake.in b/PictureItConfig.cmake.in index 687aedd..dac4310 100644 --- a/PictureItConfig.cmake.in +++ b/PictureItConfig.cmake.in @@ -7,10 +7,11 @@ set(PICTUREIT_INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include @CMAKE_INSTALL_PREFIX@/include/PictureIt) set (PICTUREIT_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@") +#FIXME CMAKE_INSTALL_LIBDIR not defined (GNUInstallDirs / MultiArch) if(WIN32) - set (PICTUREIT_LIBRARY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/PictureIt.lib") + set (PICTUREIT_LIBRARY "@CMAKE_INSTALL_PREFIX@/lib/PictureIt.lib") else() - set (PICTUREIT_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lPictureIt") + set (PICTUREIT_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/lib -lPictureIt") endif() #find_library(PICTUREIT_LIBRARY "@PROJECT_NAME@" HINTS ${PICTUREIT_LIBRARY_DIR})