aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-06-15 20:55:20 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-06-15 20:58:10 +0800
commitf5cd05e88b4068550b8ec244541c95050b1e6a5e (patch)
treeaf093f3fa3a33e5a1cd61115d239411f8d29b7e0 /examples
parent591c44b9a1a6e0a803b6d8af9e35aa8552b421c0 (diff)
downloadSMELT-f5cd05e88b4068550b8ec244541c95050b1e6a5e.tar.xz
Fix building of the example application.
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)