include_directories (${PROJECT_SOURCE_DIR}/src/dep/include ${PROJECT_SOURCE_DIR}/src/shared)

add_executable (stuffextract
StuffExtract.cpp
)

# Link the executable to the libraries.
set(STUFFEXTRACT_LIBS shared StormLib_static zlib)
if(UNIX)
  list(APPEND STUFFEXTRACT_LIBS bz2)
endif()
if(WIN32)
  list(APPEND STUFFEXTRACT_LIBS Winmm)
endif()

target_link_libraries (stuffextract ${STUFFEXTRACT_LIBS} )
set_target_properties (stuffextract PROPERTIES LINK_FLAGS
  "${EXECUTABLE_LINK_FLAGS}"
  RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_INSTALL_PREFIX}/bin"
  RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_INSTALL_PREFIX}/bin"
  VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}/bin"
)
install(TARGETS stuffextract DESTINATION ${CMAKE_INSTALL_PREFIX})
