-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test that tries to use the generated CMake libs [continuation]. (…
- Loading branch information
Showing
5 changed files
with
73 additions
and
53 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
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 was deleted.
Oops, something went wrong.
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,30 @@ | ||
# This test checks that it is possible to use the | ||
# CMake artifacts generated by the build. | ||
|
||
cmake_minimum_required(VERSION 3.1.0) | ||
project(test_use) | ||
|
||
file(GENERATE | ||
OUTPUT | ||
"${CMAKE_CURRENT_BINARY_DIR}/main.cpp" | ||
CONTENT | ||
[=[ | ||
#include <portaudio.h> | ||
int main() | ||
{ | ||
Pa_Initialize(); | ||
Pa_Terminate(); | ||
} | ||
]=] | ||
) | ||
|
||
find_package(PortAudio REQUIRED) | ||
|
||
add_library(test_use_static STATIC "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") | ||
add_library(test_use_shared SHARED "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") | ||
add_executable(test_use_exe "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") | ||
|
||
target_link_libraries(test_use_static PRIVATE PortAudio::PortAudio) | ||
target_link_libraries(test_use_shared PRIVATE PortAudio::PortAudio) | ||
target_link_libraries(test_use_exe PRIVATE PortAudio::PortAudio) | ||
|