Skip to content

Commit

Permalink
Add project-rc to test resource compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Nov 14, 2024
1 parent bc9c4bc commit 074f6f4
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 0 deletions.
16 changes: 16 additions & 0 deletions projects/project-00/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// #error "test"

struct S
{
void bar(int)
{
}
void foo(this S& self)
{
}
};

int main()
{
S s;

s.bar();
s.foo();
}
3 changes: 3 additions & 0 deletions projects/project-rc/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Project-rc:

Project to test resource compilation (premake5)
22 changes: 22 additions & 0 deletions projects/project-rc/premake5.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
if (_ACTION == nil) then
return
end

local LocationDir = "solution/%{_ACTION}"

workspace "Project"
location(LocationDir)
configurations {"Debug", "Release"}

objdir(path.join(LocationDir, "obj")) -- premake adds $(configName)/$(AppName)
targetdir(path.join(LocationDir, "bin/%{cfg.buildcfg}"))
startproject "app"

project "app"
kind "ConsoleApp"
targetname "app"

files { "src/main.cpp" }
filter { "system:windows" }
files { "src/resource.rc", "src/resource.ico" }
filter {}
3 changes: 3 additions & 0 deletions projects/project-rc/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main()
{
}
Binary file added projects/project-rc/src/resource.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions projects/project-rc/src/resource.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#define IDI_ICON 101

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON ICON "resource.ico"

0 comments on commit 074f6f4

Please sign in to comment.