aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt22
1 files changed, 19 insertions, 3 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 4b1defa..9e750bb 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -2,13 +2,20 @@ option (USE_CXIMAGE "Use CxImage instead of DevIL" OFF)
find_package(glfw3 3.2 REQUIRED)
find_package(GLEW REQUIRED)
-find_package(OpenAL REQUIRED)
find_package(Freetype REQUIRED)
+find_package(ZLIB REQUIRED)
if (NOT USE_CXIMAGE)
find_package(DevIL REQUIRED)
endif ()
+if (NOT BUILD_DUMB)
+ find_package(PkgConfig REQUIRED)
+ find_package(OpenAL REQUIRED)
+ pkg_search_module(VORBISFILE vorbisfile REQUIRED)
+ pkg_search_module(VORBIS vorbis REQUIRED)
+endif ()
+
add_executable(example
smelt_test.cpp)
@@ -18,12 +25,21 @@ include_directories(
${FREETYPE_INCLUDE_DIRS}
)
+if (NOT USE_CXIMAGE)
+ target_link_libraries(example ${IL_LIBRARIES})
+endif ()
+
+if (NOT BUILD_DUMB)
+ target_link_libraries(example ${OPENAL_LIBRARY} ${VORBISFILE_LIBRARIES} ${VORBIS_LIBRARIES})
+endif ()
+
target_link_libraries(example
+ smelt smeltext
glfw
${GLEW_LIBRARIES}
- ${OpenAL_LIBRARIES}
${FREETYPE_LIBRARIES}
- smelt smeltext
+ ${ZLIB_LIBRARIES}
+ GL
)
get_cmake_property(__cmake_debug_var VARIABLES)