Skip to content

Commit

Permalink
more sound stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePlank committed May 16, 2024
1 parent 473b4e5 commit 77aba26
Show file tree
Hide file tree
Showing 7 changed files with 8,960 additions and 41 deletions.
20 changes: 9 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
cmake_minimum_required(VERSION 3.1.3 FATAL_ERROR)

project(lemons C)

if(MSVC)
add_definitions(-DUNICODE -D_UNICODE)
endif()
# this cmake is very messy, someone should make a pr to fix this up since i have no idea where to start with this

project(lemons C)

set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
Expand All @@ -24,9 +21,8 @@ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${ARCHIVE_DIR})
endforeach()

add_subdirectory(lib/)

message(STATUS "building lemons...")
message(STATUS "creating liblemons...")
set(LEMONS_SRC
src/image.c
src/sound.c
Expand All @@ -36,18 +32,20 @@ set(LEMONS_SRC

add_library(liblemons SHARED ${LEMONS_SRC})

if(DEFINED $ENV{HASHLINK})
# why the hell is this backwards?????
if(DEFINED $ENV{HASHLINK})
message(FATAL_ERROR "the \"HASHLINK\" enviroment variable must be defined")
else()
target_include_directories(liblemons PUBLIC $ENV{HASHLINK}/include)
target_link_libraries(liblemons $ENV{HASHLINK}/libhl.lib)
endif()

target_include_directories(liblemons PUBLIC lib/openal-soft/include)
add_subdirectory(lib/)

target_include_directories(liblemons PUBLIC OpenAL)
target_include_directories(liblemons PUBLIC lib/include/)
target_link_libraries(liblemons OpenAL)


set_target_properties(liblemons PROPERTIES LINKER_LANGUAGE C)
set_target_properties(liblemons PROPERTIES OUTPUT_NAME lemons PREFIX "" SUFFIX .hdll)

set_target_properties(liblemons PROPERTIES OUTPUT_NAME lemons PREFIX "" SUFFIX .hdll)
3 changes: 2 additions & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
message(STATUS "building openal-soft...")

message(STATUS "creating openal-soft...")
set(ALSOFT_UTILS OFF CACHE BOOL "Build utility programs")
set(ALSOFT_EXAMPLES OFF CACHE BOOL "Build example programs")

Expand Down
Loading

0 comments on commit 77aba26

Please sign in to comment.