diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c56f822..de5377e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,16 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +if(APPLE) + set(CMAKE_MACOSX_RPATH OFF) +else() + if(UNIX) + set(BUILD_SHARED_LIBS ON) + endif() + set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib") + set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) +endif() + add_subdirectory(deps/ox) include_directories( deps/ox/src diff --git a/src/nostalgia/CMakeLists.txt b/src/nostalgia/CMakeLists.txt index d9d27dd7..a486c942 100644 --- a/src/nostalgia/CMakeLists.txt +++ b/src/nostalgia/CMakeLists.txt @@ -2,7 +2,6 @@ #project packages if(APPLE) - set(CMAKE_MACOSX_RPATH OFF) set(CMAKE_INSTALL_NAME_DIR "@executable_path/../Library/nostalgia") set(NOSTALGIA_DIST_BIN NostalgiaStudio.app/Contents/MacOS) set(NOSTALGIA_DIST_LIB NostalgiaStudio.app/Contents/Library) @@ -10,11 +9,6 @@ if(APPLE) set(NOSTALGIA_DIST_RESOURCES NostalgiaStudio.app/Contents/Resources) set(NOSTALGIA_DIST_MAC_APP_CONTENTS NostalgiaStudio.app/Contents) else() - if(UNIX) - set(BUILD_SHARED_LIBS ON) - endif() - set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib") - set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) set(NOSTALGIA_DIST_BIN bin) set(NOSTALGIA_DIST_LIB lib) set(NOSTALGIA_DIST_MODULE lib)