Skip to content

Commit e9b454e

Browse files
add cmark-gfm-bin target to Package.swift
1 parent 1424dac commit e9b454e

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Package.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ let package = Package(
1313
.library(
1414
name: "cmark-gfm-extensions",
1515
targets: ["cmark-gfm-extensions"]),
16+
.executable(
17+
name: "cmark-gfm-bin",
18+
targets: ["cmark-gfm-bin"]),
1619
],
1720
targets: [
1821
.target(name: "cmark-gfm",
1922
path: "src",
2023
exclude: [
21-
"main.c",
2224
"scanners.re",
2325
"libcmark-gfm.pc.in",
2426
"config.h.in",
@@ -38,5 +40,15 @@ let package = Package(
3840
"ext_scanners.re",
3941
]
4042
),
43+
.target(name: "cmark-gfm-bin",
44+
dependencies: [
45+
"cmark-gfm",
46+
"cmark-gfm-extensions",
47+
],
48+
path: "bin",
49+
sources: [
50+
"main.c",
51+
]
52+
),
4153
]
4254
)

src/main.c renamed to bin/main.c

File renamed without changes.

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ set(LIBRARY_SOURCES
4040
)
4141

4242
set(PROGRAM "cmark-gfm")
43-
set(PROGRAM_SOURCES main.c)
43+
set(PROGRAM_SOURCES "${PROJECT_SOURCE_DIR}/bin/main.c")
4444

4545
include_directories(include ${CMAKE_CURRENT_BINARY_DIR})
4646
include_directories(

0 commit comments

Comments
 (0)