1
1
cmake_minimum_required (VERSION 2.6)
2
2
3
- project (Minetest)
4
- string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
3
+ project (minetest)
5
4
6
5
INCLUDE (CheckIncludeFiles)
7
6
@@ -465,10 +464,10 @@ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
465
464
466
465
467
466
if (BUILD_CLIENT)
468
- add_executable (${PROJECT_NAME_LOWER } ${client_SRCS} )
469
- add_dependencies (${PROJECT_NAME_LOWER } GenerateVersion)
467
+ add_executable (${PROJECT_NAME } ${client_SRCS} )
468
+ add_dependencies (${PROJECT_NAME } GenerateVersion)
470
469
set (client_LIBS
471
- ${PROJECT_NAME_LOWER }
470
+ ${PROJECT_NAME }
472
471
${ZLIB_LIBRARIES}
473
472
${IRRLICHT_LIBRARY}
474
473
${OPENGL_LIBRARIES}
@@ -497,55 +496,55 @@ if(BUILD_CLIENT)
497
496
endif ()
498
497
if (USE_CURL)
499
498
target_link_libraries (
500
- ${PROJECT_NAME_LOWER }
499
+ ${PROJECT_NAME }
501
500
${CURL_LIBRARY}
502
501
)
503
502
endif ()
504
503
if (USE_FREETYPE)
505
504
if (FREETYPE_PKGCONFIG_FOUND)
506
- set_target_properties (${PROJECT_NAME_LOWER }
505
+ set_target_properties (${PROJECT_NAME }
507
506
PROPERTIES
508
507
COMPILE_FLAGS "${FREETYPE_CFLAGS_STR} "
509
508
)
510
509
endif ()
511
510
target_link_libraries (
512
- ${PROJECT_NAME_LOWER }
511
+ ${PROJECT_NAME }
513
512
${FREETYPE_LIBRARY}
514
513
${CGUITTFONT_LIBRARY}
515
514
)
516
515
endif ()
517
516
if (USE_LEVELDB)
518
- target_link_libraries (${PROJECT_NAME_LOWER } ${LEVELDB_LIBRARY} )
517
+ target_link_libraries (${PROJECT_NAME } ${LEVELDB_LIBRARY} )
519
518
endif ()
520
519
if (USE_REDIS)
521
- target_link_libraries (${PROJECT_NAME_LOWER } ${REDIS_LIBRARY} )
520
+ target_link_libraries (${PROJECT_NAME } ${REDIS_LIBRARY} )
522
521
endif ()
523
522
endif (BUILD_CLIENT)
524
523
525
524
526
525
if (BUILD_SERVER)
527
- add_executable (${PROJECT_NAME_LOWER } server ${server_SRCS} )
528
- add_dependencies (${PROJECT_NAME_LOWER } server GenerateVersion)
526
+ add_executable (${PROJECT_NAME } server ${server_SRCS} )
527
+ add_dependencies (${PROJECT_NAME } server GenerateVersion)
529
528
target_link_libraries (
530
- ${PROJECT_NAME_LOWER } server
529
+ ${PROJECT_NAME } server
531
530
${ZLIB_LIBRARIES}
532
531
${SQLITE3_LIBRARY}
533
532
${JSON_LIBRARY}
534
533
${GETTEXT_LIBRARY}
535
534
${LUA_LIBRARY}
536
535
${PLATFORM_LIBS}
537
536
)
538
- set_target_properties (${PROJECT_NAME_LOWER } server PROPERTIES
537
+ set_target_properties (${PROJECT_NAME } server PROPERTIES
539
538
COMPILE_DEFINITIONS "SERVER" )
540
539
if (USE_LEVELDB)
541
- target_link_libraries (${PROJECT_NAME_LOWER } server ${LEVELDB_LIBRARY} )
540
+ target_link_libraries (${PROJECT_NAME } server ${LEVELDB_LIBRARY} )
542
541
endif ()
543
542
if (USE_REDIS)
544
- target_link_libraries (${PROJECT_NAME_LOWER } server ${REDIS_LIBRARY} )
543
+ target_link_libraries (${PROJECT_NAME } server ${REDIS_LIBRARY} )
545
544
endif ()
546
545
if (USE_CURL)
547
546
target_link_libraries (
548
- ${PROJECT_NAME_LOWER } server
547
+ ${PROJECT_NAME } server
549
548
${CURL_LIBRARY}
550
549
)
551
550
endif ()
@@ -646,7 +645,7 @@ if(WIN32)
646
645
endif ()
647
646
648
647
if (BUILD_CLIENT)
649
- install (TARGETS ${PROJECT_NAME_LOWER }
648
+ install (TARGETS ${PROJECT_NAME }
650
649
RUNTIME DESTINATION ${BINDIR}
651
650
LIBRARY DESTINATION ${BINDIR}
652
651
ARCHIVE DESTINATION ${BINDIR}
@@ -664,7 +663,7 @@ if(BUILD_CLIENT)
664
663
if (USE_GETTEXT)
665
664
foreach (LOCALE ${GETTEXT_AVAILABLE_LOCALES} )
666
665
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE} )
667
- set (MO_BUILD_PATH "${MO_BUILD_PATH} /${PROJECT_NAME_LOWER } .mo" )
666
+ set (MO_BUILD_PATH "${MO_BUILD_PATH} /${PROJECT_NAME } .mo" )
668
667
install (FILES ${MO_BUILD_PATH} DESTINATION ${MO_DEST_PATH} )
669
668
endforeach ()
670
669
endif ()
@@ -685,16 +684,16 @@ if(BUILD_CLIENT)
685
684
endif (BUILD_CLIENT)
686
685
687
686
if (BUILD_SERVER)
688
- install (TARGETS ${PROJECT_NAME_LOWER } server DESTINATION ${BINDIR} )
687
+ install (TARGETS ${PROJECT_NAME } server DESTINATION ${BINDIR} )
689
688
endif ()
690
689
691
690
if (USE_GETTEXT)
692
691
set (MO_FILES)
693
692
694
693
foreach (LOCALE ${GETTEXT_AVAILABLE_LOCALES} )
695
- set (PO_FILE_PATH "${GETTEXT_PO_PATH} /${LOCALE} /${PROJECT_NAME_LOWER } .po" )
694
+ set (PO_FILE_PATH "${GETTEXT_PO_PATH} /${LOCALE} /${PROJECT_NAME } .po" )
696
695
set_mo_paths(MO_BUILD_PATH MO_DEST_PATH ${LOCALE} )
697
- set (MO_FILE_PATH "${MO_BUILD_PATH} /${PROJECT_NAME_LOWER } .mo" )
696
+ set (MO_FILE_PATH "${MO_BUILD_PATH} /${PROJECT_NAME } .mo" )
698
697
699
698
add_custom_command (OUTPUT ${MO_BUILD_PATH}
700
699
COMMAND ${CMAKE_COMMAND} -E make_directory ${MO_BUILD_PATH}
0 commit comments