Skip to content

Commit

Permalink
Use pkg-config trick for Carla on macOS only if installed
Browse files Browse the repository at this point in the history
  • Loading branch information
PhysSong committed Aug 28, 2018
1 parent 02fad14 commit 65983c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/modules/CarlaPkgConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Makes carla submodule available to PKG_CHECK_MODULES
SET(CARLA_SUBMODULE_SOURCE ${CMAKE_SOURCE_DIR}/plugins/carlabase/carla)
SET(CARLA_PKGCONFIG_FILE ${CARLA_SUBMODULE_SOURCE}/data/carla-standalone.pc)
SET(CARLA_LIB_FILE "/Applications/Carla.app/Contents/MacOS/libcarla_standalone2.dylib")

# Look for carla-standalone pkg-config file
IF(EXISTS ${CARLA_PKGCONFIG_FILE})
IF(EXISTS ${CARLA_PKGCONFIG_FILE} AND EXISTS ${CARLA_LIB_FILE})
SET(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${CMAKE_BINARY_DIR}")
FILE(READ ${CARLA_PKGCONFIG_FILE} CARLA_PKGCONFIG_TEXT)
# add source/includes to include location
Expand Down

0 comments on commit 65983c5

Please sign in to comment.