Skip to content

Commit

Permalink
Imported targets
Browse files Browse the repository at this point in the history
  • Loading branch information
fetzerch authored and AchimTuran committed Apr 11, 2016
1 parent 5dbcc81 commit 11a5a4e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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
Expand All @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions PictureItConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 11a5a4e

Please sign in to comment.