Skip to content

Instantly share code, notes, and snippets.

@sbooth
Last active October 15, 2018 01:19
Show Gist options
  • Save sbooth/44938bc5377f9ef8504d5f5226808baa to your computer and use it in GitHub Desktop.
Save sbooth/44938bc5377f9ef8504d5f5226808baa to your computer and use it in GitHub Desktop.
MAC_SDK_435 CMake
cmake_minimum_required (VERSION 2.6)
project (libmac)
set(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Directory for architecture-dependent files")
set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" CACHE PATH "Directory for user executables")
set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib" CACHE PATH "Ddirectory for object code libraries")
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Directory for header files")
add_definitions(-DPLATFORM_APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
include_directories(
Shared
)
set(mac_HDRS
MACLib/Prepare.h
MACLib/APEDecompress.h
MACLib/APECompress.h
MACLib/UnBitArrayBase.h
MACLib/MACLib.h
Shared/All.h
Shared/NoWindows.h
Shared/SmartPtr.h
Shared/IO.h
Shared/CharacterHelper.h
)
set(mac_LIB_SRCS
Shared/StdLibFileIO.cpp
Shared/CharacterHelper.cpp
Shared/CircleBuffer.cpp
Shared/GlobalFunctions.cpp
MACLib/APECompress.cpp
MACLib/UnBitArray.cpp
MACLib/WAVInputSource.cpp
MACLib/APECompressCore.cpp
MACLib/MD5.cpp
MACLib/NNFilter.cpp
MACLib/APELink.cpp
MACLib/APEHeader.cpp
MACLib/MACProgressHelper.cpp
MACLib/APESimple.cpp
MACLib/APEInfo.cpp
MACLib/APETag.cpp
MACLib/MACLib.cpp
MACLib/BitArray.cpp
MACLib/APECompressCreate.cpp
MACLib/Prepare.cpp
MACLib/APEDecompress.cpp
MACLib/NewPredictor.cpp
MACLib/UnBitArrayBase.cpp
MACLib/Old/AntiPredictorHigh.cpp
MACLib/Old/AntiPredictorFast.cpp
MACLib/Old/UnMAC.cpp
MACLib/Old/Anti-Predictor.cpp
MACLib/Old/APEDecompressOld.cpp
MACLib/Old/AntiPredictorExtraHigh.cpp
MACLib/Old/AntiPredictorNormal.cpp
MACLib/Old/APEDecompressCore.cpp
MACLib/Old/UnBitArrayOld.cpp
)
add_library(mac ${mac_LIB_SRCS} ${mac_HDRS})
set_target_properties(mac PROPERTIES
INSTALL_NAME_DIR ${LIB_INSTALL_DIR}
LINK_INTERFACE_LIBRARIES ""
PUBLIC_HEADER "${mac_HDRS}"
)
install(TARGETS mac
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/mac
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment