From e6bba7667759b3b20a8d989d6632936e274978b4 Mon Sep 17 00:00:00 2001 From: Piers Daniell Date: Fri, 3 Apr 2015 17:42:59 -0600 Subject: demos: copy XGL.dll to target folder Makes life easier so the XGL.dll doesn't have to be manually copied every time. --- demos/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt index 237f0d5b..06279099 100644 --- a/demos/CMakeLists.txt +++ b/demos/CMakeLists.txt @@ -77,3 +77,12 @@ else() add_executable(cube cube.c) target_link_libraries(cube ${LIBRARIES} libpngd zlibd) endif() + + +if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(PATH_TO_WIN_XGL ${CMAKE_CURRENT_BINARY_DIR}/../loader/${CMAKE_CFG_INTDIR}) + add_custom_command(TARGET tri + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${PATH_TO_WIN_XGL}/XGL.dll" $ + ) +endif() -- cgit v1.2.3