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 2, 2024
1 parent 9c6d575 commit 3ba9803
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
19 changes: 19 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.14)
project(iPlug2OOS)


# Disable deprecated warnings
if(MSVC)
add_compile_options(/wd4996)
else()
add_compile_options(-Wno-deprecated-declarations)
endif()

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})
2 changes: 1 addition & 1 deletion iPlug2
Submodule iPlug2 updated 180 files

0 comments on commit 3ba9803

Please sign in to comment.