forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [dumb] New port. * [dumb] Add to baseline. * [dumb] Apply suggestion from review. - Remove unofficial config since a pkg-config file is provided. - Update the match string for pkg-config fixes. - Limit ONLY_STATIC_LIBRARY to Windows. * [dumb] Update version. * [dumb] Remove vcpkg-cmake-config dependency. This dependency is no longer needed since the unofficial config was removed. * [dumb] Update version.
- Loading branch information
1 parent
f0ee0ca
commit bf4958b
Showing
6 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index a793bba..6fd094c 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -223,7 +223,10 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
set_target_properties(dumb PROPERTIES INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}) | ||
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
|
||
+find_library(HAS_MATH_LIB NAMES "m") | ||
+if(HAS_MATH_LIB) | ||
target_link_libraries(dumb m) | ||
+endif() | ||
|
||
install(FILES ${PKG_CONFIG_FILE} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) | ||
install(FILES ${INSTALL_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index a793bba..585ef78 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -29,17 +29,17 @@ check_and_add_c_compiler_flag("-Wall" CMAKE_C_FLAGS) | ||
add_definitions("-D_FILE_OFFSET_BITS=64") | ||
add_definitions("-DDUMB_DECLARE_DEPRECATED") | ||
|
||
-set(CMAKE_C_FLAGS_DEBUG "-DDEBUGMODE=1 -D_DEBUG") | ||
+set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUGMODE=1 -D_DEBUG") | ||
check_and_add_c_compiler_flag("-ggdb" CMAKE_C_FLAGS_DEBUG) | ||
check_and_add_c_compiler_flag("-Zi" CMAKE_C_FLAGS_DEBUG) | ||
|
||
-set(CMAKE_C_FLAGS_RELEASE "-ffast-math -O2 -DNDEBUG") | ||
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffast-math -O2 -DNDEBUG") | ||
|
||
-set(CMAKE_C_FLAGS_RELWITHDEBINFO "-ffast-math -O2 -DNDEBUG") | ||
+set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -ffast-math -O2 -DNDEBUG") | ||
check_and_add_c_compiler_flag("-g" CMAKE_C_FLAGS_RELWITHDEBINFO) | ||
check_and_add_c_compiler_flag("-Zi" CMAKE_C_FLAGS_RELWITHDEBINFO) | ||
|
||
-set(CMAKE_C_FLAGS_MINSIZEREL "-ffast-math -Os -DNDEBUG") | ||
+set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -ffast-math -Os -DNDEBUG") | ||
|
||
if(USE_SSE) | ||
check_c_compiler_flag("-msse" "CC_HAS_MSSE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
if(VCPKG_TARGET_IS_WINDOWS) | ||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) | ||
endif() | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO kode54/dumb | ||
REF "${VERSION}" | ||
SHA512 18b10a507d69a754cdf97fbeae41c17f211a6ba1f166a822276bdb6769d3edc326919067a3f4d1247d6715d7a5a8276669d83b9427e7336c6d111593fb7e36cf | ||
HEAD_REF master | ||
PATCHES | ||
"check-for-math-lib.patch" | ||
"do-not-overwrite-cflags.patch" | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DBUILD_EXAMPLES=OFF | ||
-DBUILD_ALLEGRO4=OFF | ||
) | ||
|
||
vcpkg_cmake_install() | ||
vcpkg_fixup_pkgconfig() | ||
vcpkg_copy_pdbs() | ||
|
||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/dumb.pc" "-llibdumb" "-ldumb") | ||
if(NOT VCPKG_BUILD_TYPE) | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/dumb.pc" "-llibdumb" "-ldumbd") | ||
endif() | ||
|
||
if(VCPKG_TARGET_IS_WINDOWS) | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/dumb.pc" " -lm" "") | ||
if(NOT VCPKG_BUILD_TYPE) | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/dumb.pc" " -lm" "") | ||
endif() | ||
endif() | ||
|
||
file(REMOVE_RECURSE | ||
"${CURRENT_PACKAGES_DIR}/debug/include" | ||
"${CURRENT_PACKAGES_DIR}/debug/share" | ||
) | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "dumb", | ||
"version": "2.0.3", | ||
"description": "Module/tracker based music format parser and player library", | ||
"homepage": "https://github.com/kode54/dumb", | ||
"license": null, | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "fb0e42347cd9ec43e40d2b123990e1705399dc02", | ||
"version": "2.0.3", | ||
"port-version": 0 | ||
} | ||
] | ||
} |