CMake: Copy demo and sample data files to correct directory
Instead of 'lib/', copy it to directory where the executables are (e.g. 'lib/vc_x64_lib/').
This commit is contained in:
		@@ -26,7 +26,7 @@ function(wx_add_demo name)
 | 
				
			|||||||
        foreach(data_file ${DEMO_DATA})
 | 
					        foreach(data_file ${DEMO_DATA})
 | 
				
			||||||
            list(APPEND cmds COMMAND ${CMAKE_COMMAND}
 | 
					            list(APPEND cmds COMMAND ${CMAKE_COMMAND}
 | 
				
			||||||
                -E copy ${wxSOURCE_DIR}/demos/${name}/${data_file}
 | 
					                -E copy ${wxSOURCE_DIR}/demos/${name}/${data_file}
 | 
				
			||||||
                ${wxOUTPUT_DIR}/${data_file})
 | 
					                ${wxOUTPUT_DIR}/${wxPLATFORM_LIB_DIR}/${data_file})
 | 
				
			||||||
        endforeach()
 | 
					        endforeach()
 | 
				
			||||||
        add_custom_command(
 | 
					        add_custom_command(
 | 
				
			||||||
            TARGET ${DEMO_NAME} ${cmds}
 | 
					            TARGET ${DEMO_NAME} ${cmds}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -574,7 +574,7 @@ function(wx_add_sample name)
 | 
				
			|||||||
        foreach(data_file ${SAMPLE_DATA})
 | 
					        foreach(data_file ${SAMPLE_DATA})
 | 
				
			||||||
            list(APPEND cmds COMMAND ${CMAKE_COMMAND}
 | 
					            list(APPEND cmds COMMAND ${CMAKE_COMMAND}
 | 
				
			||||||
                -E copy ${wxSOURCE_DIR}/samples/${wxSAMPLE_SUBDIR}${name}/${data_file}
 | 
					                -E copy ${wxSOURCE_DIR}/samples/${wxSAMPLE_SUBDIR}${name}/${data_file}
 | 
				
			||||||
                ${wxOUTPUT_DIR}/${data_file})
 | 
					                ${wxOUTPUT_DIR}/${wxPLATFORM_LIB_DIR}/${data_file})
 | 
				
			||||||
        endforeach()
 | 
					        endforeach()
 | 
				
			||||||
        add_custom_command(
 | 
					        add_custom_command(
 | 
				
			||||||
            TARGET ${target_name} ${cmds}
 | 
					            TARGET ${target_name} ${cmds}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user