Browse Source

Add pyinvaders to CMake build process

David Wimsey 11 years ago
parent
commit
2d6e10e114
1 changed files with 14 additions and 0 deletions
  1. 14 0
      Build/CMakeLists.txt

+ 14 - 0
Build/CMakeLists.txt

@@ -288,6 +288,15 @@ if(BUILD_SAMPLES)
     install(TARGETS invaders 
     	RUNTIME DESTINATION ${SAMPLES_DIR}/invaders
     	BUNDLE DESTINATION ${SAMPLES_DIR})
+
+	if(BUILD_PYTHON_BINDINGS)
+	    # Build and install pyinvaders sample
+	    bl_sample(pyinvaders ${sample_LIBRARIES} ${PYTHON_LIBRARIES} ${PY_BINDINGS_LINK_LIBS})
+	    install(DIRECTORY DESTINATION ${SAMPLES_DIR}/pyinvaders)
+	    install(TARGETS pyinvaders
+	    	RUNTIME DESTINATION ${SAMPLES_DIR}/pyinvaders
+	    	BUNDLE DESTINATION ${SAMPLES_DIR})
+	endif()
 endif()
 
 
@@ -331,6 +340,11 @@ if(BUILD_SAMPLES)
     install(DIRECTORY ${PROJECT_SOURCE_DIR}/Samples/invaders/data
             DESTINATION ${SAMPLES_DIR}/invaders
     )
+    if(BUILD_PYTHON_BINDINGS)
+        install(DIRECTORY ${PROJECT_SOURCE_DIR}/Samples/pyinvaders/data
+                DESTINATION ${SAMPLES_DIR}/pyinvaders
+        )
+    endif()
     install(DIRECTORY ${PROJECT_SOURCE_DIR}/Samples/assets
             DESTINATION ${SAMPLES_DIR}
     )