summaryrefslogtreecommitdiff
path: root/test_Free_image_V2_tile_handling/CMakeLists.txt
blob: 277e3e3be1dd8876d4318220897e1815c6cfc2ba (plain)
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
# Build the demo app, small examples

# First thing define the common source:

# Then check if getopt is present:
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)

# Headers file are located here:
INCLUDE_DIRECTORIES(
  ${OPENJPEG_SOURCE_DIR}/libopenjpeg
  )

# Do the proper thing when building static...if only there was configured
# headers or def files instead
IF(NOT BUILD_SHARED_LIBS)
  ADD_DEFINITIONS(-DOPJ_STATIC)
ENDIF(NOT BUILD_SHARED_LIBS)

#INCLUDE(${OPENJPEG_SOURCE_DIR}/CMake/Free_CMakeImport.cmake)
ADD_DEFINITIONS ( -DFREEIMAGE_LIB )

# Loop over all executables:
FOREACH(exe test2_encoder test2_decoder)
  
  ADD_EXECUTABLE(${exe} ${exe}.c)
  TARGET_LINK_LIBRARIES(${exe} ${OPJ_PREFIX}openjpeg)
  TARGET_LINK_LIBRARIES(${exe} ${FREEIMAGE_LIBRARIES})
ENDFOREACH(exe)