Skip to content

Commit

Permalink
WIP: Add CMake scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
olilarkin committed Aug 1, 2024
1 parent 9c6d575 commit 3b62fd1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.14)
project(iPlug2OOS)

set(IPLUG2_DIR ${CMAKE_SOURCE_DIR}/iPlug2)
include(${IPLUG2_DIR}/iPlug2.cmake)

find_package(iPlug2 REQUIRED COMPONENTS IPlug APP)

# # # Add subdirectories for each project
add_subdirectory(TemplateProject)
# add_subdirectory(TemplateProject2)
26 changes: 26 additions & 0 deletions TemplateProject/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.14)
project(TemplateProject VERSION 1.0.0)

set(PROJECT_DIR ${CMAKE_CURRENT_SOURCE_DIR})

set(SOURCE_FILES
TemplateProject.cpp
TemplateProject.h
resources/resource.h
)

# create a private library target called "__${PROJECT_NAME}_BASE" for shared code
add_library(_${PROJECT_NAME}_BASE INTERFACE)
iplug_add_target(_${PROJECT_NAME}_BASE INTERFACE
INCLUDE ${PROJECT_DIR} ${PROJECT_DIR}/resources
LINK iPlug2::IPlug
)

# create an executable target called "_${PROJECT_NAME}_APP"
add_executable(${PROJECT_NAME}_APP ${SOURCE_FILES})
iplug_add_target(${PROJECT_NAME}_APP PUBLIC
LINK iPlug2::APP _${PROJECT_NAME}_BASE
RESOURCE ${RESOURCES}
DEFINE NO_IGRAPHICS
)
iplug_configure_target(${PROJECT_NAME}_APP APP ${PROJECT_NAME})

0 comments on commit 3b62fd1

Please sign in to comment.