Skip to content

Commit

Permalink
* add missing cmake files
Browse files Browse the repository at this point in the history
  • Loading branch information
Nat! committed Dec 18, 2018
1 parent af09747 commit 1348928
Show file tree
Hide file tree
Showing 20 changed files with 464 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .mulle-env/share/auxscopes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
project
extension
22 changes: 22 additions & 0 deletions .mulle-env/share/environment-extension.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Reset to empty
export MULLE_SDE_UPDATE_CALLBACKS="sourcetree:source"


# Used by `mulle-match find` to speed up the search.
export MULLE_MATCH_FILENAMES="config:*.h:*.inc:*.c:CMakeLists.txt:*.cmake"


# Used by `mulle-match find` to locate files
export MULLE_MATCH_PATH="${PROJECT_SOURCE_DIR}:CMakeLists.txt:cmake"


# Used by `mulle-match find` to ignore boring subdirectories like .git
export MULLE_MATCH_IGNORE_PATH=


#
#
#
export MULLE_SDE_INSTALLED_VERSION="0.33.0"


5 changes: 5 additions & 0 deletions .mulle-env/share/environment-plugin-os-darwin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#
# Git mirror and Zip/TGZ cache to conserve bandwidth
#
export MULLE_FETCH_MIRROR_DIR="${HOME:-/tmp}/Library/Caches/mulle-fetch/git-mirror"
export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/Library/Caches/mulle-fetch/archive"
46 changes: 46 additions & 0 deletions .mulle-env/share/environment-plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#
# Git mirror and Zip/TGZ cache to conserve bandwidth
# Memo: override in os-specific env file
#
export MULLE_FETCH_MIRROR_DIR="${HOME:-/tmp}/.cache/mulle-fetch/git-mirror"

#
# Git mirror and Zip/TGZ cache to conserve bandwidth
#
export MULLE_FETCH_ARCHIVE_DIR="${HOME:-/tmp}/.cache/mulle-fetch/archive"

#
# PATH to search for git repositories locally
#
export MULLE_FETCH_SEARCH_PATH="${MULLE_VIRTUAL_ROOT}/.."

#
# Prefer symlinking to local git repositories found via MULLE_FETCH_SEARCH_PATH
#
export MULLE_SOURCETREE_SYMLINK="YES"

#
# Use common folder for sharable projects
#
export MULLE_SOURCETREE_SHARE_DIR="${MULLE_VIRTUAL_ROOT}/stash"

#
# Share dependency directory (absolute for ease of use)
#
export DEPENDENCY_DIR="${MULLE_VIRTUAL_ROOT}/dependency"

#
# Share addiction directory (absolute for ease of use)
#
export ADDICTION_DIR="${MULLE_VIRTUAL_ROOT}/addiction"

#
# Use common build directory
#
export BUILD_DIR="${MULLE_VIRTUAL_ROOT}/build"

#
# Modify path so that dependency and addictions executables are found and
# preferred.
#
export PATH="${DEPENDENCY_DIR}/bin:${ADDICTION_DIR}/bin:$PATH"
4 changes: 4 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 4.1.1

* add missing cmake files

## 4.1.0

* added support for `mulle_thread_once`
Expand Down
67 changes: 67 additions & 0 deletions cmake/Headers.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#
# The following includes include definitions generated
# during `mulle-sde update`. Don't edit those files. They are
# overwritten frequently.
#
# === MULLE-SDE START ===

include( _Headers)

# === MULLE-SDE END ===
#

#
# If you don't like the "automatic" way of generating _Headers
#
# MULLE_SDE_CMAKE_HEADERS_FILE="DISABLE" # or NONE
#

#
# Add ignored headers back in so that the generators pick them up
#
set( PUBLIC_HEADERS
"src/_mulle-thread-include.h"
${PUBLIC_HEADERS}
)

# keep headers to install separate to make last minute changes
set( INSTALL_PUBLIC_HEADERS ${PUBLIC_HEADERS})

#
# Do not install generated private headers and include-private.h
# which aren't valid outside of the project scope.
#
set( INSTALL_PRIVATE_HEADERS ${PRIVATE_HEADERS})
list( REMOVE_ITEM INSTALL_PRIVATE_HEADERS "include-private.h")

# add ignored headers back in so that the generators pick them up
set( PRIVATE_HEADERS
"src/_mulle-thread-include-private.h"
${PRIVATE_HEADERS}
)

#
# You can put more source and resource file definitions here.
#
# add ignored header back in
# add ignored headers back in

set( MINTOMIC_HEADERS
mintomic/include/mintomic/core.h
mintomic/include/mintomic/mintomic.h
mintomic/include/mintomic/platform_detect.h)


set( MINTOMIC_PRIVATE_HEADERS
mintomic/include/mintomic/private/core_gcc.h
mintomic/include/mintomic/private/core_msvc.h
mintomic/include/mintomic/private/mintomic_gcc_arm.h
mintomic/include/mintomic/private/mintomic_gcc_x86-64.h
mintomic/include/mintomic/private/mintomic_msvc.h
mintomic/include/mintomic/private/mintomic_stdint.h
)

include_directories(
AFTER SYSTEM mintomic/include
)

37 changes: 37 additions & 0 deletions cmake/Sources.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# The following includes include definitions generated
# during `mulle-sde update`. Don't edit those files. They are
# overwritten frequently.
#
# === MULLE-SDE START ===

include( _Sources)

# === MULLE-SDE END ===
#
#
# If you don't like the "automatic" way of generating _Sources
#
# MULLE_SDE_CMAKE_SOURCES_FILE="DISABLE" # or NONE
#

#
# You can put more source and resource file definitions here.
#

set( SOURCES
src/linkage.c
)

set( STANDALONE_SOURCES
src/mulle-thread-standalone.c
)


if( MSVC)
set( SOURCES
${SOURCES}
src/mulle_thread_windows.c
)
endif()

15 changes: 15 additions & 0 deletions cmake/share/Dependencies.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### Dependencies


if( NOT __DEPENDENCIES___CMAKE__)
set( __DEPENDENCIES___CMAKE__ ON)

if( MULLE_TRACE_INCLUDE)
message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
endif()

include( PreDependencies OPTIONAL)

include( "cmake/DependenciesAndLibraries.cmake" OPTIONAL)

endif()
19 changes: 19 additions & 0 deletions cmake/share/ExecutableAux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
if( MULLE_TRACE_INCLUDE)
message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
endif()


include( AllLoadC)
include( StartupC)

include( ExecutableAuxC OPTIONAL)

CreateForceAllLoadList( ALL_LOAD_DEPENDENCY_LIBRARIES FORCE_ALL_LOAD_DEPENDENCY_LIBRARIES)

set( EXECUTABLE_LIBRARY_LIST
${FORCE_ALL_LOAD_DEPENDENCY_LIBRARIES}
${DEPENDENCY_LIBRARIES}
${OPTIONAL_DEPENDENCY_LIBRARIES}
${OS_SPECIFIC_LIBRARIES}
${STARTUP_LIBRARY}
)
31 changes: 31 additions & 0 deletions cmake/share/Files.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
### Files
if( NOT __FILES__CMAKE__)
set( __FILES___CMAKE__ ON)

if( MULLE_TRACE_INCLUDE)
message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
endif()

include( PreFiles OPTIONAL)

include( "cmake/Headers.cmake" OPTIONAL)
include( "cmake/Sources.cmake" OPTIONAL)

include_directories( ${INCLUDE_DIRS})

include( PostFiles OPTIONAL)

set( PROJECT_FILES
${PROJECT_FILES}
${SOURCES}
${PUBLIC_HEADERS}
${PRIVATE_HEADERS}
${CMAKE_EDITABLE_FILES}
)

set( PROJECT_INSTALLABLE_HEADERS
${PUBLIC_HEADERS}
${PRIVATE_HEADERS}
)

endif()
40 changes: 40 additions & 0 deletions cmake/share/FinalOutput.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
if( NOT __FINAL_OUTPUT_C_CMAKE__)
set( __FINAL_OUTPUT_C_CMAKE__ ON)

if( MULLE_TRACE_INCLUDE)
message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
endif()

#
#
#
message( STATUS "CMAKE_MODULE_PATH is ${CMAKE_MODULE_PATH}")
message( STATUS "CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
message( STATUS "CMAKE_SYSTEM_NAME is ${CMAKE_SYSTEM_NAME}")

if( APPLE)
message( STATUS "CMAKE_OSX_SYSROOT is ${CMAKE_OSX_SYSROOT}")
message( STATUS "CMAKE_OSX_DEPLOYMENT_TARGET is ${CMAKE_OSX_DEPLOYMENT_TARGET}")
message( STATUS "CMAKE_FRAMEWORK_PATH is ${CMAKE_FRAMEWORK_PATH}")
endif()

message( STATUS "CMAKE_INCLUDE_PATH is ${CMAKE_INCLUDE_PATH}")
message( STATUS "CMAKE_LIBRARY_PATH is ${CMAKE_LIBRARY_PATH}")

message( STATUS "MULLE_LANGUAGE is ${MULLE_LANGUAGE}")
message( STATUS "MULLE_C_COMPILER_ID is ${MULLE_C_COMPILER_ID}")
message( STATUS "MULLE_CXX_COMPILER_ID is ${MULLE_C_COMPILER_ID}")

message( STATUS "CMAKE_C_COMPILER_ID is ${CMAKE_C_COMPILER_ID}")
message( STATUS "CMAKE_C_FLAGS is ${CMAKE_C_FLAGS}")

message( STATUS "CMAKE_CXX_COMPILER_ID is ${CMAKE_C_COMPILER_ID}")
message( STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}")

message( STATUS "CMAKE_EXE_LINKER_FLAGS is ${CMAKE_EXE_LINKER_FLAGS}")
message( STATUS "CMAKE_SHARED_LINKER_FLAGS is ${CMAKE_SHARED_LINKER_FLAGS}")
message( STATUS "CMAKE_STATIC_LINKER_FLAGS is ${CMAKE_STATIC_LINKER_FLAGS}")

include( FinalOutputAuxC OPTIONAL)

endif()
66 changes: 66 additions & 0 deletions cmake/share/Framework.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This in theory can be included multiple times

if( MULLE_TRACE_INCLUDE)
message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
endif()

#
# FRAMEWORKS do not support three-phase build
#
if( NOT FRAMEWORK_NAME)
set( FRAMEWORK_NAME "${PROJECT_NAME}")
endif()

if( NOT FRAMEWORK_FILES)
set( FRAMEWORK_FILES "${PROJECT_FILES}")
endif()


include( PreFramework OPTIONAL)

add_library( "${FRAMEWORK_NAME}" SHARED
${FRAMEWORK_FILES}
)

include( FrameworkAux OPTIONAL)

if( NOT FRAMEWORK_LIBRARY_LIST)
${DEPENDENCY_LIBRARIES}
${OPTIONAL_DEPENDENCY_LIBRARIES}
${OS_SPECIFIC_LIBRARIES}
)

set( SHARED_LIBRARY_LIST ${FRAMEWORK_LIBRARY_LIST})

include( PostSharedLibrary OPTIONAL) # additional hook

target_link_libraries( "${FRAMEWORK_NAME}"
${SHARED_LIBRARY_LIST} # use SHARED_LIBRARY_LIST because of PostSharedLibrary
)

set( INSTALL_RESOURCES
${RESOURCES}
)

set_target_properties( "${FRAMEWORK_NAME}" PROPERTIES
FRAMEWORK TRUE
# FRAMEWORK_VERSION A
# MACOSX_FRAMEWORK_IDENTIFIER <|PUBLISHER_REVERSE_DOMAIN|>.${LIBRARY_NAME}
MACOSX_FRAMEWORK_INFO_PLIST ${PROJECT_SOURCE_DIR}/cmake/share/MacOSXFrameworkInfo.plist.in
# headers must be part of LIBRARY_NAME target else it don't work
PUBLIC_HEADER "${INSTALL_PUBLIC_HEADERS}"
PRIVATE_HEADER "${INSTALL_PRIVATE_HEADERS}"
RESOURCE "${INSTALL_RESOURCES}"
# XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
)

message( STATUS "INSTALL_PUBLIC_HEADERS=${INSTALL_PUBLIC_HEADERS}")
message( STATUS "INSTALL_PRIVATE_HEADERS=${INSTALL_PRIVATE_HEADERS}")
message( STATUS "INSTALL_RESOURCES=${INSTALL_RESOURCES}")

set( INSTALL_FRAMEWORK_TARGETS
"${FRAMEWORK_NAME}"
${INSTALL_FRAMEWORK_TARGETS}
)

include( PostFramework OPTIONAL)
11 changes: 11 additions & 0 deletions cmake/share/FrameworkAux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This in theory can be included multiple times

if( MULLE_TRACE_INCLUDE)
message( STATUS "# Include \"${CMAKE_CURRENT_LIST_FILE}\"" )
endif()

include( AllLoadC)
include( StartupC)
include( StandaloneC)

include( FrameworkAuxC OPTIONAL)
Loading

0 comments on commit 1348928

Please sign in to comment.