aboutsummaryrefslogtreecommitdiff
path: root/visualization/CMakeLists.txt
blob: 6d474e00117fdca2d04d17e4e58fafd25d0a9ba9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
set(visualization_SOURCES
    extrasmeltutils.hpp
    qmpvirtualpiano3d.hpp
    qmpvisualization.hpp
    extrasmeltutils.cpp
    qmpvirtualpiano3d.cpp
    qmpvisualization.cpp
)

if(WIN32)
    get_filename_component(CURRENT_SUBPROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME)
    configure_file("visualization.rc.in" "visualization.rc" @ONLY)
    list(APPEND visualization_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/visualization.rc)
endif(WIN32)

set(BUILD_DUMB ON)
set(BUILD_EXAMPLE OFF)
add_subdirectory(SMELT)

add_subdirectory(renderer)

find_package(glfw3 REQUIRED)
find_package(GLEW REQUIRED)
find_package(DevIL REQUIRED)
find_package(ZLIB REQUIRED)
find_package(Freetype REQUIRED)
find_package(OpenGL REQUIRED COMPONENTS OpenGL)

include_directories(${PROJECT_SOURCE_DIR}/include/)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/SMELT/include)
include_directories(${FREETYPE_INCLUDE_DIRS})

add_library(visualization MODULE
    ${visualization_SOURCES}
)

target_link_libraries(visualization
    smeltext
    smelt
    ${FREETYPE_LIBRARIES}
    ${ZLIB_LIBRARIES}
    ${IL_LIBRARIES}
    glfw
    ${GLEW_LIBRARIES}
    OpenGL::GL
)

install(TARGETS visualization LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/qmidiplayer/)