CMExamples/CMakeLists.txt

114 lines
4.4 KiB
CMake
Raw Normal View History

2023-07-21 11:11:24 +08:00
macro(cm_example_project sub_folder project_name)
2023-06-27 20:45:28 +08:00
target_link_libraries(${project_name} PRIVATE CMCore CMPlatform CMUtil)
2021-03-07 20:03:51 +08:00
if(UNIX)
target_link_libraries(${project_name} PRIVATE dl)
endif()
IF(WIN32)
target_link_libraries(${project_name} PRIVATE ${HGL_MATH_LIB})
2021-03-07 20:03:51 +08:00
set_debugger_directory(${project_name} ${CMAKE_CURRENT_SOURCE_DIR})
2021-09-07 13:11:34 +08:00
target_sources(${project_name} PRIVATE ${CM_MANIFEST})
2021-03-07 20:03:51 +08:00
ENDIF()
2023-07-21 11:11:24 +08:00
set_property(TARGET ${project_name} PROPERTY FOLDER "CM/Examples/${sub_folder}")
2021-03-07 20:03:51 +08:00
endmacro()
2023-07-21 11:31:58 +08:00
####################################################################################################
2020-08-19 12:01:06 +08:00
2023-07-21 11:11:24 +08:00
add_executable(HalfFloatTest datatype/HalfFloatTest.cpp)
cm_example_project("DataType" HalfFloatTest)
add_executable(CollectionTest datatype/CollectionTest.cpp)
cm_example_project("DataType" CollectionTest)
add_executable(SplitStringTest datatype/SplitStringTest.cpp)
cm_example_project("DataType" SplitStringTest)
2023-07-21 11:40:03 +08:00
add_executable(StrChrTest datatype/strchr_test.cpp)
cm_example_project("DataType" StrChrTest)
2023-07-21 19:23:43 +08:00
add_executable(Uint2StrTest datatype/utos_test.cpp)
cm_example_project("DataType" Uint2StrTest)
add_executable(MapTest datatype/MapTest.cpp)
cm_example_project("DataType" MapTest)
2023-07-21 11:11:24 +08:00
add_executable(MultiMapTest datatype/MultiMapTest.cpp)
cm_example_project("DataType" MultiMapTest)
add_executable(RuntimeAssetManagerTest datatype/ram/RuntimeAssetManagerTest.cpp
datatype/ram/RuntimeAssetManager.h
datatype/ram/RAM_TestClass.h
datatype/ram/RAM_TestClass.cpp)
cm_example_project("DataType/RAM" RuntimeAssetManagerTest)
add_executable(Size2Test datatype/Size2Test.cpp)
cm_example_project("DataType" Size2Test)
2023-07-21 11:11:24 +08:00
add_executable(DataArrayTest datatype/DataArrayTest.cpp)
cm_example_project("DataType" DataArrayTest)
add_executable(Uint2HexStrTest datatype/Uint2HexStrTest.cpp)
cm_example_project("DataType" Uint2HexStrTest)
2023-07-21 11:31:58 +08:00
####################################################################################################
2023-07-21 11:11:24 +08:00
add_executable(FixFilenameTest filesystem/FixFilenameTest.cpp)
cm_example_project("File System" FixFilenameTest)
2021-09-07 13:11:34 +08:00
2023-07-21 11:31:58 +08:00
add_executable(EnumFileTest filesystem/EnumFileTest.cpp)
cm_example_project("File System" EnumFileTest)
2021-09-07 13:11:34 +08:00
IF(WIN32)
2023-07-21 11:11:24 +08:00
add_executable(EnumVolumeTest filesystem/EnumVolumeTest.cpp)
cm_example_project("File System" EnumVolumeTest)
2021-09-07 13:11:34 +08:00
2022-08-04 21:33:20 +08:00
ENDIF(WIN32)
2023-07-21 11:31:58 +08:00
####################################################################################################
2023-07-21 11:11:24 +08:00
add_executable(GetCpuInfo GetCpuInfo.cpp)
cm_example_project("Hareware" GetCpuInfo)
2022-12-30 11:44:13 +08:00
add_executable(CreateBinaryH CreateBinaryH.cpp)
2023-07-21 11:11:24 +08:00
cm_example_project("" CreateBinaryH)
add_executable(NormalCompressTest NormalCompressTest.cpp)
2023-07-21 11:11:24 +08:00
CM_EXAMPLE_PROJECT("" NormalCompressTest)
2023-06-15 15:29:44 +08:00
add_executable(OSFontList OSFontList.cpp)
2023-07-21 11:11:24 +08:00
cm_example_project("os" OSFontList)
2023-06-15 15:29:44 +08:00
target_link_libraries(OSFontList PRIVATE CMUtil)
2023-06-28 18:40:06 +08:00
add_executable(DistributionChart2D DistributionChart2D.cpp BitmapFont.cpp BitmapFont.h)
2023-07-21 11:11:24 +08:00
cm_example_project("chart" DistributionChart2D)
2023-07-21 11:36:16 +08:00
add_executable(TimeCount time/time_count.cpp)
cm_example_project("time" TimeCount)
####################################################################################################
2023-07-21 11:11:24 +08:00
add_executable(AndroidDeviceAnalysis android/AndroidDeviceAnalysis/main.cpp
android/AndroidDeviceAnalysis/GameRecord.h
android/AndroidDeviceAnalysis/GameRecord.cpp
android/AndroidDeviceAnalysis/ParseDeviceID.cpp
android/AndroidDeviceAnalysis/ParseScreenSize.cpp
android/AndroidDeviceAnalysis/ParseDateTime.cpp
android/AndroidDeviceAnalysis/ParseAndroidVersion.cpp
android/AndroidDeviceAnalysis/ParseNumber.cpp
android/AndroidDeviceAnalysis/LoadRecordFile.cpp)
cm_example_project("android" AndroidDeviceAnalysis)
2023-07-21 19:18:12 +08:00
####################################################################################################
add_executable(PAttribTest utils/PAttribTest.cpp)
2023-07-21 19:34:04 +08:00
cm_example_project("utils" PAttribTest)
add_executable(Base64Test utils/base64test.cpp)
2023-07-21 19:44:43 +08:00
cm_example_project("utils" Base64Test)
add_executable(HashTest utils/HashTest.cpp)
cm_example_project("utils" HashTest)