Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Jan 4, 2023
0 parents commit ea9872c
Show file tree
Hide file tree
Showing 27 changed files with 4,390 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
__pycache__
build
dist
*.spec
*.exe
*.o
*.cmake
CMakeCache.txt
CMakeFiles
Makefile
a.*
*.ninja
*.ninja*
*-old
lib*.a
*.dll
*.pdf
*.spi
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "libharu"]
path = libharu
url = https://github.com/katahiromz/libharu
[submodule "color_value"]
path = color_value
url = https://github.com/katahiromz/color_value
62 changes: 62 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# CMakeLists.txt --- CMake project settings
# ex) cmake -G "Visual Studio 9 2008" .
# ex) cmake -DCMAKE_BUILD_TYPE=Release -G "MSYS Makefiles" .
##############################################################################

# CMake minimum version
cmake_minimum_required(VERSION 3.0)

# project name and languages
project(Jigsaw CXX RC)

# set output directory (build/)
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/build)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})

# statically link
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# using Clang
set(CMAKE_CXX_FLAGS "-static -lstdc++ -lgcc")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# using GCC
set(CMAKE_CXX_FLAGS "-static -lstdc++ -lgcc")
elseif (MSVC)
# replace "/MD" with "/MT" (building without runtime DLLs)
set(CompilerFlags
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO)
foreach(CompilerFlags ${CompilerFlags})
string(REPLACE "/MD" "/MT" ${CompilerFlags} "${${CompilerFlags}}")
endforeach()
endif()

##############################################################################

# Shareware?
option(SHAREWARE "Enable shareware" ON)
if(NOT SHAREWARE)
add_definitions(-DNO_SHAREWARE)
endif()

# Unicode
add_definitions(-DUNICODE -D_UNICODE)

# zlib
find_package(ZLIB)

# libpng
find_package(PNG)

# libharu (hpdf)
set(LIBHPDF_STATIC ON)
add_subdirectory(libharu)
include_directories(libharu/include)

# Jigsaw.exe
add_executable(Jigsaw WIN32 Jigsaw.cpp Jigsaw_res.rc gpimage.cpp Shareware.cpp SHA-256.cpp)
target_link_libraries(Jigsaw comctl32 shlwapi gdiplus hpdf ${PNG_LIBRARY} ${ZLIB_LIBRARY})

##############################################################################
1 change: 1 addition & 0 deletions HISTORY.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# デジタルジグソーメーカーの開発履歴
Loading

0 comments on commit ea9872c

Please sign in to comment.