This commit is contained in:
Anselme 2016-04-24 15:28:28 +02:00
parent 5185581f35
commit cb60240f3f
5 changed files with 7 additions and 5 deletions

View File

@ -6,7 +6,7 @@ set(CMAKE_TEMPLATE_PATH "..")
#SET(RESOURCE_DIRS /shaders) #SET(RESOURCE_DIRS /shaders)
#SET(RES_SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/plop.txt ${CMAKE_CURRENT_SOURCE_DIR}/plop2.txt) #SET(RES_SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/plop.txt ${CMAKE_CURRENT_SOURCE_DIR}/plop2.txt)
FILE(GLOB RES_SRC_FILE hello.txt test.txt) FILE(GLOB RES_SRC_FILE hello.txt resDir/test.txt)
SET(RESOURCE_DST_FILE res.cpp) SET(RESOURCE_DST_FILE res.cpp)
# choose source file # choose source file

2
test/resDir/test.txt Normal file
View File

@ -0,0 +1,2 @@
This is a test
fefea

View File

@ -10,6 +10,8 @@ int main()
Resource::ResourceMap resMap; Resource::ResourceMap resMap;
Resource::getResourcePack_res(resMap); Resource::getResourcePack_res(resMap);
cout << resMap["hello.txt"] << endl;
cout << "resources available : " << endl << endl; cout << "resources available : " << endl << endl;
for(auto it : resMap) for(auto it : resMap)
cout << it.first << " -> " << it.second << endl; cout << it.first << " -> " << it.second << endl;

View File

@ -1,2 +0,0 @@
This is a tessst
fefea