-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 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,12 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
project(libpspme) | ||
|
||
# Output directories | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/module) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
|
||
# Add subdirectories for each component | ||
add_subdirectory(src/lib) # Static library | ||
add_subdirectory(src/module) # PRX module | ||
add_subdirectory(src/example) # Example program |
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,15 @@ | ||
# Example executable | ||
project(fooME) | ||
|
||
# Collect source files for the example program | ||
file(GLOB EXAMPLE_SOURCES *.c) | ||
|
||
# Define the executable target | ||
add_executable(fooME ${EXAMPLE_SOURCES}) | ||
|
||
# Link against the static library and the module | ||
target_link_libraries(fooME pspme_static pspme_module) | ||
|
||
# Set output name to "fooME.elf" | ||
set_target_properties(fooME PROPERTIES OUTPUT_NAME "fooME") | ||
target_include_directories(fooME PRIVATE ${CMAKE_SOURCE_DIR}/include) |
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,12 @@ | ||
# Static library | ||
project(libpspme_lib) | ||
|
||
# Collect source files for the static library | ||
file(GLOB LIB_SOURCES *.c) | ||
|
||
# Define the static library target | ||
add_library(pspme_static STATIC ${LIB_SOURCES}) | ||
|
||
# Set output name to "libpspme.a" | ||
set_target_properties(pspme_static PROPERTIES OUTPUT_NAME "pspme") | ||
target_include_directories(pspme_static PUBLIC ${CMAKE_SOURCE_DIR}/include) |
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,12 @@ | ||
# PRX Module | ||
project(pspme_prx) | ||
|
||
# Collect source files for the PRX module | ||
file(GLOB MODULE_SOURCES *.c) | ||
|
||
# Define the PRX target | ||
add_library(pspme_module MODULE ${MODULE_SOURCES}) | ||
|
||
# Set output name to "pspme.prx" | ||
set_target_properties(pspme_module PROPERTIES OUTPUT_NAME "pspme") | ||
target_include_directories(pspme_module PUBLIC ${CMAKE_SOURCE_DIR}/include) |