Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compile the Texture Font Generator with cmake.
This program is not built by default. Enable one of the following options to utilize it: * WITH_FULL_RELEASE * WITH_TEXTURE_GENERATOR It is heavily advised to make sure the MFC library is installed for Visual Studio and the computer is restarted afterwards. As a bonus, `zlib1.dll` can go away now. The old visual studio projects are still in play in case others still struggle with the code fixes.
- Loading branch information
1 parent
cf5656a
commit e0290fc
Showing
8 changed files
with
81 additions
and
5 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 |
---|---|---|
|
@@ -82,6 +82,8 @@ PBProject/Hardware.plist | |
*.exp | ||
*.ilk | ||
*.map | ||
*.aps | ||
*.res | ||
|
||
# Windows General Files | ||
Thumbs.db | ||
|
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
Binary file not shown.
Binary file not shown.
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,71 @@ | ||
if (NOT MSVC) | ||
return() | ||
endif() | ||
|
||
set(TEXTURE_DIR "${SM_SRC_DIR}/Texture Font Generator") | ||
|
||
list(APPEND TEXTURE_SRC | ||
"${TEXTURE_DIR}/stdafx.cpp" | ||
"${TEXTURE_DIR}/Texture Font Generator.cpp" | ||
"${TEXTURE_DIR}/Texture Font GeneratorDlg.cpp" | ||
"${TEXTURE_DIR}/TextureFont.cpp" | ||
"${TEXTURE_DIR}/Utils.cpp" | ||
) | ||
|
||
list(APPEND TEXTURE_HPP | ||
"${TEXTURE_DIR}/Resource.h" | ||
"${TEXTURE_DIR}/stdafx.h" | ||
"${TEXTURE_DIR}/Texture Font Generator.h" | ||
"${TEXTURE_DIR}/Texture Font GeneratorDlg.h" | ||
"${TEXTURE_DIR}/TextureFont.h" | ||
"${TEXTURE_DIR}/Utils.h" | ||
) | ||
|
||
list(APPEND TEXTURE_DAT | ||
"${TEXTURE_DIR}/res/Texture Font Generator.ico" | ||
"${TEXTURE_DIR}/Texture Font Generator.rc" | ||
"${TEXTURE_DIR}/res/Texture Font Generator.rc2" | ||
) | ||
|
||
source_group("Source Files" FILES ${TEXTURE_SRC} ${TEXTURE_HPP}) | ||
source_group("Resource Files" FILES ${TEXTURE_DAT}) | ||
set(CMAKE_MFC_FLAG 2) | ||
add_executable("TextureFontGenerator" WIN32 ${TEXTURE_SRC} ${TEXTURE_HPP} ${TEXTURE_DAT}) | ||
unset(CMAKE_MFC_FLAG) | ||
set_property(TARGET "TextureFontGenerator" PROPERTY FOLDER "Internal Libraries") | ||
|
||
disable_project_warnings("TextureFontGenerator") | ||
|
||
sm_add_compile_definition("TextureFontGenerator" _AFXDLL) | ||
|
||
list(APPEND TEXTURE_LINK_LIB | ||
"zlib" | ||
"png" | ||
) | ||
|
||
target_link_libraries("TextureFontGenerator" ${TEXTURE_LINK_LIB}) | ||
|
||
list(APPEND TEXTURE_INCLUDE_DIRS | ||
"${TEXTURE_DIR}" | ||
"${TEXTURE_DIR}/res" | ||
"${SM_EXTERN_DIR}/zlib" | ||
"${SM_EXTERN_DIR}/libpng/include" | ||
) | ||
|
||
target_include_directories("TextureFontGenerator" PUBLIC ${TEXTURE_INCLUDE_DIRS}) | ||
|
||
set_target_properties("TextureFontGenerator" PROPERTIES | ||
RUNTIME_OUTPUT_DIRECTORY "${SM_PROGRAM_DIR}" | ||
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${SM_PROGRAM_DIR}" | ||
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${SM_PROGRAM_DIR}" | ||
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${SM_PROGRAM_DIR}" | ||
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${SM_PROGRAM_DIR}" | ||
) | ||
|
||
set_target_properties("TextureFontGenerator" PROPERTIES | ||
OUTPUT_NAME "Texture Font Generator" | ||
RELEASE_OUTPUT_NAME "Texture Font Generator" | ||
DEBUG_OUTPUT_NAME "Texture Font Generator" | ||
MINSIZEREL_OUTPUT_NAME "Texture Font Generator" | ||
RELWITHDEBINFO_OUTPUT_NAME "Texture Font Generator" | ||
) |
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