1PROJECT(viewer CXX) 2 3FIND_PACKAGE(wxWidgets REQUIRED) 4INCLUDE(${wxWidgets_USE_FILE}) 5 6INCLUDE_DIRECTORIES( 7 ${CMAKE_CURRENT_SOURCE_DIR}/../.. 8 ${CMAKE_CURRENT_SOURCE_DIR}/.. 9 ) 10 11# original flags: 12# -DUSE_JPWL -DwxUSE_LIBOPENJPEG -DwxUSE_GUI=1 -DOPJ_STATIC -DOPJ_HTMLABOUT -DOPJ_INICONFIG -DUSE_JPSEC -DOPJ_MANYFORMATS 13ADD_DEFINITIONS(-DwxUSE_LIBOPENJPEG -DOPENJPEG_VERSION="1.5.0") 14SET(OPJV_SRCS 15 ${CMAKE_CURRENT_SOURCE_DIR}/source/imagjpeg2000.cpp 16 ${CMAKE_CURRENT_SOURCE_DIR}/source/wxj2kparser.cpp 17 ${CMAKE_CURRENT_SOURCE_DIR}/source/OPJViewer.cpp 18 ${CMAKE_CURRENT_SOURCE_DIR}/source/wxjp2parser.cpp 19 ${CMAKE_CURRENT_SOURCE_DIR}/source/OPJDialogs.cpp 20 ${CMAKE_CURRENT_SOURCE_DIR}/source/OPJThreads.cpp 21 ${CMAKE_CURRENT_SOURCE_DIR}/source/OPJAbout.cpp 22 ${CMAKE_CURRENT_SOURCE_DIR}/../codec/index.c 23 ) 24ADD_EXECUTABLE(opjviewer ${OPJV_SRCS}) 25TARGET_LINK_LIBRARIES(opjviewer ${wxWidgets_LIBRARIES} openjpeg) 26