-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace SNAPCRAFT_PART_INSTALL in the part attributes. (#841)
LP: #1628915
- Loading branch information
1 parent
5d447ae
commit 6cef6c0
Showing
7 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cmake_minimum_required(VERSION 3.2) | ||
project(simple-cmake-replace C) | ||
add_definitions(-DPART_INSTALL=${PART_INSTALL}) | ||
add_executable(simple-cmake-replace test.c) | ||
install(TARGETS simple-cmake-replace RUNTIME DESTINATION bin) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions
14
integration_tests/snaps/simple-cmake-replace/snapcraft.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: test-package | ||
version: 0.1 | ||
summary: one line summary | ||
description: a longer description | ||
icon: icon.png | ||
confinement: strict | ||
|
||
build-packages: [gcc, libc6-dev] | ||
|
||
parts: | ||
cmake-project: | ||
plugin: cmake | ||
configflags: ['-DPART_INSTALL="$SNAPCRAFT_PART_INSTALL"'] | ||
source: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
printf("When I was built I was installed to %s\n", PART_INSTALL); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters