Skip to content

Commit 3b351eb

Browse files
committed
Add option to use system projectm-eval (used in vcpkg)
1 parent ac77498 commit 3b351eb

File tree

4 files changed

+45
-37
lines changed

4 files changed

+45
-37
lines changed

CMakeLists.txt

+29-23
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ cmake_dependent_option(ENABLE_GLES "Enable OpenGL ES support" OFF "NOT ENABLE_EM
7474
option(ENABLE_BOOST_FILESYSTEM "Force the use of boost::filesystem, even if the compiler supports C++17." OFF)
7575
cmake_dependent_option(ENABLE_INSTALL "Enable installing projectM libraries and headers." OFF "NOT PROJECT_IS_TOP_LEVEL" ON)
7676
option(ENABLE_SYSTEM_GLM "Enable use of system-install GLM library" OFF)
77+
option(ENABLE_SYSTEM_PROJECTM_EVAL "Enable use of system-install projectM-eval library" OFF)
7778
option(BUILD_DOCS "Build documentation" OFF)
7879

7980
# Experimental/unsupported features
@@ -83,6 +84,10 @@ if(ENABLE_SYSTEM_GLM)
8384
find_package(GLM REQUIRED)
8485
endif()
8586

87+
if(ENABLE_SYSTEM_PROJECTM_EVAL)
88+
find_package(projectM-Eval)
89+
endif()
90+
8691
if(NOT BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL "Windows")
8792
# Add "lib" in front of static library files to allow installing both shared and static libs in the same dir.
8893
set(CMAKE_STATIC_LIBRARY_PREFIX lib)
@@ -217,46 +222,47 @@ message(STATUS "")
217222
message(STATUS "libprojectM v${PROJECT_VERSION}")
218223
message(STATUS "==============================================")
219224
message(STATUS "")
220-
message(STATUS " prefix: ${CMAKE_INSTALL_PREFIX}")
221-
message(STATUS " libdir: ${PROJECTM_LIB_DIR}")
222-
message(STATUS " includedir: ${PROJECTM_INCLUDE_DIR}")
223-
message(STATUS " bindir: ${PROJECTM_BIN_DIR}")
225+
message(STATUS " prefix: ${CMAKE_INSTALL_PREFIX}")
226+
message(STATUS " libdir: ${PROJECTM_LIB_DIR}")
227+
message(STATUS " includedir: ${PROJECTM_INCLUDE_DIR}")
228+
message(STATUS " bindir: ${PROJECTM_BIN_DIR}")
224229
message(STATUS "")
225-
message(STATUS " compiler: ${CMAKE_CXX_COMPILER}")
226-
message(STATUS " cflags: ${CMAKE_C_FLAGS}")
227-
message(STATUS " cxxflags: ${CMAKE_CXX_FLAGS}")
228-
message(STATUS " ldflags: ${CMAKE_SHARED_LINKER_FLAGS}")
230+
message(STATUS " compiler: ${CMAKE_CXX_COMPILER}")
231+
message(STATUS " cflags: ${CMAKE_C_FLAGS}")
232+
message(STATUS " cxxflags: ${CMAKE_CXX_FLAGS}")
233+
message(STATUS " ldflags: ${CMAKE_SHARED_LINKER_FLAGS}")
229234
message(STATUS "")
230235
message(STATUS "Features:")
231236
message(STATUS "==============================================")
232237
message(STATUS "")
233-
message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
238+
message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
234239
if(ENABLE_BOOST_FILESYSTEM)
235-
message(STATUS " Filesystem support: Boost")
236-
message(STATUS " Boost version: ${Boost_VERSION}")
240+
message(STATUS " Filesystem support: Boost")
241+
message(STATUS " Boost version: ${Boost_VERSION}")
237242
else()
238-
message(STATUS " Filesystem support: C++17 STL")
243+
message(STATUS " Filesystem support: C++17 STL")
239244
endif()
240-
message(STATUS " SDL2: ${ENABLE_SDL_UI}")
245+
message(STATUS " SDL2: ${ENABLE_SDL_UI}")
241246
if(ENABLE_SDL_UI)
242-
message(STATUS " SDL2 version: ${SDL2_VERSION}")
247+
message(STATUS " SDL2 version: ${SDL2_VERSION}")
243248
endif()
244-
message(STATUS " OpenGL ES: ${ENABLE_GLES}")
245-
message(STATUS " Emscripten: ${ENABLE_EMSCRIPTEN}")
249+
message(STATUS " OpenGL ES: ${ENABLE_GLES}")
250+
message(STATUS " Emscripten: ${ENABLE_EMSCRIPTEN}")
246251
if(CMAKE_SYSTEM_NAME STREQUAL Emscripten)
247252
message(STATUS " - PThreads: ${USE_PTHREADS}")
248253
endif()
249-
message(STATUS " Use system GLM: ${ENABLE_SYSTEM_GLM}")
250-
message(STATUS " Link UI with shared lib: ${ENABLE_SHARED_LINKING}")
254+
message(STATUS " Use system GLM: ${ENABLE_SYSTEM_GLM}")
255+
message(STATUS " Use system projectM-eval: ${ENABLE_SYSTEM_PROJECTM_EVAL}")
256+
message(STATUS " Link UI with shared lib: ${ENABLE_SHARED_LINKING}")
251257
message(STATUS "")
252258
message(STATUS "Targets and applications:")
253259
message(STATUS "==============================================")
254260
message(STATUS "")
255-
message(STATUS " libprojectM: (always built)")
256-
message(STATUS " Playlist library: ${ENABLE_PLAYLIST}")
257-
message(STATUS " SDL2 Test UI: ${ENABLE_SDL_UI}")
258-
message(STATUS " Tests: ${BUILD_TESTING}")
259-
message(STATUS " Documentation: ${BUILD_DOCS}")
261+
message(STATUS " libprojectM: (always built)")
262+
message(STATUS " Playlist library: ${ENABLE_PLAYLIST}")
263+
message(STATUS " SDL2 Test UI: ${ENABLE_SDL_UI}")
264+
message(STATUS " Tests: ${BUILD_TESTING}")
265+
message(STATUS " Documentation: ${BUILD_DOCS}")
260266
message(STATUS "")
261267

262268
if(ENABLE_CXX_INTERFACE)

vcpkg-configuration.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json",
3-
"default-registry": {
4-
"kind": "git",
5-
"baseline": "638b1588be3a265a9c7ad5b212cef72a1cad336a",
6-
"repository": "https://github.com/microsoft/vcpkg"
7-
}
8-
}
2+
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json",
3+
"default-registry": {
4+
"kind": "git",
5+
"baseline": "815d93b520779e4354bb4b954fc2179b3e520c26",
6+
"repository": "https://github.com/microsoft/vcpkg"
7+
}
8+
}

vcpkg.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
3-
"dependencies": [
4-
"glew",
5-
"gtest",
6-
"sdl2"
7-
]
8-
}
2+
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
3+
"dependencies": [
4+
"glew",
5+
"gtest",
6+
"sdl2"
7+
]
8+
}

vendor/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ if(NOT ENABLE_SYSTEM_GLM)
22
add_subdirectory(glm)
33
endif()
44
add_subdirectory(hlslparser)
5+
if(NOT TARGET projectM::Eval)
56
add_subdirectory(projectm-eval)
7+
endif()
68
add_subdirectory(SOIL2)

0 commit comments

Comments
 (0)