From 08323ced243afbbfc9dea26700929e87bb32fbb9 Mon Sep 17 00:00:00 2001 From: you Date: Fri, 25 Feb 2022 14:06:51 +0800 Subject: [PATCH] first commit --- CMakeLists.txt | 22 +++++++ Makefile.build | 12 ++++ include/func.h | 4 ++ lib/libpath.txt | 0 main.dev | 92 +++++++++++++++++++++++++++++ main.layout | 28 +++++++++ new.nsi | 32 +++++++++++ src/foo.c | 3 + src/main.c | 5 ++ tools/ConsolePauser.exe | Bin 0 -> 171008 bytes tools/cmake-wrapper/LICENSE | 21 +++++++ tools/cmake-wrapper/cmakew.bat | 100 ++++++++++++++++++++++++++++++++ tools/cmake-wrapper/cmakew.sh | 102 +++++++++++++++++++++++++++++++++ tools/gen.cmd | 5 ++ 14 files changed, 426 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 Makefile.build create mode 100644 include/func.h create mode 100644 lib/libpath.txt create mode 100644 main.dev create mode 100644 main.layout create mode 100644 new.nsi create mode 100644 src/foo.c create mode 100644 src/main.c create mode 100644 tools/ConsolePauser.exe create mode 100644 tools/cmake-wrapper/LICENSE create mode 100644 tools/cmake-wrapper/cmakew.bat create mode 100644 tools/cmake-wrapper/cmakew.sh create mode 100644 tools/gen.cmd diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..2522696 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.00) +PROJECT(main) +file(GLOB SOURCE_FILES + "src/*.c" +) +add_library(foo src/foo.c) + +add_executable(${PROJECT_NAME} ${SOURCE_FILES}) + +target_include_directories(${PROJECT_NAME} PUBLIC + ${PROJECT_SOURCE_DIR}/include + ${PROJECT_SOURCE_DIR}/src) + + +target_link_directories(${PROJECT_NAME} PUBLIC + ${PROJECT_SOURCE_DIR}/lib + ${PROJECT_SOURCE_DIR}/src) + + +target_link_libraries(${PROJECT_NAME} foo) + + diff --git a/Makefile.build b/Makefile.build new file mode 100644 index 0000000..fec5772 --- /dev/null +++ b/Makefile.build @@ -0,0 +1,12 @@ +.PHONY: all main.exe clean +all: main.exe + + +main.exe : build/gen + cd build && mingw32-make && copy main.exe .. + +build/gen: + tools\gen.cmd + +clean: + del main.exe & cd build && mingw32-make clean diff --git a/include/func.h b/include/func.h new file mode 100644 index 0000000..b61f5d6 --- /dev/null +++ b/include/func.h @@ -0,0 +1,4 @@ +#ifndef FUNC_H_ +#define FUNC_H_ +int foo(void); +#endif diff --git a/lib/libpath.txt b/lib/libpath.txt new file mode 100644 index 0000000..e69de29 diff --git a/main.dev b/main.dev new file mode 100644 index 0000000..fa3b41c --- /dev/null +++ b/main.dev @@ -0,0 +1,92 @@ +[Project] +FileName=project.dev +Name=main +Type=1 +Ver=2 +ObjFiles= +Includes= +Libs= +PrivateResource= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker= +IsCpp=0 +Icon= +ExeOutput=build +ObjectOutput= +LogOutput= +LogOutputEnabled=0 +OverrideOutput=0 +OverrideOutputName=project.exe +HostApplication= +UseCustomMakefile=1 +CustomMakefile=Makefile.build +CommandLine= +Folders=src +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +CompilerSettings=0000000000000000000000000 +UnitCount=3 + +[VersionInfo] +Major=1 +Minor=0 +Release=0 +Build=0 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion=1.0.0.0 +FileDescription=Developed using the Dev-C++ IDE +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +AutoIncBuildNr=0 +SyncProduct=1 + +[Unit2] +FileName=src\main.c +Folder=src +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=1 +BuildCmd=build.cmd +CompileCpp=0 + +[Unit1] +FileName=CMakeLists.txt +Folder= +Compile=0 +Link=0 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit4] +FileName=gen.cmd +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit5] +FileName=gen.cmd + +[Unit3] +FileName=Makefile.build +Folder= +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/main.layout b/main.layout new file mode 100644 index 0000000..e97b88f --- /dev/null +++ b/main.layout @@ -0,0 +1,28 @@ +[Editor_0] +CursorCol=1 +CursorRow=19 +TopLine=1 +LeftChar=1 +[Editor_2] +CursorCol=23 +CursorRow=6 +TopLine=1 +LeftChar=1 +[Editors] +Order=1 +Focused=1 +[Editor_1] +CursorCol=2 +CursorRow=4 +TopLine=1 +LeftChar=1 +[Editor_3] +CursorCol=1 +CursorRow=3 +TopLine=1 +LeftChar=1 +[Editor_4] +CursorCol=2 +CursorRow=3 +TopLine=1 +LeftChar=1 diff --git a/new.nsi b/new.nsi new file mode 100644 index 0000000..89abf8d --- /dev/null +++ b/new.nsi @@ -0,0 +1,32 @@ +; The name of the installer +Name "Devcpp 6.0g CMake" + +; To change from default installer icon: +;Icon "YOURPROGRAM.ico" + +; The setup filename +OutFile "Dev6.0g CMake.exe" + +; The default installation directory +InstallDir <